Merge branch '4.3' into 4.4
* 4.3: bump phpunit-bridge cache-id Use assertStringContainsString when needed Use assert assertContainsEquals when needed Use assertEqualsWithDelta when required
This commit is contained in:
commit
34e86761f4
2
phpunit
2
phpunit
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Cache-Id: https://github.com/symfony/phpunit-bridge/commit/da3d101c8db7e7612069406c4ca6b1986b6f4942
|
// Cache-Id: https://github.com/symfony/phpunit-bridge/commit/6ce862d9166ac77f611cc97789e91cb4f51f0021
|
||||||
|
|
||||||
if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
|
if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
|
||||||
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\nPlease run `composer update` before running this command.\n";
|
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\nPlease run `composer update` before running this command.\n";
|
||||||
|
@ -197,12 +197,12 @@ class ConsoleHandlerTest extends TestCase
|
|||||||
|
|
||||||
$event = new ConsoleCommandEvent(new Command('foo'), $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(), $output);
|
$event = new ConsoleCommandEvent(new Command('foo'), $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(), $output);
|
||||||
$dispatcher->dispatch($event, ConsoleEvents::COMMAND);
|
$dispatcher->dispatch($event, ConsoleEvents::COMMAND);
|
||||||
$this->assertContains('Before command message.', $out = $output->fetch());
|
$this->assertStringContainsString('Before command message.', $out = $output->fetch());
|
||||||
$this->assertContains('After command message.', $out);
|
$this->assertStringContainsString('After command message.', $out);
|
||||||
|
|
||||||
$event = new ConsoleTerminateEvent(new Command('foo'), $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(), $output, 0);
|
$event = new ConsoleTerminateEvent(new Command('foo'), $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(), $output, 0);
|
||||||
$dispatcher->dispatch($event, ConsoleEvents::TERMINATE);
|
$dispatcher->dispatch($event, ConsoleEvents::TERMINATE);
|
||||||
$this->assertContains('Before terminate message.', $out = $output->fetch());
|
$this->assertStringContainsString('Before terminate message.', $out = $output->fetch());
|
||||||
$this->assertContains('After terminate message.', $out);
|
$this->assertStringContainsString('After terminate message.', $out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,14 +29,14 @@ class CoverageListenerTest extends TestCase
|
|||||||
|
|
||||||
exec("$php $phpunit -c $dir/phpunit-without-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
|
exec("$php $phpunit -c $dir/phpunit-without-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
|
||||||
$output = implode("\n", $output);
|
$output = implode("\n", $output);
|
||||||
$this->assertContains('FooCov', $output);
|
$this->assertStringContainsString('FooCov', $output);
|
||||||
|
|
||||||
exec("$php $phpunit -c $dir/phpunit-with-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
|
exec("$php $phpunit -c $dir/phpunit-with-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
|
||||||
$output = implode("\n", $output);
|
$output = implode("\n", $output);
|
||||||
$this->assertNotContains('FooCov', $output);
|
$this->assertStringNotContainsString('FooCov', $output);
|
||||||
$this->assertContains("SutNotFoundTest::test\nCould not find the tested class.", $output);
|
$this->assertStringContainsString("SutNotFoundTest::test\nCould not find the tested class.", $output);
|
||||||
$this->assertNotContains("CoversTest::test\nCould not find the tested class.", $output);
|
$this->assertStringNotContainsString("CoversTest::test\nCould not find the tested class.", $output);
|
||||||
$this->assertNotContains("CoversDefaultClassTest::test\nCould not find the tested class.", $output);
|
$this->assertStringNotContainsString("CoversDefaultClassTest::test\nCould not find the tested class.", $output);
|
||||||
$this->assertNotContains("CoversNothingTest::test\nCould not find the tested class.", $output);
|
$this->assertStringNotContainsString("CoversNothingTest::test\nCould not find the tested class.", $output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class DebugCommandTest extends TestCase
|
|||||||
$ret = $tester->execute([], ['decorated' => false]);
|
$ret = $tester->execute([], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('Functions', trim($tester->getDisplay()));
|
$this->assertStringContainsString('Functions', trim($tester->getDisplay()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFilterAndJsonFormatOptions()
|
public function testFilterAndJsonFormatOptions()
|
||||||
@ -284,7 +284,7 @@ TXT
|
|||||||
$ret = $tester->execute(['name' => 'base.html.twig'], ['decorated' => false]);
|
$ret = $tester->execute(['name' => 'base.html.twig'], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('[OK]', $tester->getDisplay());
|
$this->assertStringContainsString('[OK]', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithGlobals()
|
public function testWithGlobals()
|
||||||
@ -293,7 +293,7 @@ TXT
|
|||||||
$tester = $this->createCommandTester([], [], null, null, false, ['message' => $message]);
|
$tester = $this->createCommandTester([], [], null, null, false, ['message' => $message]);
|
||||||
$tester->execute([], ['decorated' => true]);
|
$tester->execute([], ['decorated' => true]);
|
||||||
$display = $tester->getDisplay();
|
$display = $tester->getDisplay();
|
||||||
$this->assertContains(json_encode($message), $display);
|
$this->assertStringContainsString(json_encode($message), $display);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithGlobalsJson()
|
public function testWithGlobalsJson()
|
||||||
|
@ -31,7 +31,7 @@ class LintCommandTest extends TestCase
|
|||||||
$ret = $tester->execute(['filename' => [$filename]], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false]);
|
$ret = $tester->execute(['filename' => [$filename]], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('OK in', trim($tester->getDisplay()));
|
$this->assertStringContainsString('OK in', trim($tester->getDisplay()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLintIncorrectFile()
|
public function testLintIncorrectFile()
|
||||||
|
@ -29,7 +29,7 @@ class RouterMatchCommandTest extends TestCase
|
|||||||
$ret = $tester->execute(['path_info' => '/foo', 'foo'], ['decorated' => false]);
|
$ret = $tester->execute(['path_info' => '/foo', 'foo'], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('Route Name | foo', $tester->getDisplay());
|
$this->assertStringContainsString('Route Name | foo', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithNotMatchPath()
|
public function testWithNotMatchPath()
|
||||||
@ -38,7 +38,7 @@ class RouterMatchCommandTest extends TestCase
|
|||||||
$ret = $tester->execute(['path_info' => '/test', 'foo'], ['decorated' => false]);
|
$ret = $tester->execute(['path_info' => '/test', 'foo'], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(1, $ret, 'Returns 1 in case of failure');
|
$this->assertEquals(1, $ret, 'Returns 1 in case of failure');
|
||||||
$this->assertContains('None of the routes match the path "/test"', $tester->getDisplay());
|
$this->assertStringContainsString('None of the routes match the path "/test"', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,7 +41,7 @@ class YamlLintCommandTest extends TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->assertEquals(0, $tester->getStatusCode(), 'Returns 0 in case of success');
|
$this->assertEquals(0, $tester->getStatusCode(), 'Returns 0 in case of success');
|
||||||
$this->assertContains('OK', trim($tester->getDisplay()));
|
$this->assertStringContainsString('OK', trim($tester->getDisplay()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLintIncorrectFile()
|
public function testLintIncorrectFile()
|
||||||
@ -55,7 +55,7 @@ bar';
|
|||||||
$tester->execute(['filename' => $filename], ['decorated' => false]);
|
$tester->execute(['filename' => $filename], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(1, $tester->getStatusCode(), 'Returns 1 in case of error');
|
$this->assertEquals(1, $tester->getStatusCode(), 'Returns 1 in case of error');
|
||||||
$this->assertContains('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay()));
|
$this->assertStringContainsString('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLintFileNotReadable()
|
public function testLintFileNotReadable()
|
||||||
@ -106,7 +106,7 @@ EOF;
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->assertEquals(0, $tester->getStatusCode(), 'Returns 0 in case of success');
|
$this->assertEquals(0, $tester->getStatusCode(), 'Returns 0 in case of success');
|
||||||
$this->assertContains('[OK] All 0 YAML files contain valid syntax', trim($tester->getDisplay()));
|
$this->assertStringContainsString('[OK] All 0 YAML files contain valid syntax', trim($tester->getDisplay()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -167,9 +167,9 @@ class ApplicationTest extends TestCase
|
|||||||
$output = $tester->getDisplay();
|
$output = $tester->getDisplay();
|
||||||
|
|
||||||
$this->assertSame(0, $tester->getStatusCode());
|
$this->assertSame(0, $tester->getStatusCode());
|
||||||
$this->assertContains('Some commands could not be registered:', $output);
|
$this->assertStringContainsString('Some commands could not be registered:', $output);
|
||||||
$this->assertContains('throwing', $output);
|
$this->assertStringContainsString('throwing', $output);
|
||||||
$this->assertContains('fine', $output);
|
$this->assertStringContainsString('fine', $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRegistrationErrorsAreDisplayedOnCommandNotFound()
|
public function testRegistrationErrorsAreDisplayedOnCommandNotFound()
|
||||||
@ -195,8 +195,8 @@ class ApplicationTest extends TestCase
|
|||||||
$output = $tester->getDisplay();
|
$output = $tester->getDisplay();
|
||||||
|
|
||||||
$this->assertSame(1, $tester->getStatusCode());
|
$this->assertSame(1, $tester->getStatusCode());
|
||||||
$this->assertContains('Some commands could not be registered:', $output);
|
$this->assertStringContainsString('Some commands could not be registered:', $output);
|
||||||
$this->assertContains('Command "fine" is not defined.', $output);
|
$this->assertStringContainsString('Command "fine" is not defined.', $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRunOnlyWarnsOnUnregistrableCommandAtTheEnd()
|
public function testRunOnlyWarnsOnUnregistrableCommandAtTheEnd()
|
||||||
|
@ -129,9 +129,9 @@ class ControllerNameParserTest extends TestCase
|
|||||||
|
|
||||||
if (false === $suggestedBundleName) {
|
if (false === $suggestedBundleName) {
|
||||||
// make sure we don't have a suggestion
|
// make sure we don't have a suggestion
|
||||||
$this->assertNotContains('Did you mean', $e->getMessage());
|
$this->assertStringNotContainsString('Did you mean', $e->getMessage());
|
||||||
} else {
|
} else {
|
||||||
$this->assertContains(sprintf('Did you mean "%s"', $suggestedBundleName), $e->getMessage());
|
$this->assertStringContainsString(sprintf('Did you mean "%s"', $suggestedBundleName), $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -187,8 +187,8 @@ abstract class ControllerTraitTest extends TestCase
|
|||||||
if ($response->headers->get('content-type')) {
|
if ($response->headers->get('content-type')) {
|
||||||
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
||||||
}
|
}
|
||||||
$this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition'));
|
$this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition'));
|
||||||
$this->assertContains(basename(__FILE__), $response->headers->get('content-disposition'));
|
$this->assertStringContainsString(basename(__FILE__), $response->headers->get('content-disposition'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFileAsInline()
|
public function testFileAsInline()
|
||||||
@ -203,8 +203,8 @@ abstract class ControllerTraitTest extends TestCase
|
|||||||
if ($response->headers->get('content-type')) {
|
if ($response->headers->get('content-type')) {
|
||||||
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
||||||
}
|
}
|
||||||
$this->assertContains(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition'));
|
$this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition'));
|
||||||
$this->assertContains(basename(__FILE__), $response->headers->get('content-disposition'));
|
$this->assertStringContainsString(basename(__FILE__), $response->headers->get('content-disposition'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFileWithOwnFileName()
|
public function testFileWithOwnFileName()
|
||||||
@ -220,8 +220,8 @@ abstract class ControllerTraitTest extends TestCase
|
|||||||
if ($response->headers->get('content-type')) {
|
if ($response->headers->get('content-type')) {
|
||||||
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
||||||
}
|
}
|
||||||
$this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition'));
|
$this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition'));
|
||||||
$this->assertContains($fileName, $response->headers->get('content-disposition'));
|
$this->assertStringContainsString($fileName, $response->headers->get('content-disposition'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFileWithOwnFileNameAsInline()
|
public function testFileWithOwnFileNameAsInline()
|
||||||
@ -237,8 +237,8 @@ abstract class ControllerTraitTest extends TestCase
|
|||||||
if ($response->headers->get('content-type')) {
|
if ($response->headers->get('content-type')) {
|
||||||
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
||||||
}
|
}
|
||||||
$this->assertContains(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition'));
|
$this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition'));
|
||||||
$this->assertContains($fileName, $response->headers->get('content-disposition'));
|
$this->assertStringContainsString($fileName, $response->headers->get('content-disposition'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFileFromPath()
|
public function testFileFromPath()
|
||||||
@ -253,8 +253,8 @@ abstract class ControllerTraitTest extends TestCase
|
|||||||
if ($response->headers->get('content-type')) {
|
if ($response->headers->get('content-type')) {
|
||||||
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
||||||
}
|
}
|
||||||
$this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition'));
|
$this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition'));
|
||||||
$this->assertContains(basename(__FILE__), $response->headers->get('content-disposition'));
|
$this->assertStringContainsString(basename(__FILE__), $response->headers->get('content-disposition'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFileFromPathWithCustomizedFileName()
|
public function testFileFromPathWithCustomizedFileName()
|
||||||
@ -269,8 +269,8 @@ abstract class ControllerTraitTest extends TestCase
|
|||||||
if ($response->headers->get('content-type')) {
|
if ($response->headers->get('content-type')) {
|
||||||
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
$this->assertSame('text/x-php', $response->headers->get('content-type'));
|
||||||
}
|
}
|
||||||
$this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition'));
|
$this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition'));
|
||||||
$this->assertContains('test.php', $response->headers->get('content-disposition'));
|
$this->assertStringContainsString('test.php', $response->headers->get('content-disposition'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFileWhichDoesNotExist()
|
public function testFileWhichDoesNotExist()
|
||||||
|
@ -1096,9 +1096,9 @@ abstract class FrameworkExtensionTest extends TestCase
|
|||||||
|
|
||||||
$this->assertSame('addYamlMappings', $calls[4][0]);
|
$this->assertSame('addYamlMappings', $calls[4][0]);
|
||||||
$this->assertCount(3, $calls[4][1][0]);
|
$this->assertCount(3, $calls[4][1][0]);
|
||||||
$this->assertContains('foo.yml', $calls[4][1][0][0]);
|
$this->assertStringContainsString('foo.yml', $calls[4][1][0][0]);
|
||||||
$this->assertContains('validation.yml', $calls[4][1][0][1]);
|
$this->assertStringContainsString('validation.yml', $calls[4][1][0][1]);
|
||||||
$this->assertContains('validation.yaml', $calls[4][1][0][2]);
|
$this->assertStringContainsString('validation.yaml', $calls[4][1][0][2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testValidationAutoMapping()
|
public function testValidationAutoMapping()
|
||||||
|
@ -31,8 +31,8 @@ class CachePoolClearCommandTest extends AbstractWebTestCase
|
|||||||
$tester->execute(['pools' => ['cache.private_pool']], ['decorated' => false]);
|
$tester->execute(['pools' => ['cache.private_pool']], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertSame(0, $tester->getStatusCode(), 'cache:pool:clear exits with 0 in case of success');
|
$this->assertSame(0, $tester->getStatusCode(), 'cache:pool:clear exits with 0 in case of success');
|
||||||
$this->assertContains('Clearing cache pool: cache.private_pool', $tester->getDisplay());
|
$this->assertStringContainsString('Clearing cache pool: cache.private_pool', $tester->getDisplay());
|
||||||
$this->assertContains('[OK] Cache was successfully cleared.', $tester->getDisplay());
|
$this->assertStringContainsString('[OK] Cache was successfully cleared.', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testClearPublicPool()
|
public function testClearPublicPool()
|
||||||
@ -41,8 +41,8 @@ class CachePoolClearCommandTest extends AbstractWebTestCase
|
|||||||
$tester->execute(['pools' => ['cache.public_pool']], ['decorated' => false]);
|
$tester->execute(['pools' => ['cache.public_pool']], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertSame(0, $tester->getStatusCode(), 'cache:pool:clear exits with 0 in case of success');
|
$this->assertSame(0, $tester->getStatusCode(), 'cache:pool:clear exits with 0 in case of success');
|
||||||
$this->assertContains('Clearing cache pool: cache.public_pool', $tester->getDisplay());
|
$this->assertStringContainsString('Clearing cache pool: cache.public_pool', $tester->getDisplay());
|
||||||
$this->assertContains('[OK] Cache was successfully cleared.', $tester->getDisplay());
|
$this->assertStringContainsString('[OK] Cache was successfully cleared.', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testClearPoolWithCustomClearer()
|
public function testClearPoolWithCustomClearer()
|
||||||
@ -51,8 +51,8 @@ class CachePoolClearCommandTest extends AbstractWebTestCase
|
|||||||
$tester->execute(['pools' => ['cache.pool_with_clearer']], ['decorated' => false]);
|
$tester->execute(['pools' => ['cache.pool_with_clearer']], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertSame(0, $tester->getStatusCode(), 'cache:pool:clear exits with 0 in case of success');
|
$this->assertSame(0, $tester->getStatusCode(), 'cache:pool:clear exits with 0 in case of success');
|
||||||
$this->assertContains('Clearing cache pool: cache.pool_with_clearer', $tester->getDisplay());
|
$this->assertStringContainsString('Clearing cache pool: cache.pool_with_clearer', $tester->getDisplay());
|
||||||
$this->assertContains('[OK] Cache was successfully cleared.', $tester->getDisplay());
|
$this->assertStringContainsString('[OK] Cache was successfully cleared.', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCallClearer()
|
public function testCallClearer()
|
||||||
@ -61,8 +61,8 @@ class CachePoolClearCommandTest extends AbstractWebTestCase
|
|||||||
$tester->execute(['pools' => ['cache.app_clearer']], ['decorated' => false]);
|
$tester->execute(['pools' => ['cache.app_clearer']], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertSame(0, $tester->getStatusCode(), 'cache:pool:clear exits with 0 in case of success');
|
$this->assertSame(0, $tester->getStatusCode(), 'cache:pool:clear exits with 0 in case of success');
|
||||||
$this->assertContains('Calling cache clearer: cache.app_clearer', $tester->getDisplay());
|
$this->assertStringContainsString('Calling cache clearer: cache.app_clearer', $tester->getDisplay());
|
||||||
$this->assertContains('[OK] Cache was successfully cleared.', $tester->getDisplay());
|
$this->assertStringContainsString('[OK] Cache was successfully cleared.', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testClearUnexistingPool()
|
public function testClearUnexistingPool()
|
||||||
|
@ -36,7 +36,7 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
|
|||||||
$ret = $tester->execute(['name' => 'TestBundle']);
|
$ret = $tester->execute(['name' => 'TestBundle']);
|
||||||
|
|
||||||
$this->assertSame(0, $ret, 'Returns 0 in case of success');
|
$this->assertSame(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('custom: foo', $tester->getDisplay());
|
$this->assertStringContainsString('custom: foo', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDumpBundleOption()
|
public function testDumpBundleOption()
|
||||||
@ -45,7 +45,7 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
|
|||||||
$ret = $tester->execute(['name' => 'TestBundle', 'path' => 'custom']);
|
$ret = $tester->execute(['name' => 'TestBundle', 'path' => 'custom']);
|
||||||
|
|
||||||
$this->assertSame(0, $ret, 'Returns 0 in case of success');
|
$this->assertSame(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('foo', $tester->getDisplay());
|
$this->assertStringContainsString('foo', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testParametersValuesAreResolved()
|
public function testParametersValuesAreResolved()
|
||||||
@ -54,8 +54,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
|
|||||||
$ret = $tester->execute(['name' => 'framework']);
|
$ret = $tester->execute(['name' => 'framework']);
|
||||||
|
|
||||||
$this->assertSame(0, $ret, 'Returns 0 in case of success');
|
$this->assertSame(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains("locale: '%env(LOCALE)%'", $tester->getDisplay());
|
$this->assertStringContainsString("locale: '%env(LOCALE)%'", $tester->getDisplay());
|
||||||
$this->assertContains('secret: test', $tester->getDisplay());
|
$this->assertStringContainsString('secret: test', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDumpUndefinedBundleOption()
|
public function testDumpUndefinedBundleOption()
|
||||||
@ -63,7 +63,7 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
|
|||||||
$tester = $this->createCommandTester();
|
$tester = $this->createCommandTester();
|
||||||
$tester->execute(['name' => 'TestBundle', 'path' => 'foo']);
|
$tester->execute(['name' => 'TestBundle', 'path' => 'foo']);
|
||||||
|
|
||||||
$this->assertContains('Unable to find configuration for "test.foo"', $tester->getDisplay());
|
$this->assertStringContainsString('Unable to find configuration for "test.foo"', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDumpWithPrefixedEnv()
|
public function testDumpWithPrefixedEnv()
|
||||||
|
@ -36,8 +36,8 @@ class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
|
|||||||
$ret = $tester->execute(['name' => 'TestBundle']);
|
$ret = $tester->execute(['name' => 'TestBundle']);
|
||||||
|
|
||||||
$this->assertSame(0, $ret, 'Returns 0 in case of success');
|
$this->assertSame(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('test:', $tester->getDisplay());
|
$this->assertStringContainsString('test:', $tester->getDisplay());
|
||||||
$this->assertContains(' custom:', $tester->getDisplay());
|
$this->assertStringContainsString(' custom:', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDumpAtPath()
|
public function testDumpAtPath()
|
||||||
@ -70,7 +70,7 @@ EOL
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertSame(1, $ret);
|
$this->assertSame(1, $ret);
|
||||||
$this->assertContains('[ERROR] The "path" option is only available for the "yaml" format.', $tester->getDisplay());
|
$this->assertStringContainsString('[ERROR] The "path" option is only available for the "yaml" format.', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +45,7 @@ class ContainerDebugCommandTest extends AbstractWebTestCase
|
|||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'debug:container']);
|
$tester->run(['command' => 'debug:container']);
|
||||||
|
|
||||||
$this->assertContains('public', $tester->getDisplay());
|
$this->assertStringContainsString('public', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testPrivateAlias()
|
public function testPrivateAlias()
|
||||||
|
@ -29,8 +29,8 @@ class DebugAutowiringCommandTest extends AbstractWebTestCase
|
|||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'debug:autowiring']);
|
$tester->run(['command' => 'debug:autowiring']);
|
||||||
|
|
||||||
$this->assertContains('Symfony\Component\HttpKernel\HttpKernelInterface', $tester->getDisplay());
|
$this->assertStringContainsString('Symfony\Component\HttpKernel\HttpKernelInterface', $tester->getDisplay());
|
||||||
$this->assertContains('(http_kernel)', $tester->getDisplay());
|
$this->assertStringContainsString('(http_kernel)', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSearchArgument()
|
public function testSearchArgument()
|
||||||
@ -43,8 +43,8 @@ class DebugAutowiringCommandTest extends AbstractWebTestCase
|
|||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'debug:autowiring', 'search' => 'kern']);
|
$tester->run(['command' => 'debug:autowiring', 'search' => 'kern']);
|
||||||
|
|
||||||
$this->assertContains('Symfony\Component\HttpKernel\HttpKernelInterface', $tester->getDisplay());
|
$this->assertStringContainsString('Symfony\Component\HttpKernel\HttpKernelInterface', $tester->getDisplay());
|
||||||
$this->assertNotContains('Symfony\Component\Routing\RouterInterface', $tester->getDisplay());
|
$this->assertStringNotContainsString('Symfony\Component\Routing\RouterInterface', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSearchIgnoreBackslashWhenFindingService()
|
public function testSearchIgnoreBackslashWhenFindingService()
|
||||||
@ -69,7 +69,7 @@ class DebugAutowiringCommandTest extends AbstractWebTestCase
|
|||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'debug:autowiring', 'search' => 'foo_fake'], ['capture_stderr_separately' => true]);
|
$tester->run(['command' => 'debug:autowiring', 'search' => 'foo_fake'], ['capture_stderr_separately' => true]);
|
||||||
|
|
||||||
$this->assertContains('No autowirable classes or interfaces found matching "foo_fake"', $tester->getErrorOutput());
|
$this->assertStringContainsString('No autowirable classes or interfaces found matching "foo_fake"', $tester->getErrorOutput());
|
||||||
$this->assertEquals(1, $tester->getStatusCode());
|
$this->assertEquals(1, $tester->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,23 +27,23 @@ class SessionTest extends AbstractWebTestCase
|
|||||||
|
|
||||||
// no session
|
// no session
|
||||||
$crawler = $client->request('GET', '/session');
|
$crawler = $client->request('GET', '/session');
|
||||||
$this->assertContains('You are new here and gave no name.', $crawler->text());
|
$this->assertStringContainsString('You are new here and gave no name.', $crawler->text());
|
||||||
|
|
||||||
// remember name
|
// remember name
|
||||||
$crawler = $client->request('GET', '/session/drak');
|
$crawler = $client->request('GET', '/session/drak');
|
||||||
$this->assertContains('Hello drak, nice to meet you.', $crawler->text());
|
$this->assertStringContainsString('Hello drak, nice to meet you.', $crawler->text());
|
||||||
|
|
||||||
// prove remembered name
|
// prove remembered name
|
||||||
$crawler = $client->request('GET', '/session');
|
$crawler = $client->request('GET', '/session');
|
||||||
$this->assertContains('Welcome back drak, nice to meet you.', $crawler->text());
|
$this->assertStringContainsString('Welcome back drak, nice to meet you.', $crawler->text());
|
||||||
|
|
||||||
// clear session
|
// clear session
|
||||||
$crawler = $client->request('GET', '/session_logout');
|
$crawler = $client->request('GET', '/session_logout');
|
||||||
$this->assertContains('Session cleared.', $crawler->text());
|
$this->assertStringContainsString('Session cleared.', $crawler->text());
|
||||||
|
|
||||||
// prove cleared session
|
// prove cleared session
|
||||||
$crawler = $client->request('GET', '/session');
|
$crawler = $client->request('GET', '/session');
|
||||||
$this->assertContains('You are new here and gave no name.', $crawler->text());
|
$this->assertStringContainsString('You are new here and gave no name.', $crawler->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,11 +62,11 @@ class SessionTest extends AbstractWebTestCase
|
|||||||
$crawler = $client->request('GET', '/session_setflash/Hello%20world.');
|
$crawler = $client->request('GET', '/session_setflash/Hello%20world.');
|
||||||
|
|
||||||
// check flash displays on redirect
|
// check flash displays on redirect
|
||||||
$this->assertContains('Hello world.', $client->followRedirect()->text());
|
$this->assertStringContainsString('Hello world.', $client->followRedirect()->text());
|
||||||
|
|
||||||
// check flash is gone
|
// check flash is gone
|
||||||
$crawler = $client->request('GET', '/session_showflash');
|
$crawler = $client->request('GET', '/session_showflash');
|
||||||
$this->assertContains('No flash was set.', $crawler->text());
|
$this->assertStringContainsString('No flash was set.', $crawler->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,39 +93,39 @@ class SessionTest extends AbstractWebTestCase
|
|||||||
|
|
||||||
// new session, so no name set.
|
// new session, so no name set.
|
||||||
$crawler1 = $client1->request('GET', '/session');
|
$crawler1 = $client1->request('GET', '/session');
|
||||||
$this->assertContains('You are new here and gave no name.', $crawler1->text());
|
$this->assertStringContainsString('You are new here and gave no name.', $crawler1->text());
|
||||||
|
|
||||||
// set name of client1
|
// set name of client1
|
||||||
$crawler1 = $client1->request('GET', '/session/client1');
|
$crawler1 = $client1->request('GET', '/session/client1');
|
||||||
$this->assertContains('Hello client1, nice to meet you.', $crawler1->text());
|
$this->assertStringContainsString('Hello client1, nice to meet you.', $crawler1->text());
|
||||||
|
|
||||||
// no session for client2
|
// no session for client2
|
||||||
$crawler2 = $client2->request('GET', '/session');
|
$crawler2 = $client2->request('GET', '/session');
|
||||||
$this->assertContains('You are new here and gave no name.', $crawler2->text());
|
$this->assertStringContainsString('You are new here and gave no name.', $crawler2->text());
|
||||||
|
|
||||||
// remember name client2
|
// remember name client2
|
||||||
$crawler2 = $client2->request('GET', '/session/client2');
|
$crawler2 = $client2->request('GET', '/session/client2');
|
||||||
$this->assertContains('Hello client2, nice to meet you.', $crawler2->text());
|
$this->assertStringContainsString('Hello client2, nice to meet you.', $crawler2->text());
|
||||||
|
|
||||||
// prove remembered name of client1
|
// prove remembered name of client1
|
||||||
$crawler1 = $client1->request('GET', '/session');
|
$crawler1 = $client1->request('GET', '/session');
|
||||||
$this->assertContains('Welcome back client1, nice to meet you.', $crawler1->text());
|
$this->assertStringContainsString('Welcome back client1, nice to meet you.', $crawler1->text());
|
||||||
|
|
||||||
// prove remembered name of client2
|
// prove remembered name of client2
|
||||||
$crawler2 = $client2->request('GET', '/session');
|
$crawler2 = $client2->request('GET', '/session');
|
||||||
$this->assertContains('Welcome back client2, nice to meet you.', $crawler2->text());
|
$this->assertStringContainsString('Welcome back client2, nice to meet you.', $crawler2->text());
|
||||||
|
|
||||||
// clear client1
|
// clear client1
|
||||||
$crawler1 = $client1->request('GET', '/session_logout');
|
$crawler1 = $client1->request('GET', '/session_logout');
|
||||||
$this->assertContains('Session cleared.', $crawler1->text());
|
$this->assertStringContainsString('Session cleared.', $crawler1->text());
|
||||||
|
|
||||||
// prove client1 data is cleared
|
// prove client1 data is cleared
|
||||||
$crawler1 = $client1->request('GET', '/session');
|
$crawler1 = $client1->request('GET', '/session');
|
||||||
$this->assertContains('You are new here and gave no name.', $crawler1->text());
|
$this->assertStringContainsString('You are new here and gave no name.', $crawler1->text());
|
||||||
|
|
||||||
// prove remembered name of client2 remains untouched.
|
// prove remembered name of client2 remains untouched.
|
||||||
$crawler2 = $client2->request('GET', '/session');
|
$crawler2 = $client2->request('GET', '/session');
|
||||||
$this->assertContains('Welcome back client2, nice to meet you.', $crawler2->text());
|
$this->assertStringContainsString('Welcome back client2, nice to meet you.', $crawler2->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,7 +72,7 @@ class TemplateLocatorTest extends TestCase
|
|||||||
$locator->locate($template);
|
$locator->locate($template);
|
||||||
$this->fail('->locate() should throw an exception when the file is not found.');
|
$this->fail('->locate() should throw an exception when the file is not found.');
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
$this->assertContains(
|
$this->assertStringContainsString(
|
||||||
$errorMessage,
|
$errorMessage,
|
||||||
$e->getMessage(),
|
$e->getMessage(),
|
||||||
'TemplateLocator exception should propagate the FileLocator exception message'
|
'TemplateLocator exception should propagate the FileLocator exception message'
|
||||||
|
@ -30,12 +30,12 @@ class CsrfFormLoginTest extends AbstractWebTestCase
|
|||||||
$crawler = $client->followRedirect();
|
$crawler = $client->followRedirect();
|
||||||
|
|
||||||
$text = $crawler->text();
|
$text = $crawler->text();
|
||||||
$this->assertContains('Hello johannes!', $text);
|
$this->assertStringContainsString('Hello johannes!', $text);
|
||||||
$this->assertContains('You\'re browsing to path "/profile".', $text);
|
$this->assertStringContainsString('You\'re browsing to path "/profile".', $text);
|
||||||
|
|
||||||
$logoutLinks = $crawler->selectLink('Log out')->links();
|
$logoutLinks = $crawler->selectLink('Log out')->links();
|
||||||
$this->assertCount(2, $logoutLinks);
|
$this->assertCount(2, $logoutLinks);
|
||||||
$this->assertContains('_csrf_token=', $logoutLinks[0]->getUri());
|
$this->assertStringContainsString('_csrf_token=', $logoutLinks[0]->getUri());
|
||||||
$this->assertSame($logoutLinks[0]->getUri(), $logoutLinks[1]->getUri());
|
$this->assertSame($logoutLinks[0]->getUri(), $logoutLinks[1]->getUri());
|
||||||
|
|
||||||
$client->click($logoutLinks[0]);
|
$client->click($logoutLinks[0]);
|
||||||
@ -57,7 +57,7 @@ class CsrfFormLoginTest extends AbstractWebTestCase
|
|||||||
$this->assertRedirect($client->getResponse(), '/login');
|
$this->assertRedirect($client->getResponse(), '/login');
|
||||||
|
|
||||||
$text = $client->followRedirect()->text();
|
$text = $client->followRedirect()->text();
|
||||||
$this->assertContains('Invalid CSRF token.', $text);
|
$this->assertStringContainsString('Invalid CSRF token.', $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,8 +76,8 @@ class CsrfFormLoginTest extends AbstractWebTestCase
|
|||||||
$this->assertRedirect($client->getResponse(), '/foo');
|
$this->assertRedirect($client->getResponse(), '/foo');
|
||||||
|
|
||||||
$text = $client->followRedirect()->text();
|
$text = $client->followRedirect()->text();
|
||||||
$this->assertContains('Hello johannes!', $text);
|
$this->assertStringContainsString('Hello johannes!', $text);
|
||||||
$this->assertContains('You\'re browsing to path "/foo".', $text);
|
$this->assertStringContainsString('You\'re browsing to path "/foo".', $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -97,8 +97,8 @@ class CsrfFormLoginTest extends AbstractWebTestCase
|
|||||||
$this->assertRedirect($client->getResponse(), '/protected-resource');
|
$this->assertRedirect($client->getResponse(), '/protected-resource');
|
||||||
|
|
||||||
$text = $client->followRedirect()->text();
|
$text = $client->followRedirect()->text();
|
||||||
$this->assertContains('Hello johannes!', $text);
|
$this->assertStringContainsString('Hello johannes!', $text);
|
||||||
$this->assertContains('You\'re browsing to path "/protected-resource".', $text);
|
$this->assertStringContainsString('You\'re browsing to path "/protected-resource".', $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConfigs()
|
public function getConfigs()
|
||||||
|
@ -28,8 +28,8 @@ class FormLoginTest extends AbstractWebTestCase
|
|||||||
$this->assertRedirect($client->getResponse(), '/profile');
|
$this->assertRedirect($client->getResponse(), '/profile');
|
||||||
|
|
||||||
$text = $client->followRedirect()->text();
|
$text = $client->followRedirect()->text();
|
||||||
$this->assertContains('Hello johannes!', $text);
|
$this->assertStringContainsString('Hello johannes!', $text);
|
||||||
$this->assertContains('You\'re browsing to path "/profile".', $text);
|
$this->assertStringContainsString('You\'re browsing to path "/profile".', $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,8 +49,8 @@ class FormLoginTest extends AbstractWebTestCase
|
|||||||
$crawler = $client->followRedirect();
|
$crawler = $client->followRedirect();
|
||||||
$text = $crawler->text();
|
$text = $crawler->text();
|
||||||
|
|
||||||
$this->assertContains('Hello johannes!', $text);
|
$this->assertStringContainsString('Hello johannes!', $text);
|
||||||
$this->assertContains('You\'re browsing to path "/profile".', $text);
|
$this->assertStringContainsString('You\'re browsing to path "/profile".', $text);
|
||||||
|
|
||||||
$logoutLinks = $crawler->selectLink('Log out')->links();
|
$logoutLinks = $crawler->selectLink('Log out')->links();
|
||||||
$this->assertCount(6, $logoutLinks);
|
$this->assertCount(6, $logoutLinks);
|
||||||
@ -81,8 +81,8 @@ class FormLoginTest extends AbstractWebTestCase
|
|||||||
$this->assertRedirect($client->getResponse(), '/foo');
|
$this->assertRedirect($client->getResponse(), '/foo');
|
||||||
|
|
||||||
$text = $client->followRedirect()->text();
|
$text = $client->followRedirect()->text();
|
||||||
$this->assertContains('Hello johannes!', $text);
|
$this->assertStringContainsString('Hello johannes!', $text);
|
||||||
$this->assertContains('You\'re browsing to path "/foo".', $text);
|
$this->assertStringContainsString('You\'re browsing to path "/foo".', $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -102,8 +102,8 @@ class FormLoginTest extends AbstractWebTestCase
|
|||||||
$this->assertRedirect($client->getResponse(), '/protected_resource');
|
$this->assertRedirect($client->getResponse(), '/protected_resource');
|
||||||
|
|
||||||
$text = $client->followRedirect()->text();
|
$text = $client->followRedirect()->text();
|
||||||
$this->assertContains('Hello johannes!', $text);
|
$this->assertStringContainsString('Hello johannes!', $text);
|
||||||
$this->assertContains('You\'re browsing to path "/protected_resource".', $text);
|
$this->assertStringContainsString('You\'re browsing to path "/protected_resource".', $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConfigs()
|
public function getConfigs()
|
||||||
|
@ -51,7 +51,7 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
|||||||
'command' => 'security:encode-password',
|
'command' => 'security:encode-password',
|
||||||
], ['interactive' => false]);
|
], ['interactive' => false]);
|
||||||
|
|
||||||
$this->assertContains('[ERROR] The password must not be empty.', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringContainsString('[ERROR] The password must not be empty.', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
$this->assertEquals($statusCode, 1);
|
$this->assertEquals($statusCode, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
|||||||
], ['interactive' => false]);
|
], ['interactive' => false]);
|
||||||
|
|
||||||
$output = $this->passwordEncoderCommandTester->getDisplay();
|
$output = $this->passwordEncoderCommandTester->getDisplay();
|
||||||
$this->assertContains('Password encoding succeeded', $output);
|
$this->assertStringContainsString('Password encoding succeeded', $output);
|
||||||
|
|
||||||
$encoder = new BCryptPasswordEncoder(17);
|
$encoder = new BCryptPasswordEncoder(17);
|
||||||
preg_match('# Encoded password\s{1,}([\w+\/$.]+={0,2})\s+#', $output, $matches);
|
preg_match('# Encoded password\s{1,}([\w+\/$.]+={0,2})\s+#', $output, $matches);
|
||||||
@ -92,7 +92,7 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
|||||||
], ['interactive' => false]);
|
], ['interactive' => false]);
|
||||||
|
|
||||||
$output = $this->passwordEncoderCommandTester->getDisplay();
|
$output = $this->passwordEncoderCommandTester->getDisplay();
|
||||||
$this->assertContains('Password encoding succeeded', $output);
|
$this->assertStringContainsString('Password encoding succeeded', $output);
|
||||||
|
|
||||||
$encoder = new Argon2iPasswordEncoder();
|
$encoder = new Argon2iPasswordEncoder();
|
||||||
preg_match('# Encoded password\s+(\$argon2id?\$[\w,=\$+\/]+={0,2})\s+#', $output, $matches);
|
preg_match('# Encoded password\s+(\$argon2id?\$[\w,=\$+\/]+={0,2})\s+#', $output, $matches);
|
||||||
@ -146,7 +146,7 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
|||||||
], ['interactive' => false]);
|
], ['interactive' => false]);
|
||||||
|
|
||||||
$output = $this->passwordEncoderCommandTester->getDisplay();
|
$output = $this->passwordEncoderCommandTester->getDisplay();
|
||||||
$this->assertContains('Password encoding succeeded', $output);
|
$this->assertStringContainsString('Password encoding succeeded', $output);
|
||||||
|
|
||||||
$encoder = new Pbkdf2PasswordEncoder('sha512', true, 1000);
|
$encoder = new Pbkdf2PasswordEncoder('sha512', true, 1000);
|
||||||
preg_match('# Encoded password\s{1,}([\w+\/]+={0,2})\s+#', $output, $matches);
|
preg_match('# Encoded password\s{1,}([\w+\/]+={0,2})\s+#', $output, $matches);
|
||||||
@ -165,9 +165,9 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
|||||||
], ['interactive' => false]
|
], ['interactive' => false]
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertContains('Password encoding succeeded', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringContainsString('Password encoding succeeded', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
$this->assertContains(' Encoded password p@ssw0rd', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringContainsString(' Encoded password p@ssw0rd', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
$this->assertContains(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringContainsString(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEncodePasswordEmptySaltOutput()
|
public function testEncodePasswordEmptySaltOutput()
|
||||||
@ -179,9 +179,9 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
|||||||
'--empty-salt' => true,
|
'--empty-salt' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertContains('Password encoding succeeded', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringContainsString('Password encoding succeeded', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
$this->assertContains(' Encoded password p@ssw0rd', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringContainsString(' Encoded password p@ssw0rd', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
$this->assertNotContains(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringNotContainsString(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEncodePasswordNativeOutput()
|
public function testEncodePasswordNativeOutput()
|
||||||
@ -192,7 +192,7 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
|||||||
'user-class' => 'Custom\Class\Native\User',
|
'user-class' => 'Custom\Class\Native\User',
|
||||||
], ['interactive' => false]);
|
], ['interactive' => false]);
|
||||||
|
|
||||||
$this->assertNotContains(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringNotContainsString(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -211,7 +211,7 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
|||||||
'user-class' => 'Custom\Class\Argon2i\User',
|
'user-class' => 'Custom\Class\Argon2i\User',
|
||||||
], ['interactive' => false]);
|
], ['interactive' => false]);
|
||||||
|
|
||||||
$this->assertNotContains(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringNotContainsString(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEncodePasswordSodiumOutput()
|
public function testEncodePasswordSodiumOutput()
|
||||||
@ -250,7 +250,7 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
|||||||
'password' => 'password',
|
'password' => 'password',
|
||||||
], ['decorated' => false]);
|
], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertContains(<<<EOTXT
|
$this->assertStringContainsString(<<<EOTXT
|
||||||
For which user class would you like to encode a password? [Custom\Class\Native\User]:
|
For which user class would you like to encode a password? [Custom\Class\Native\User]:
|
||||||
[0] Custom\Class\Native\User
|
[0] Custom\Class\Native\User
|
||||||
[1] Custom\Class\Pbkdf2\User
|
[1] Custom\Class\Pbkdf2\User
|
||||||
@ -267,7 +267,7 @@ EOTXT
|
|||||||
'password' => 'password',
|
'password' => 'password',
|
||||||
], ['interactive' => false]);
|
], ['interactive' => false]);
|
||||||
|
|
||||||
$this->assertContains('Encoder used Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder', $this->passwordEncoderCommandTester->getDisplay());
|
$this->assertStringContainsString('Encoder used Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder', $this->passwordEncoderCommandTester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testThrowsExceptionOnNoConfiguredEncoders()
|
public function testThrowsExceptionOnNoConfiguredEncoders()
|
||||||
|
@ -27,7 +27,7 @@ class NoTemplatingEntryTest extends TestCase
|
|||||||
|
|
||||||
$container = $kernel->getContainer();
|
$container = $kernel->getContainer();
|
||||||
$content = $container->get('twig')->render('index.html.twig');
|
$content = $container->get('twig')->render('index.html.twig');
|
||||||
$this->assertContains('{ a: b }', $content);
|
$this->assertStringContainsString('{ a: b }', $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
|
@ -24,28 +24,28 @@ class XmlUtilsTest extends TestCase
|
|||||||
XmlUtils::loadFile($fixtures.'invalid.xml');
|
XmlUtils::loadFile($fixtures.'invalid.xml');
|
||||||
$this->fail();
|
$this->fail();
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
$this->assertContains('ERROR 77', $e->getMessage());
|
$this->assertStringContainsString('ERROR 77', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
XmlUtils::loadFile($fixtures.'document_type.xml');
|
XmlUtils::loadFile($fixtures.'document_type.xml');
|
||||||
$this->fail();
|
$this->fail();
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
$this->assertContains('Document types are not allowed', $e->getMessage());
|
$this->assertStringContainsString('Document types are not allowed', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
XmlUtils::loadFile($fixtures.'invalid_schema.xml', $fixtures.'schema.xsd');
|
XmlUtils::loadFile($fixtures.'invalid_schema.xml', $fixtures.'schema.xsd');
|
||||||
$this->fail();
|
$this->fail();
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
$this->assertContains('ERROR 1845', $e->getMessage());
|
$this->assertStringContainsString('ERROR 1845', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
XmlUtils::loadFile($fixtures.'invalid_schema.xml', 'invalid_callback_or_file');
|
XmlUtils::loadFile($fixtures.'invalid_schema.xml', 'invalid_callback_or_file');
|
||||||
$this->fail();
|
$this->fail();
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
$this->assertContains('XSD file or callable', $e->getMessage());
|
$this->assertStringContainsString('XSD file or callable', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
$mock = $this->getMockBuilder(__NAMESPACE__.'\Validator')->getMock();
|
$mock = $this->getMockBuilder(__NAMESPACE__.'\Validator')->getMock();
|
||||||
|
@ -184,7 +184,7 @@ class ApplicationTest extends TestCase
|
|||||||
|
|
||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['test']);
|
$tester->run(['test']);
|
||||||
$this->assertContains('It works!', $tester->getDisplay(true));
|
$this->assertStringContainsString('It works!', $tester->getDisplay(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAdd()
|
public function testAdd()
|
||||||
@ -753,7 +753,7 @@ class ApplicationTest extends TestCase
|
|||||||
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exception');
|
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exception');
|
||||||
|
|
||||||
$tester->run(['command' => 'foo'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true]);
|
$tester->run(['command' => 'foo'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true]);
|
||||||
$this->assertContains('Exception trace', $tester->getErrorOutput(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose');
|
$this->assertStringContainsString('Exception trace', $tester->getErrorOutput(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose');
|
||||||
|
|
||||||
$tester->run(['command' => 'list', '--foo' => true], ['decorated' => false, 'capture_stderr_separately' => true]);
|
$tester->run(['command' => 'list', '--foo' => true], ['decorated' => false, 'capture_stderr_separately' => true]);
|
||||||
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getErrorOutput(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command');
|
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getErrorOutput(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command');
|
||||||
@ -890,7 +890,7 @@ class ApplicationTest extends TestCase
|
|||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
|
|
||||||
$tester->run(['command' => 'foo'], ['decorated' => false]);
|
$tester->run(['command' => 'foo'], ['decorated' => false]);
|
||||||
$this->assertContains('Dummy type "@anonymous" is invalid.', $tester->getDisplay(true));
|
$this->assertStringContainsString('Dummy type "@anonymous" is invalid.', $tester->getDisplay(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRun()
|
public function testRun()
|
||||||
@ -1315,7 +1315,7 @@ class ApplicationTest extends TestCase
|
|||||||
|
|
||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'foo']);
|
$tester->run(['command' => 'foo']);
|
||||||
$this->assertContains('before.foo.error.after.', $tester->getDisplay());
|
$this->assertStringContainsString('before.foo.error.after.', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRunDispatchesAllEventsWithExceptionInListener()
|
public function testRunDispatchesAllEventsWithExceptionInListener()
|
||||||
@ -1335,7 +1335,7 @@ class ApplicationTest extends TestCase
|
|||||||
|
|
||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'foo']);
|
$tester->run(['command' => 'foo']);
|
||||||
$this->assertContains('before.error.after.', $tester->getDisplay());
|
$this->assertStringContainsString('before.error.after.', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRunWithError()
|
public function testRunWithError()
|
||||||
@ -1383,7 +1383,7 @@ class ApplicationTest extends TestCase
|
|||||||
|
|
||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'foo']);
|
$tester->run(['command' => 'foo']);
|
||||||
$this->assertContains('before.error.silenced.after.', $tester->getDisplay());
|
$this->assertStringContainsString('before.error.silenced.after.', $tester->getDisplay());
|
||||||
$this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $tester->getStatusCode());
|
$this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $tester->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1402,7 +1402,7 @@ class ApplicationTest extends TestCase
|
|||||||
|
|
||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'unknown']);
|
$tester->run(['command' => 'unknown']);
|
||||||
$this->assertContains('silenced command not found', $tester->getDisplay());
|
$this->assertStringContainsString('silenced command not found', $tester->getDisplay());
|
||||||
$this->assertEquals(1, $tester->getStatusCode());
|
$this->assertEquals(1, $tester->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1444,7 +1444,7 @@ class ApplicationTest extends TestCase
|
|||||||
|
|
||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'dym']);
|
$tester->run(['command' => 'dym']);
|
||||||
$this->assertContains('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events');
|
$this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRunDispatchesAllEventsWithError()
|
public function testRunDispatchesAllEventsWithError()
|
||||||
@ -1461,7 +1461,7 @@ class ApplicationTest extends TestCase
|
|||||||
|
|
||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$tester->run(['command' => 'dym']);
|
$tester->run(['command' => 'dym']);
|
||||||
$this->assertContains('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events');
|
$this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRunWithErrorFailingStatusCode()
|
public function testRunWithErrorFailingStatusCode()
|
||||||
@ -1493,7 +1493,7 @@ class ApplicationTest extends TestCase
|
|||||||
|
|
||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
$exitCode = $tester->run(['command' => 'foo']);
|
$exitCode = $tester->run(['command' => 'foo']);
|
||||||
$this->assertContains('before.after.', $tester->getDisplay());
|
$this->assertStringContainsString('before.after.', $tester->getDisplay());
|
||||||
$this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $exitCode);
|
$this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $exitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1603,10 +1603,10 @@ class ApplicationTest extends TestCase
|
|||||||
$tester = new ApplicationTester($application);
|
$tester = new ApplicationTester($application);
|
||||||
|
|
||||||
$tester->run([]);
|
$tester->run([]);
|
||||||
$this->assertContains('called', $tester->getDisplay());
|
$this->assertStringContainsString('called', $tester->getDisplay());
|
||||||
|
|
||||||
$tester->run(['--help' => true]);
|
$tester->run(['--help' => true]);
|
||||||
$this->assertContains('The foo:bar command', $tester->getDisplay());
|
$this->assertStringContainsString('The foo:bar command', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -154,20 +154,20 @@ class CommandTest extends TestCase
|
|||||||
{
|
{
|
||||||
$command = new \TestCommand();
|
$command = new \TestCommand();
|
||||||
$command->setHelp('The %command.name% command does... Example: php %command.full_name%.');
|
$command->setHelp('The %command.name% command does... Example: php %command.full_name%.');
|
||||||
$this->assertContains('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly');
|
$this->assertStringContainsString('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly');
|
||||||
$this->assertNotContains('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name%');
|
$this->assertStringNotContainsString('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name%');
|
||||||
|
|
||||||
$command = new \TestCommand();
|
$command = new \TestCommand();
|
||||||
$command->setHelp('');
|
$command->setHelp('');
|
||||||
$this->assertContains('description', $command->getProcessedHelp(), '->getProcessedHelp() falls back to the description');
|
$this->assertStringContainsString('description', $command->getProcessedHelp(), '->getProcessedHelp() falls back to the description');
|
||||||
|
|
||||||
$command = new \TestCommand();
|
$command = new \TestCommand();
|
||||||
$command->setHelp('The %command.name% command does... Example: php %command.full_name%.');
|
$command->setHelp('The %command.name% command does... Example: php %command.full_name%.');
|
||||||
$application = new Application();
|
$application = new Application();
|
||||||
$application->add($command);
|
$application->add($command);
|
||||||
$application->setDefaultCommand('namespace:name', true);
|
$application->setDefaultCommand('namespace:name', true);
|
||||||
$this->assertContains('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly in single command applications');
|
$this->assertStringContainsString('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly in single command applications');
|
||||||
$this->assertNotContains('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name% in single command applications');
|
$this->assertStringNotContainsString('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name% in single command applications');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetSetAliases()
|
public function testGetSetAliases()
|
||||||
|
@ -25,9 +25,9 @@ class HelpCommandTest extends TestCase
|
|||||||
$command->setApplication(new Application());
|
$command->setApplication(new Application());
|
||||||
$commandTester = new CommandTester($command);
|
$commandTester = new CommandTester($command);
|
||||||
$commandTester->execute(['command_name' => 'li'], ['decorated' => false]);
|
$commandTester->execute(['command_name' => 'li'], ['decorated' => false]);
|
||||||
$this->assertContains('list [options] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias');
|
$this->assertStringContainsString('list [options] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias');
|
||||||
$this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias');
|
$this->assertStringContainsString('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias');
|
||||||
$this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias');
|
$this->assertStringContainsString('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testExecuteForCommand()
|
public function testExecuteForCommand()
|
||||||
@ -36,9 +36,9 @@ class HelpCommandTest extends TestCase
|
|||||||
$commandTester = new CommandTester($command);
|
$commandTester = new CommandTester($command);
|
||||||
$command->setCommand(new ListCommand());
|
$command->setCommand(new ListCommand());
|
||||||
$commandTester->execute([], ['decorated' => false]);
|
$commandTester->execute([], ['decorated' => false]);
|
||||||
$this->assertContains('list [options] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
$this->assertStringContainsString('list [options] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
||||||
$this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
$this->assertStringContainsString('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
||||||
$this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
$this->assertStringContainsString('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testExecuteForCommandWithXmlOption()
|
public function testExecuteForCommandWithXmlOption()
|
||||||
@ -47,7 +47,7 @@ class HelpCommandTest extends TestCase
|
|||||||
$commandTester = new CommandTester($command);
|
$commandTester = new CommandTester($command);
|
||||||
$command->setCommand(new ListCommand());
|
$command->setCommand(new ListCommand());
|
||||||
$commandTester->execute(['--format' => 'xml']);
|
$commandTester->execute(['--format' => 'xml']);
|
||||||
$this->assertContains('<command', $commandTester->getDisplay(), '->execute() returns an XML help text if --xml is passed');
|
$this->assertStringContainsString('<command', $commandTester->getDisplay(), '->execute() returns an XML help text if --xml is passed');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testExecuteForApplicationCommand()
|
public function testExecuteForApplicationCommand()
|
||||||
@ -55,9 +55,9 @@ class HelpCommandTest extends TestCase
|
|||||||
$application = new Application();
|
$application = new Application();
|
||||||
$commandTester = new CommandTester($application->get('help'));
|
$commandTester = new CommandTester($application->get('help'));
|
||||||
$commandTester->execute(['command_name' => 'list']);
|
$commandTester->execute(['command_name' => 'list']);
|
||||||
$this->assertContains('list [options] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
$this->assertStringContainsString('list [options] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
||||||
$this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
$this->assertStringContainsString('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
||||||
$this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
$this->assertStringContainsString('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testExecuteForApplicationCommandWithXmlOption()
|
public function testExecuteForApplicationCommandWithXmlOption()
|
||||||
@ -65,7 +65,7 @@ class HelpCommandTest extends TestCase
|
|||||||
$application = new Application();
|
$application = new Application();
|
||||||
$commandTester = new CommandTester($application->get('help'));
|
$commandTester = new CommandTester($application->get('help'));
|
||||||
$commandTester->execute(['command_name' => 'list', '--format' => 'xml']);
|
$commandTester->execute(['command_name' => 'list', '--format' => 'xml']);
|
||||||
$this->assertContains('list [--raw] [--format FORMAT] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
$this->assertStringContainsString('list [--raw] [--format FORMAT] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
|
||||||
$this->assertContains('<command', $commandTester->getDisplay(), '->execute() returns an XML help text if --format=xml is passed');
|
$this->assertStringContainsString('<command', $commandTester->getDisplay(), '->execute() returns an XML help text if --format=xml is passed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ class OutputFormatterStyleTest extends TestCase
|
|||||||
$this->fail('->setOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
$this->fail('->setOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->assertInstanceOf('\InvalidArgumentException', $e, '->setOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
$this->assertInstanceOf('\InvalidArgumentException', $e, '->setOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
||||||
$this->assertContains('Invalid option specified: "foo"', $e->getMessage(), '->setOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
$this->assertStringContainsString('Invalid option specified: "foo"', $e->getMessage(), '->setOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -94,7 +94,7 @@ class OutputFormatterStyleTest extends TestCase
|
|||||||
$this->fail('->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
$this->fail('->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->assertInstanceOf('\InvalidArgumentException', $e, '->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
$this->assertInstanceOf('\InvalidArgumentException', $e, '->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
||||||
$this->assertContains('Invalid option specified: "foo"', $e->getMessage(), '->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
$this->assertStringContainsString('Invalid option specified: "foo"', $e->getMessage(), '->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ class HelperSetTest extends TestCase
|
|||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->assertInstanceOf('\InvalidArgumentException', $e, '->get() throws InvalidArgumentException when helper not found');
|
$this->assertInstanceOf('\InvalidArgumentException', $e, '->get() throws InvalidArgumentException when helper not found');
|
||||||
$this->assertInstanceOf('Symfony\Component\Console\Exception\ExceptionInterface', $e, '->get() throws domain specific exception when helper not found');
|
$this->assertInstanceOf('Symfony\Component\Console\Exception\ExceptionInterface', $e, '->get() throws domain specific exception when helper not found');
|
||||||
$this->assertContains('The helper "foo" is not defined.', $e->getMessage(), '->get() throws InvalidArgumentException when helper not found');
|
$this->assertStringContainsString('The helper "foo" is not defined.', $e->getMessage(), '->get() throws InvalidArgumentException when helper not found');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
|
|||||||
|
|
||||||
rewind($output->getStream());
|
rewind($output->getStream());
|
||||||
$stream = stream_get_contents($output->getStream());
|
$stream = stream_get_contents($output->getStream());
|
||||||
$this->assertContains('Input "Fabien" is not a superhero!', $stream);
|
$this->assertStringContainsString('Input "Fabien" is not a superhero!', $stream);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '1');
|
$question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '1');
|
||||||
|
@ -161,6 +161,6 @@ class SymfonyQuestionHelperTest extends AbstractQuestionHelperTest
|
|||||||
{
|
{
|
||||||
rewind($output->getStream());
|
rewind($output->getStream());
|
||||||
$stream = stream_get_contents($output->getStream());
|
$stream = stream_get_contents($output->getStream());
|
||||||
$this->assertContains($expected, $stream);
|
$this->assertStringContainsString($expected, $stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -308,7 +308,7 @@ class FlattenExceptionTest extends TestCase
|
|||||||
|
|
||||||
$flattened = FlattenException::create($exception);
|
$flattened = FlattenException::create($exception);
|
||||||
$trace = $flattened->getTrace();
|
$trace = $flattened->getTrace();
|
||||||
$this->assertContains('*DEEP NESTED ARRAY*', serialize($trace));
|
$this->assertStringContainsString('*DEEP NESTED ARRAY*', serialize($trace));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTooBigArray()
|
public function testTooBigArray()
|
||||||
@ -332,8 +332,8 @@ class FlattenExceptionTest extends TestCase
|
|||||||
|
|
||||||
$serializeTrace = serialize($trace);
|
$serializeTrace = serialize($trace);
|
||||||
|
|
||||||
$this->assertContains('*SKIPPED over 10000 entries*', $serializeTrace);
|
$this->assertStringContainsString('*SKIPPED over 10000 entries*', $serializeTrace);
|
||||||
$this->assertNotContains('*value1*', $serializeTrace);
|
$this->assertStringNotContainsString('*value1*', $serializeTrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAnonymousClass()
|
public function testAnonymousClass()
|
||||||
|
@ -45,8 +45,8 @@ class ExceptionHandlerTest extends TestCase
|
|||||||
$handler->sendPhpResponse(new \RuntimeException('Foo'));
|
$handler->sendPhpResponse(new \RuntimeException('Foo'));
|
||||||
$response = ob_get_clean();
|
$response = ob_get_clean();
|
||||||
|
|
||||||
$this->assertContains('Whoops, looks like something went wrong.', $response);
|
$this->assertStringContainsString('Whoops, looks like something went wrong.', $response);
|
||||||
$this->assertNotContains('<div class="trace trace-as-html">', $response);
|
$this->assertStringNotContainsString('<div class="trace trace-as-html">', $response);
|
||||||
|
|
||||||
$handler = new ExceptionHandler(true);
|
$handler = new ExceptionHandler(true);
|
||||||
|
|
||||||
@ -54,8 +54,8 @@ class ExceptionHandlerTest extends TestCase
|
|||||||
$handler->sendPhpResponse(new \RuntimeException('Foo'));
|
$handler->sendPhpResponse(new \RuntimeException('Foo'));
|
||||||
$response = ob_get_clean();
|
$response = ob_get_clean();
|
||||||
|
|
||||||
$this->assertContains('<h1 class="break-long-words exception-message">Foo</h1>', $response);
|
$this->assertStringContainsString('<h1 class="break-long-words exception-message">Foo</h1>', $response);
|
||||||
$this->assertContains('<div class="trace trace-as-html">', $response);
|
$this->assertStringContainsString('<div class="trace trace-as-html">', $response);
|
||||||
|
|
||||||
// taken from https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
|
// taken from https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
|
||||||
$htmlWithXss = '<body onload=alert(\'test1\')> <b onmouseover=alert(\'Wufff!\')>click me!</b> <img src="jAvascript:alert(\'test2\')"> <meta http-equiv="refresh"
|
$htmlWithXss = '<body onload=alert(\'test1\')> <b onmouseover=alert(\'Wufff!\')>click me!</b> <img src="jAvascript:alert(\'test2\')"> <meta http-equiv="refresh"
|
||||||
@ -75,7 +75,7 @@ content="0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgndGVzdDMnKTwvc2NyaXB0Pg"
|
|||||||
$handler->sendPhpResponse(new NotFoundHttpException('Foo'));
|
$handler->sendPhpResponse(new NotFoundHttpException('Foo'));
|
||||||
$response = ob_get_clean();
|
$response = ob_get_clean();
|
||||||
|
|
||||||
$this->assertContains('Sorry, the page you are looking for could not be found.', $response);
|
$this->assertStringContainsString('Sorry, the page you are looking for could not be found.', $response);
|
||||||
|
|
||||||
$expectedHeaders = [
|
$expectedHeaders = [
|
||||||
['HTTP/1.0 404', true, null],
|
['HTTP/1.0 404', true, null],
|
||||||
@ -172,7 +172,7 @@ content="0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgndGVzdDMnKTwvc2NyaXB0Pg"
|
|||||||
|
|
||||||
private function assertThatTheExceptionWasOutput($content, $expectedClass, $expectedTitle, $expectedMessage)
|
private function assertThatTheExceptionWasOutput($content, $expectedClass, $expectedTitle, $expectedMessage)
|
||||||
{
|
{
|
||||||
$this->assertContains(sprintf('<span class="exception_title"><abbr title="%s">%s</abbr></span>', $expectedClass, $expectedTitle), $content);
|
$this->assertStringContainsString(sprintf('<span class="exception_title"><abbr title="%s">%s</abbr></span>', $expectedClass, $expectedTitle), $content);
|
||||||
$this->assertContains(sprintf('<p class="break-long-words trace-message">%s</p>', $expectedMessage), $content);
|
$this->assertStringContainsString(sprintf('<p class="break-long-words trace-message">%s</p>', $expectedMessage), $content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ class MergeExtensionConfigurationPassTest extends TestCase
|
|||||||
$pass = new MergeExtensionConfigurationPass();
|
$pass = new MergeExtensionConfigurationPass();
|
||||||
$pass->process($container);
|
$pass->process($container);
|
||||||
|
|
||||||
$this->assertContains(new FileResource(__FILE__), $container->getResources(), '', false, false);
|
$this->assertContainsEquals(new FileResource(__FILE__), $container->getResources());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testOverriddenEnvsAreMerged()
|
public function testOverriddenEnvsAreMerged()
|
||||||
|
@ -462,7 +462,7 @@ class XmlFileLoaderTest extends TestCase
|
|||||||
|
|
||||||
$e = $e->getPrevious();
|
$e = $e->getPrevious();
|
||||||
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
|
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
|
||||||
$this->assertContains('The attribute \'bar\' is not allowed', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
|
$this->assertStringContainsString('The attribute \'bar\' is not allowed', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
|
||||||
}
|
}
|
||||||
|
|
||||||
// non-registered extension
|
// non-registered extension
|
||||||
@ -499,7 +499,7 @@ class XmlFileLoaderTest extends TestCase
|
|||||||
|
|
||||||
$e = $e->getPrevious();
|
$e = $e->getPrevious();
|
||||||
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
|
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
|
||||||
$this->assertContains('The attribute \'bar\' is not allowed', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
|
$this->assertStringContainsString('The attribute \'bar\' is not allowed', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class EnvPlaceholderParameterBagTest extends TestCase
|
|||||||
|
|
||||||
$this->assertCount(1, $placeholderForVariable);
|
$this->assertCount(1, $placeholderForVariable);
|
||||||
$this->assertIsString($placeholder);
|
$this->assertIsString($placeholder);
|
||||||
$this->assertContains($envVariableName, $placeholder);
|
$this->assertStringContainsString($envVariableName, $placeholder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMergeWhereFirstBagIsEmptyWillWork()
|
public function testMergeWhereFirstBagIsEmptyWillWork()
|
||||||
@ -64,7 +64,7 @@ class EnvPlaceholderParameterBagTest extends TestCase
|
|||||||
|
|
||||||
$this->assertCount(1, $placeholderForVariable);
|
$this->assertCount(1, $placeholderForVariable);
|
||||||
$this->assertIsString($placeholder);
|
$this->assertIsString($placeholder);
|
||||||
$this->assertContains($envVariableName, $placeholder);
|
$this->assertStringContainsString($envVariableName, $placeholder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMergeWherePlaceholderOnlyExistsInSecond()
|
public function testMergeWherePlaceholderOnlyExistsInSecond()
|
||||||
|
@ -917,7 +917,7 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest
|
|||||||
$html = $this->renderWidget($form->createView());
|
$html = $this->renderWidget($form->createView());
|
||||||
|
|
||||||
// compare plain HTML to check the whitespace
|
// compare plain HTML to check the whitespace
|
||||||
$this->assertContains('<div id="form" class="foobar" data-foo="bar">', $html);
|
$this->assertStringContainsString('<div id="form" class="foobar" data-foo="bar">', $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWidgetContainerAttributeNameRepeatedIfTrue()
|
public function testWidgetContainerAttributeNameRepeatedIfTrue()
|
||||||
@ -929,6 +929,6 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest
|
|||||||
$html = $this->renderWidget($form->createView());
|
$html = $this->renderWidget($form->createView());
|
||||||
|
|
||||||
// foo="foo"
|
// foo="foo"
|
||||||
$this->assertContains('<div id="form" foo="foo">', $html);
|
$this->assertStringContainsString('<div id="form" foo="foo">', $html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2518,7 +2518,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
|
|||||||
|
|
||||||
$html = $this->renderWidget($form->createView());
|
$html = $this->renderWidget($form->createView());
|
||||||
|
|
||||||
$this->assertNotContains('foo="', $html);
|
$this->assertStringNotContainsString('foo="', $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testButtonAttributes()
|
public function testButtonAttributes()
|
||||||
@ -2554,7 +2554,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
|
|||||||
|
|
||||||
$html = $this->renderWidget($form->createView());
|
$html = $this->renderWidget($form->createView());
|
||||||
|
|
||||||
$this->assertNotContains('foo="', $html);
|
$this->assertStringNotContainsString('foo="', $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTextareaWithWhitespaceOnlyContentRetainsValue()
|
public function testTextareaWithWhitespaceOnlyContentRetainsValue()
|
||||||
@ -2563,7 +2563,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
|
|||||||
|
|
||||||
$html = $this->renderWidget($form->createView());
|
$html = $this->renderWidget($form->createView());
|
||||||
|
|
||||||
$this->assertContains('> </textarea>', $html);
|
$this->assertStringContainsString('> </textarea>', $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTextareaWithWhitespaceOnlyContentRetainsValueWhenRenderingForm()
|
public function testTextareaWithWhitespaceOnlyContentRetainsValueWhenRenderingForm()
|
||||||
@ -2574,7 +2574,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
|
|||||||
|
|
||||||
$html = $this->renderForm($form->createView());
|
$html = $this->renderForm($form->createView());
|
||||||
|
|
||||||
$this->assertContains('> </textarea>', $html);
|
$this->assertStringContainsString('> </textarea>', $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWidgetContainerAttributeHiddenIfFalse()
|
public function testWidgetContainerAttributeHiddenIfFalse()
|
||||||
@ -2586,7 +2586,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
|
|||||||
$html = $this->renderWidget($form->createView());
|
$html = $this->renderWidget($form->createView());
|
||||||
|
|
||||||
// no foo
|
// no foo
|
||||||
$this->assertNotContains('foo="', $html);
|
$this->assertStringNotContainsString('foo="', $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTranslatedAttributes()
|
public function testTranslatedAttributes()
|
||||||
|
@ -519,7 +519,7 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest
|
|||||||
$html = $this->renderWidget($form->createView());
|
$html = $this->renderWidget($form->createView());
|
||||||
|
|
||||||
// compare plain HTML to check the whitespace
|
// compare plain HTML to check the whitespace
|
||||||
$this->assertContains('<table id="form" class="foobar" data-foo="bar">', $html);
|
$this->assertStringContainsString('<table id="form" class="foobar" data-foo="bar">', $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWidgetContainerAttributeNameRepeatedIfTrue()
|
public function testWidgetContainerAttributeNameRepeatedIfTrue()
|
||||||
@ -531,6 +531,6 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest
|
|||||||
$html = $this->renderWidget($form->createView());
|
$html = $this->renderWidget($form->createView());
|
||||||
|
|
||||||
// foo="foo"
|
// foo="foo"
|
||||||
$this->assertContains('<table id="form" foo="foo">', $html);
|
$this->assertStringContainsString('<table id="form" foo="foo">', $html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class DebugCommandTest extends TestCase
|
|||||||
$ret = $tester->execute([], ['decorated' => false]);
|
$ret = $tester->execute([], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('Built-in form types', $tester->getDisplay());
|
$this->assertStringContainsString('Built-in form types', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDebugDeprecatedDefaults()
|
public function testDebugDeprecatedDefaults()
|
||||||
@ -64,7 +64,7 @@ TXT
|
|||||||
$ret = $tester->execute(['class' => 'FormType'], ['decorated' => false]);
|
$ret = $tester->execute(['class' => 'FormType'], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('Symfony\Component\Form\Extension\Core\Type\FormType (Block prefix: "form")', $tester->getDisplay());
|
$this->assertStringContainsString('Symfony\Component\Form\Extension\Core\Type\FormType (Block prefix: "form")', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDebugDateTimeType()
|
public function testDebugDateTimeType()
|
||||||
@ -82,7 +82,7 @@ TXT
|
|||||||
$ret = $tester->execute(['class' => 'FormType', 'option' => 'method'], ['decorated' => false]);
|
$ret = $tester->execute(['class' => 'FormType', 'option' => 'method'], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertContains('Symfony\Component\Form\Extension\Core\Type\FormType (method)', $tester->getDisplay());
|
$this->assertStringContainsString('Symfony\Component\Form\Extension\Core\Type\FormType (method)', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDebugSingleFormTypeNotFound()
|
public function testDebugSingleFormTypeNotFound()
|
||||||
|
@ -32,11 +32,11 @@ class CountryTypeTest extends BaseTypeTest
|
|||||||
->createView()->vars['choices'];
|
->createView()->vars['choices'];
|
||||||
|
|
||||||
// Don't check objects for identity
|
// Don't check objects for identity
|
||||||
$this->assertContains(new ChoiceView('DE', 'DE', 'Germany'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('DE', 'DE', 'Germany'), $choices);
|
||||||
$this->assertContains(new ChoiceView('GB', 'GB', 'United Kingdom'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('GB', 'GB', 'United Kingdom'), $choices);
|
||||||
$this->assertContains(new ChoiceView('US', 'US', 'United States'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('US', 'US', 'United States'), $choices);
|
||||||
$this->assertContains(new ChoiceView('FR', 'FR', 'France'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('FR', 'FR', 'France'), $choices);
|
||||||
$this->assertContains(new ChoiceView('MY', 'MY', 'Malaysia'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('MY', 'MY', 'Malaysia'), $choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,9 +31,9 @@ class CurrencyTypeTest extends BaseTypeTest
|
|||||||
$choices = $this->factory->create(static::TESTED_TYPE)
|
$choices = $this->factory->create(static::TESTED_TYPE)
|
||||||
->createView()->vars['choices'];
|
->createView()->vars['choices'];
|
||||||
|
|
||||||
$this->assertContains(new ChoiceView('EUR', 'EUR', 'Euro'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('EUR', 'EUR', 'Euro'), $choices);
|
||||||
$this->assertContains(new ChoiceView('USD', 'USD', 'US Dollar'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('USD', 'USD', 'US Dollar'), $choices);
|
||||||
$this->assertContains(new ChoiceView('SIT', 'SIT', 'Slovenian Tolar'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('SIT', 'SIT', 'Slovenian Tolar'), $choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,11 +31,11 @@ class LanguageTypeTest extends BaseTypeTest
|
|||||||
$choices = $this->factory->create(static::TESTED_TYPE)
|
$choices = $this->factory->create(static::TESTED_TYPE)
|
||||||
->createView()->vars['choices'];
|
->createView()->vars['choices'];
|
||||||
|
|
||||||
$this->assertContains(new ChoiceView('en', 'en', 'English'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('en', 'en', 'English'), $choices);
|
||||||
$this->assertContains(new ChoiceView('en_GB', 'en_GB', 'British English'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('en_GB', 'en_GB', 'British English'), $choices);
|
||||||
$this->assertContains(new ChoiceView('en_US', 'en_US', 'American English'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('en_US', 'en_US', 'American English'), $choices);
|
||||||
$this->assertContains(new ChoiceView('fr', 'fr', 'French'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('fr', 'fr', 'French'), $choices);
|
||||||
$this->assertContains(new ChoiceView('my', 'my', 'Burmese'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('my', 'my', 'Burmese'), $choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,7 +61,7 @@ class LanguageTypeTest extends BaseTypeTest
|
|||||||
$choices = $this->factory->create(static::TESTED_TYPE, 'language')
|
$choices = $this->factory->create(static::TESTED_TYPE, 'language')
|
||||||
->createView()->vars['choices'];
|
->createView()->vars['choices'];
|
||||||
|
|
||||||
$this->assertNotContains(new ChoiceView('mul', 'mul', 'Mehrsprachig'), $choices, '', false, false);
|
$this->assertNotContainsEquals(new ChoiceView('mul', 'mul', 'Mehrsprachig'), $choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSubmitNull($expected = null, $norm = null, $view = null)
|
public function testSubmitNull($expected = null, $norm = null, $view = null)
|
||||||
|
@ -31,9 +31,9 @@ class LocaleTypeTest extends BaseTypeTest
|
|||||||
$choices = $this->factory->create(static::TESTED_TYPE)
|
$choices = $this->factory->create(static::TESTED_TYPE)
|
||||||
->createView()->vars['choices'];
|
->createView()->vars['choices'];
|
||||||
|
|
||||||
$this->assertContains(new ChoiceView('en', 'en', 'English'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('en', 'en', 'English'), $choices);
|
||||||
$this->assertContains(new ChoiceView('en_GB', 'en_GB', 'English (United Kingdom)'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('en_GB', 'en_GB', 'English (United Kingdom)'), $choices);
|
||||||
$this->assertContains(new ChoiceView('zh_Hant_HK', 'zh_Hant_HK', 'Chinese (Traditional, Hong Kong SAR China)'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('zh_Hant_HK', 'zh_Hant_HK', 'Chinese (Traditional, Hong Kong SAR China)'), $choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ class TimezoneTypeTest extends BaseTypeTest
|
|||||||
$choices = $this->factory->create(static::TESTED_TYPE)
|
$choices = $this->factory->create(static::TESTED_TYPE)
|
||||||
->createView()->vars['choices'];
|
->createView()->vars['choices'];
|
||||||
|
|
||||||
$this->assertContains(new ChoiceView('Africa/Kinshasa', 'Africa/Kinshasa', 'Africa / Kinshasa'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('Africa/Kinshasa', 'Africa/Kinshasa', 'Africa / Kinshasa'), $choices);
|
||||||
$this->assertContains(new ChoiceView('America/New_York', 'America/New_York', 'America / New York'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('America/New_York', 'America/New_York', 'America / New York'), $choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSubmitNull($expected = null, $norm = null, $view = null)
|
public function testSubmitNull($expected = null, $norm = null, $view = null)
|
||||||
@ -69,7 +69,7 @@ class TimezoneTypeTest extends BaseTypeTest
|
|||||||
$form->submit('Europe/Saratov');
|
$form->submit('Europe/Saratov');
|
||||||
|
|
||||||
$this->assertEquals(new \DateTimeZone('Europe/Saratov'), $form->getData());
|
$this->assertEquals(new \DateTimeZone('Europe/Saratov'), $form->getData());
|
||||||
$this->assertContains('Europe/Saratov', $form->getConfig()->getAttribute('choice_list')->getValues());
|
$this->assertStringContainsString('Europe/Saratov', $form->getConfig()->getAttribute('choice_list')->getValues());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,7 +81,7 @@ class TimezoneTypeTest extends BaseTypeTest
|
|||||||
$choices = $this->factory->create(static::TESTED_TYPE, null, ['regions' => \DateTimeZone::EUROPE])
|
$choices = $this->factory->create(static::TESTED_TYPE, null, ['regions' => \DateTimeZone::EUROPE])
|
||||||
->createView()->vars['choices'];
|
->createView()->vars['choices'];
|
||||||
|
|
||||||
$this->assertContains(new ChoiceView('Europe/Amsterdam', 'Europe/Amsterdam', 'Europe / Amsterdam'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('Europe/Amsterdam', 'Europe/Amsterdam', 'Europe / Amsterdam'), $choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -170,8 +170,8 @@ class TimezoneTypeTest extends BaseTypeTest
|
|||||||
$choices = $this->factory->create(static::TESTED_TYPE, null, ['intl' => true])
|
$choices = $this->factory->create(static::TESTED_TYPE, null, ['intl' => true])
|
||||||
->createView()->vars['choices'];
|
->createView()->vars['choices'];
|
||||||
|
|
||||||
$this->assertContains(new ChoiceView('Europe/Amsterdam', 'Europe/Amsterdam', 'Central European Time (Amsterdam)'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('Europe/Amsterdam', 'Europe/Amsterdam', 'Central European Time (Amsterdam)'), $choices);
|
||||||
$this->assertContains(new ChoiceView('Etc/UTC', 'Etc/UTC', 'Coordinated Universal Time'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('Etc/UTC', 'Etc/UTC', 'Coordinated Universal Time'), $choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -186,8 +186,8 @@ class TimezoneTypeTest extends BaseTypeTest
|
|||||||
])
|
])
|
||||||
->createView()->vars['choices'];
|
->createView()->vars['choices'];
|
||||||
|
|
||||||
$this->assertContains(new ChoiceView('Europe/Amsterdam', 'Europe/Amsterdam', 'за центральноєвропейським часом (Амстердам)'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('Europe/Amsterdam', 'Europe/Amsterdam', 'за центральноєвропейським часом (Амстердам)'), $choices);
|
||||||
$this->assertContains(new ChoiceView('Etc/UTC', 'Etc/UTC', 'за всесвітнім координованим часом'), $choices, '', false, false);
|
$this->assertContainsEquals(new ChoiceView('Etc/UTC', 'Etc/UTC', 'за всесвітнім координованим часом'), $choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testChoiceTranslationLocaleOptionWithoutIntl()
|
public function testChoiceTranslationLocaleOptionWithoutIntl()
|
||||||
|
@ -261,7 +261,7 @@ class BinaryFileResponseTest extends ResponseTestCase
|
|||||||
$this->expectOutputString('');
|
$this->expectOutputString('');
|
||||||
$response->sendContent();
|
$response->sendContent();
|
||||||
|
|
||||||
$this->assertContains('README.md', $response->headers->get('X-Sendfile'));
|
$this->assertStringContainsString('README.md', $response->headers->get('X-Sendfile'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function provideXSendfileFiles()
|
public function provideXSendfileFiles()
|
||||||
|
@ -116,7 +116,7 @@ class CookieTest extends TestCase
|
|||||||
$cookie = Cookie::create('foo', 'bar', $value);
|
$cookie = Cookie::create('foo', 'bar', $value);
|
||||||
$expire = strtotime($value);
|
$expire = strtotime($value);
|
||||||
|
|
||||||
$this->assertEquals($expire, $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date', 1);
|
$this->assertEqualsWithDelta($expire, $cookie->getExpiresTime(), 1, '->getExpiresTime() returns the expire date');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetDomain()
|
public function testGetDomain()
|
||||||
|
@ -1656,14 +1656,14 @@ class RequestTest extends TestCase
|
|||||||
|
|
||||||
$asString = (string) $request;
|
$asString = (string) $request;
|
||||||
|
|
||||||
$this->assertContains('Accept-Language: zh, en-us; q=0.8, en; q=0.6', $asString);
|
$this->assertStringContainsString('Accept-Language: zh, en-us; q=0.8, en; q=0.6', $asString);
|
||||||
$this->assertContains('Cookie: Foo=Bar', $asString);
|
$this->assertStringContainsString('Cookie: Foo=Bar', $asString);
|
||||||
|
|
||||||
$request->cookies->set('Another', 'Cookie');
|
$request->cookies->set('Another', 'Cookie');
|
||||||
|
|
||||||
$asString = (string) $request;
|
$asString = (string) $request;
|
||||||
|
|
||||||
$this->assertContains('Cookie: Foo=Bar; Another=Cookie', $asString);
|
$this->assertStringContainsString('Cookie: Foo=Bar; Another=Cookie', $asString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIsMethod()
|
public function testIsMethod()
|
||||||
|
@ -602,7 +602,7 @@ class ResponseTest extends ResponseTestCase
|
|||||||
$this->fail('->setCache() throws an InvalidArgumentException if an option is not supported');
|
$this->fail('->setCache() throws an InvalidArgumentException if an option is not supported');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->assertInstanceOf('InvalidArgumentException', $e, '->setCache() throws an InvalidArgumentException if an option is not supported');
|
$this->assertInstanceOf('InvalidArgumentException', $e, '->setCache() throws an InvalidArgumentException if an option is not supported');
|
||||||
$this->assertContains('"wrong option"', $e->getMessage());
|
$this->assertStringContainsString('"wrong option"', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
$options = ['etag' => '"whatever"'];
|
$options = ['etag' => '"whatever"'];
|
||||||
@ -655,7 +655,7 @@ class ResponseTest extends ResponseTestCase
|
|||||||
ob_start();
|
ob_start();
|
||||||
$response->sendContent();
|
$response->sendContent();
|
||||||
$string = ob_get_clean();
|
$string = ob_get_clean();
|
||||||
$this->assertContains('test response rendering', $string);
|
$this->assertStringContainsString('test response rendering', $string);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSetPublic()
|
public function testSetPublic()
|
||||||
|
@ -199,7 +199,7 @@ class RouterListenerTest extends TestCase
|
|||||||
$request = Request::create('http://localhost/');
|
$request = Request::create('http://localhost/');
|
||||||
$response = $kernel->handle($request);
|
$response = $kernel->handle($request);
|
||||||
$this->assertSame(404, $response->getStatusCode());
|
$this->assertSame(404, $response->getStatusCode());
|
||||||
$this->assertContains('Welcome', $response->getContent());
|
$this->assertStringContainsString('Welcome', $response->getContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRequestWithBadHost()
|
public function testRequestWithBadHost()
|
||||||
|
@ -20,9 +20,9 @@ class UriSignerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$signer = new UriSigner('foobar');
|
$signer = new UriSigner('foobar');
|
||||||
|
|
||||||
$this->assertContains('?_hash=', $signer->sign('http://example.com/foo'));
|
$this->assertStringContainsString('?_hash=', $signer->sign('http://example.com/foo'));
|
||||||
$this->assertContains('?_hash=', $signer->sign('http://example.com/foo?foo=bar'));
|
$this->assertStringContainsString('?_hash=', $signer->sign('http://example.com/foo?foo=bar'));
|
||||||
$this->assertContains('&foo=', $signer->sign('http://example.com/foo?foo=bar'));
|
$this->assertStringContainsString('&foo=', $signer->sign('http://example.com/foo?foo=bar'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCheck()
|
public function testCheck()
|
||||||
|
@ -806,7 +806,7 @@ abstract class AbstractNumberFormatterTest extends TestCase
|
|||||||
{
|
{
|
||||||
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
|
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
|
||||||
$parsedValue = $formatter->parse($value, NumberFormatter::TYPE_DOUBLE);
|
$parsedValue = $formatter->parse($value, NumberFormatter::TYPE_DOUBLE);
|
||||||
$this->assertEquals($expectedValue, $parsedValue, '', 0.001);
|
$this->assertEqualsWithDelta($expectedValue, $parsedValue, 0.001);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parseTypeDoubleProvider()
|
public function parseTypeDoubleProvider()
|
||||||
|
@ -39,10 +39,10 @@ PHP
|
|||||||
$commandLine = $process->getCommandLine();
|
$commandLine = $process->getCommandLine();
|
||||||
|
|
||||||
$process->start();
|
$process->start();
|
||||||
$this->assertContains($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after start');
|
$this->assertStringContainsString($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after start');
|
||||||
|
|
||||||
$process->wait();
|
$process->wait();
|
||||||
$this->assertContains($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after wait');
|
$this->assertStringContainsString($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after wait');
|
||||||
|
|
||||||
$this->assertSame(PHP_VERSION.\PHP_SAPI, $process->getOutput());
|
$this->assertSame(PHP_VERSION.\PHP_SAPI, $process->getOutput());
|
||||||
}
|
}
|
||||||
|
@ -211,8 +211,8 @@ class UserAuthenticationProviderTest extends TestCase
|
|||||||
|
|
||||||
$this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $authToken);
|
$this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $authToken);
|
||||||
$this->assertSame($user, $authToken->getUser());
|
$this->assertSame($user, $authToken->getUser());
|
||||||
$this->assertContains('ROLE_FOO', $authToken->getRoleNames(), '', false, false);
|
$this->assertContains('ROLE_FOO', $authToken->getRoleNames());
|
||||||
$this->assertContains($switchUserRole, $authToken->getRoles(), '', false, false);
|
$this->assertContains($switchUserRole, $authToken->getRoles());
|
||||||
$this->assertEquals('foo', $authToken->getCredentials());
|
$this->assertEquals('foo', $authToken->getCredentials());
|
||||||
$this->assertEquals(['foo' => 'bar'], $authToken->getAttributes(), '->authenticate() copies token attributes');
|
$this->assertEquals(['foo' => 'bar'], $authToken->getAttributes(), '->authenticate() copies token attributes');
|
||||||
}
|
}
|
||||||
@ -240,7 +240,7 @@ class UserAuthenticationProviderTest extends TestCase
|
|||||||
$this->assertInstanceOf(SwitchUserToken::class, $authToken);
|
$this->assertInstanceOf(SwitchUserToken::class, $authToken);
|
||||||
$this->assertSame($originalToken, $authToken->getOriginalToken());
|
$this->assertSame($originalToken, $authToken->getOriginalToken());
|
||||||
$this->assertSame($user, $authToken->getUser());
|
$this->assertSame($user, $authToken->getUser());
|
||||||
$this->assertContains('ROLE_FOO', $authToken->getRoleNames(), '', false, false);
|
$this->assertContains('ROLE_FOO', $authToken->getRoleNames());
|
||||||
$this->assertEquals('foo', $authToken->getCredentials());
|
$this->assertEquals('foo', $authToken->getCredentials());
|
||||||
$this->assertEquals(['foo' => 'bar'], $authToken->getAttributes(), '->authenticate() copies token attributes');
|
$this->assertEquals(['foo' => 'bar'], $authToken->getAttributes(), '->authenticate() copies token attributes');
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event->start();
|
$event->start();
|
||||||
usleep(200000);
|
usleep(200000);
|
||||||
$event->stop();
|
$event->stop();
|
||||||
$this->assertEquals(200, $event->getDuration(), '', self::DELTA);
|
$this->assertEqualsWithDelta(200, $event->getDuration(), self::DELTA);
|
||||||
|
|
||||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||||
$event->start();
|
$event->start();
|
||||||
@ -83,7 +83,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event->start();
|
$event->start();
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
$event->stop();
|
$event->stop();
|
||||||
$this->assertEquals(200, $event->getDuration(), '', self::DELTA);
|
$this->assertEqualsWithDelta(200, $event->getDuration(), self::DELTA);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDurationBeforeStop()
|
public function testDurationBeforeStop()
|
||||||
@ -91,7 +91,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||||
$event->start();
|
$event->start();
|
||||||
usleep(200000);
|
usleep(200000);
|
||||||
$this->assertEquals(200, $event->getDuration(), '', self::DELTA);
|
$this->assertEqualsWithDelta(200, $event->getDuration(), self::DELTA);
|
||||||
|
|
||||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||||
$event->start();
|
$event->start();
|
||||||
@ -100,7 +100,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
usleep(50000);
|
usleep(50000);
|
||||||
$event->start();
|
$event->start();
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
$this->assertEquals(100, $event->getDuration(), '', self::DELTA);
|
$this->assertEqualsWithDelta(100, $event->getDuration(), self::DELTA);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testStopWithoutStart()
|
public function testStopWithoutStart()
|
||||||
@ -132,7 +132,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event->start();
|
$event->start();
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
$event->ensureStopped();
|
$event->ensureStopped();
|
||||||
$this->assertEquals(300, $event->getDuration(), '', self::DELTA);
|
$this->assertEqualsWithDelta(300, $event->getDuration(), self::DELTA);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testStartTime()
|
public function testStartTime()
|
||||||
@ -149,7 +149,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event->start();
|
$event->start();
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
$event->stop();
|
$event->stop();
|
||||||
$this->assertEquals(0, $event->getStartTime(), '', self::DELTA);
|
$this->assertEqualsWithDelta(0, $event->getStartTime(), self::DELTA);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testHumanRepresentation()
|
public function testHumanRepresentation()
|
||||||
|
@ -60,7 +60,7 @@ bar';
|
|||||||
$ret = $tester->execute(['filename' => $filename], ['decorated' => false]);
|
$ret = $tester->execute(['filename' => $filename], ['decorated' => false]);
|
||||||
|
|
||||||
$this->assertEquals(1, $ret, 'Returns 1 in case of error');
|
$this->assertEquals(1, $ret, 'Returns 1 in case of error');
|
||||||
$this->assertContains('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay()));
|
$this->assertStringContainsString('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConstantAsKey()
|
public function testConstantAsKey()
|
||||||
|
@ -101,7 +101,7 @@ class InlineTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->assertEquals('1.2', Inline::dump(1.2));
|
$this->assertEquals('1.2', Inline::dump(1.2));
|
||||||
$this->assertContains('fr', strtolower(setlocale(LC_NUMERIC, 0)));
|
$this->assertStringContainsStringIgnoringCase('fr', setlocale(LC_NUMERIC, 0));
|
||||||
} finally {
|
} finally {
|
||||||
setlocale(LC_NUMERIC, $locale);
|
setlocale(LC_NUMERIC, $locale);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user