diff --git a/.travis.yml b/.travis.yml
index 41845394ef..c78bd15140 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,9 +48,9 @@ install:
- if [ "$deps" = "2.8" ]; then git fetch origin 2.8; git checkout -m FETCH_HEAD; export COMPOSER_ROOT_VERSION=2.8.x-dev; fi;
script:
- - if [ "$deps" = "no" ]; then echo "$COMPONENTS" | parallel --gnu 'echo -e "\\nRunning {} tests"; $PHPUNIT --exclude-group tty,benchmark,intl-data {}'; fi;
+ - if [ "$deps" = "no" ]; then echo "$COMPONENTS" | parallel --gnu '$PHPUNIT --exclude-group tty,benchmark,intl-data {}'; fi;
- if [ "$deps" = "no" ]; then echo -e "\\nRunning tests requiring tty"; $PHPUNIT --group tty; fi;
- - if [ "$deps" = "high" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
- - if [ "$deps" = "low" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
- - if [ "$deps" = "2.8" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; $PHPUNIT --exclude-group tty,benchmark,intl-data,legacy'; fi;
+ - if [ "$deps" = "high" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
+ - if [ "$deps" = "low" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
+ - if [ "$deps" = "2.8" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source update; $PHPUNIT --exclude-group tty,benchmark,intl-data,legacy'; fi;
- if [ "$deps" = "skip" ]; then echo 'This matrix line is skipped for pull requests.'; fi;
diff --git a/appveyor.yml b/appveyor.yml
index 7ae882a56e..abc7ad5c29 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -14,6 +14,7 @@ init:
- SET PHP=1
- SET ANSICON=121x90 (121x90)
- SET PHP_INI_MATRIX=php.ini-min php.ini-max
+ - SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped
install:
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
@@ -22,6 +23,7 @@ install:
- IF %PHP%==1 7z x php-5.5.9-nts-Win32-VC11-x86.zip -y > 7z.log
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- IF %PHP%==1 copy /Y php.ini-development php.ini-min
+ - IF %PHP%==1 echo max_execution_time=1200 >> php.ini-min
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini-min
- IF %PHP%==1 echo extension_dir=ext >> php.ini-min
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini-min
diff --git a/composer.json b/composer.json
index e8e104da88..071b11cbe4 100644
--- a/composer.json
+++ b/composer.json
@@ -69,7 +69,6 @@
"symfony/yaml": "2.99.99"
},
"require-dev": {
- "symfony/phpunit-bridge": "self.version",
"doctrine/data-fixtures": "1.0.*",
"doctrine/dbal": "~2.4",
"doctrine/orm": "~2.4,>=2.4.5",
diff --git a/phpunit b/phpunit
index 01d6e0f910..74df7131b8 100755
--- a/phpunit
+++ b/phpunit
@@ -28,7 +28,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")) {
// Build a standalone phpunit without symfony/yaml
$oldPwd = getcwd();
- mkdir($PHPUNIT_DIR);
+ @mkdir($PHPUNIT_DIR);
chdir($PHPUNIT_DIR);
if (extension_loaded('openssl') && ini_get('allow_url_fopen')) {
stream_copy_to_stream(fopen("https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip", 'rb'), fopen("$PHPUNIT_VERSION.zip", 'wb'));
@@ -41,6 +41,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")) {
$zip->close();
chdir("phpunit-$PHPUNIT_VERSION");
passthru("$COMPOSER remove --no-update symfony/yaml");
+ passthru("$COMPOSER require --dev --no-update symfony/phpunit-bridge \">=2.8@dev\"");
passthru("$COMPOSER install --prefer-source --no-progress --ansi");
chdir($oldPwd);
}
@@ -76,10 +77,13 @@ if ($phpIniMatrix) {
if (isset($argv[1]) && 'symfony' === $argv[1]) {
// Find Symfony components in plain php for Windows portability
- $finder = new RecursiveDirectoryIterator(__DIR__.'/src/Symfony', FilesystemIterator::KEY_AS_FILENAME | FilesystemIterator::UNIX_PATHS);
+ $oldPwd = getcwd();
+ chdir(__DIR__);
+ $finder = new RecursiveDirectoryIterator('src/Symfony', FilesystemIterator::KEY_AS_FILENAME | FilesystemIterator::UNIX_PATHS);
$finder = new RecursiveIteratorIterator($finder);
$finder->setMaxDepth(3);
+ $skippedTests = isset($_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS']) ? $_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS'] : false;
$runningProcs = array();
foreach ($finder as $file => $fileInfo) {
@@ -88,6 +92,10 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
// Run phpunit tests in parallel
+ if ($skippedTests) {
+ putenv("SYMFONY_PHPUNIT_SKIPPED_TESTS=$component/$skippedTests");
+ }
+
$c = ProcessUtils::escapeArgument($component);
if ($proc = proc_open(sprintf($cmd, $c, " > $c/phpunit.stdout 2> $c/phpunit.stderr"), array(), $pipes)) {
@@ -98,6 +106,7 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
}
}
}
+ chdir($oldPwd);
// Fixes for colors support on appveyor
// See https://github.com/appveyor/ci/issues/373
@@ -139,6 +148,9 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
}
unlink($file);
}
+ if ($skippedTests) {
+ @unlink("$component/$skippedTests");
+ }
if ($procStatus) {
$exit = 1;
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 726b91ef23..0e7a54c446 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -43,4 +43,8 @@
+
+
+
+
diff --git a/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php b/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php
index c763653ad9..962099e36a 100644
--- a/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php
+++ b/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php
@@ -29,8 +29,8 @@ class DoctrineTestHelper
*/
public static function createTestEntityManager()
{
- if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
- \PHPUnit_Framework_TestCase::markTestSkipped('This test requires SQLite support in your environment');
+ if (!extension_loaded('pdo_sqlite')) {
+ \PHPUnit_Framework_TestCase::markTestSkipped('Extension pdo_sqlite is required.');
}
$config = new \Doctrine\ORM\Configuration();
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
index 68c79780d6..9141e9a2d3 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
@@ -132,12 +132,11 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase
));
}
+ /**
+ * @requires extension mbstring
+ */
public function testLogUTF8LongString()
{
- if (!function_exists('mb_detect_encoding')) {
- $this->markTestSkipped('Testing log shortening of utf8 charsets requires the mb_detect_encoding() function.');
- }
-
$logger = $this->getMock('Psr\\Log\\LoggerInterface');
$dbalLogger = $this
diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json
index b55350f8e7..89037f4c55 100644
--- a/src/Symfony/Bridge/Doctrine/composer.json
+++ b/src/Symfony/Bridge/Doctrine/composer.json
@@ -20,7 +20,6 @@
"doctrine/common": "~2.4"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/stopwatch": "~2.8|~3.0",
"symfony/dependency-injection": "~2.8|~3.0",
"symfony/form": "~2.8|~3.0",
diff --git a/src/Symfony/Bridge/Doctrine/phpunit.xml.dist b/src/Symfony/Bridge/Doctrine/phpunit.xml.dist
index 5b576e52c9..fd1e62ff4c 100644
--- a/src/Symfony/Bridge/Doctrine/phpunit.xml.dist
+++ b/src/Symfony/Bridge/Doctrine/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Bridge/Monolog/composer.json b/src/Symfony/Bridge/Monolog/composer.json
index b2c9009507..d049eccb8e 100644
--- a/src/Symfony/Bridge/Monolog/composer.json
+++ b/src/Symfony/Bridge/Monolog/composer.json
@@ -20,7 +20,6 @@
"monolog/monolog": "~1.11"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/http-kernel": "~2.8|~3.0",
"symfony/console": "~2.8|~3.0",
"symfony/event-dispatcher": "~2.8|~3.0"
diff --git a/src/Symfony/Bridge/Monolog/phpunit.xml.dist b/src/Symfony/Bridge/Monolog/phpunit.xml.dist
index 34063ac548..10405e13e7 100644
--- a/src/Symfony/Bridge/Monolog/phpunit.xml.dist
+++ b/src/Symfony/Bridge/Monolog/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Bridge/PhpUnit/SkippedTestsListener.php b/src/Symfony/Bridge/PhpUnit/SkippedTestsListener.php
new file mode 100644
index 0000000000..f95563ce3b
--- /dev/null
+++ b/src/Symfony/Bridge/PhpUnit/SkippedTestsListener.php
@@ -0,0 +1,85 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Bridge\PhpUnit;
+
+use Doctrine\Common\Annotations\AnnotationRegistry;
+
+/**
+ * Collects and replays skipped tests.
+ *
+ * @author Nicolas Grekas
+ */
+class SkippedTestsListener extends \PHPUnit_Framework_BaseTestListener
+{
+ private $state = -1;
+ private $skippedFile = false;
+ private $wasSkipped = array();
+ private $isSkipped = array();
+
+ public function __destruct()
+ {
+ if (0 < $this->state) {
+ file_put_contents($this->skippedFile, 'isSkipped, true).';');
+ }
+ }
+
+ public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
+ {
+ $suiteName = $suite->getName();
+
+ if (-1 === $this->state) {
+ echo "Testing $suiteName\n";
+ $this->state = 0;
+
+ if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) {
+ AnnotationRegistry::registerLoader('class_exists');
+ }
+
+ if ($this->skippedFile = getenv('SYMFONY_PHPUNIT_SKIPPED_TESTS')) {
+ $this->state = 1;
+
+ if (file_exists($this->skippedFile)) {
+ $this->state = 2;
+
+ if (!$this->wasSkipped = require $this->skippedFile) {
+ exit("All tests already ran successfully.\n");
+ }
+ }
+ }
+ } elseif (2 === $this->state) {
+ $skipped = array();
+ foreach ($suite->tests() as $test) {
+ if (!$test instanceof \PHPUnit_Framework_TestCase
+ || isset($this->wasSkipped[$suiteName]['*'])
+ || isset($this->wasSkipped[$suiteName][$test->getName()])) {
+ $skipped[] = $test;
+ }
+ }
+ $suite->setTests($skipped);
+ }
+ }
+
+ public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
+ {
+ if (0 < $this->state) {
+ if ($test instanceof \PHPUnit_Framework_TestCase) {
+ $class = get_class($test);
+ $method = $test->getName();
+ } else {
+ $class = $test->getName();
+ $method = '*';
+ }
+
+ $this->isSkipped[$class][$method] = 1;
+ }
+ }
+}
diff --git a/src/Symfony/Bridge/PhpUnit/bootstrap.php b/src/Symfony/Bridge/PhpUnit/bootstrap.php
index c05d0b6db9..c0abdaa700 100644
--- a/src/Symfony/Bridge/PhpUnit/bootstrap.php
+++ b/src/Symfony/Bridge/PhpUnit/bootstrap.php
@@ -24,7 +24,7 @@ gc_disable();
// Enforce a consistent locale
setlocale(LC_ALL, 'C');
-if (class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) {
+if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) {
AnnotationRegistry::registerLoader('class_exists');
}
diff --git a/src/Symfony/Bridge/ProxyManager/composer.json b/src/Symfony/Bridge/ProxyManager/composer.json
index cb4e89969c..556e978d1c 100644
--- a/src/Symfony/Bridge/ProxyManager/composer.json
+++ b/src/Symfony/Bridge/ProxyManager/composer.json
@@ -21,7 +21,6 @@
"ocramius/proxy-manager": "~0.4|~1.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0"
},
"autoload": {
diff --git a/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist b/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist
index 60980be9e5..df439aec1e 100644
--- a/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist
+++ b/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json
index 73e32d4a95..fed6b7e7d2 100644
--- a/src/Symfony/Bridge/Twig/composer.json
+++ b/src/Symfony/Bridge/Twig/composer.json
@@ -20,7 +20,6 @@
"twig/twig": "~1.20|~2.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/asset": "~2.8|~3.0",
"symfony/finder": "~2.8|~3.0",
"symfony/form": "~2.8|~3.0",
diff --git a/src/Symfony/Bridge/Twig/phpunit.xml.dist b/src/Symfony/Bridge/Twig/phpunit.xml.dist
index 10c0be1142..551d6c8d21 100644
--- a/src/Symfony/Bridge/Twig/phpunit.xml.dist
+++ b/src/Symfony/Bridge/Twig/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Bundle/DebugBundle/composer.json b/src/Symfony/Bundle/DebugBundle/composer.json
index 2423faf9d4..0a5eea2ad6 100644
--- a/src/Symfony/Bundle/DebugBundle/composer.json
+++ b/src/Symfony/Bundle/DebugBundle/composer.json
@@ -22,7 +22,6 @@
"symfony/var-dumper": "~2.8|~3.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0",
"symfony/dependency-injection": "~2.8|~3.0",
"symfony/web-profiler-bundle": "~2.8|~3.0"
diff --git a/src/Symfony/Bundle/DebugBundle/phpunit.xml.dist b/src/Symfony/Bundle/DebugBundle/phpunit.xml.dist
index cbde5628a3..8a36183003 100644
--- a/src/Symfony/Bundle/DebugBundle/phpunit.xml.dist
+++ b/src/Symfony/Bundle/DebugBundle/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
index dd526c0ba5..6b95a0b1f7 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
@@ -815,14 +815,14 @@ class FrameworkExtension extends Extension
}
$container
- ->getDefinition('annotations.php_file_cache')
+ ->getDefinition('annotations.filesystem_cache')
->replaceArgument(0, $cacheDir)
;
}
$container
->getDefinition('annotations.cached_reader')
- ->replaceArgument(1, new Reference('file' !== $config['cache'] ? $config['cache'] : 'annotations.php_file_cache'))
+ ->replaceArgument(1, new Reference('file' !== $config['cache'] ? $config['cache'] : 'annotations.filesystem_cache'))
->replaceArgument(2, $config['debug'])
;
$container->setAlias('annotation_reader', 'annotations.cached_reader');
diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml
index 7d5034552d..ad469d42f3 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
index 95efcb572e..e499a72b2a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
@@ -312,9 +312,9 @@ abstract class FrameworkExtensionTest extends TestCase
{
$container = $this->createContainerFromFile('full');
- $this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.php_file_cache')->getArgument(0));
+ $this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.filesystem_cache')->getArgument(0));
$this->assertSame('annotations.cached_reader', (string) $container->getAlias('annotation_reader'));
- $this->assertSame('annotations.php_file_cache', (string) $container->getDefinition('annotations.cached_reader')->getArgument(1));
+ $this->assertSame('annotations.filesystem_cache', (string) $container->getDefinition('annotations.cached_reader')->getArgument(1));
}
public function testFileLinkFormat()
diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json
index 20f1c70406..b8a175d20c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/composer.json
+++ b/src/Symfony/Bundle/FrameworkBundle/composer.json
@@ -34,7 +34,6 @@
"doctrine/annotations": "~1.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/browser-kit": "~2.8|~3.0",
"symfony/console": "~2.8|~3.0",
"symfony/css-selector": "~2.8|~3.0",
@@ -55,8 +54,7 @@
"symfony/form": "For using forms",
"symfony/serializer": "For using the serializer service",
"symfony/validator": "For using validation",
- "symfony/yaml": "For using the debug:config and lint:yaml commands",
- "doctrine/cache": "For using alternative cache drivers"
+ "symfony/yaml": "For using the debug:config and lint:yaml commands"
},
"autoload": {
"psr-4": { "Symfony\\Bundle\\FrameworkBundle\\": "" }
diff --git a/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist b/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist
index 269adda917..342daf2f7b 100644
--- a/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist
+++ b/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php
index 9a8b5e2e97..db4c51c5f0 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php
@@ -33,6 +33,7 @@ use Symfony\Component\Security\Acl\Permission\BasicPermissionMap;
* Tests SetAclCommand.
*
* @author Kévin Dunglas
+ * @requires extension pdo_sqlite
*/
class SetAclCommandTest extends WebTestCase
{
@@ -41,9 +42,6 @@ class SetAclCommandTest extends WebTestCase
protected function setUp()
{
- if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
- self::markTestSkipped('This test requires SQLite support in your environment');
- }
parent::setUp();
$this->deleteTmpDir('Acl');
diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json
index fac6aaf641..8d5b46435c 100644
--- a/src/Symfony/Bundle/SecurityBundle/composer.json
+++ b/src/Symfony/Bundle/SecurityBundle/composer.json
@@ -22,7 +22,6 @@
"symfony/http-kernel": "~2.8|~3.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/browser-kit": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0",
"symfony/console": "~2.8|~3.0",
diff --git a/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist b/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist
index 0ff2b570e2..fb70429ba4 100644
--- a/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist
+++ b/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Bundle/TwigBundle/composer.json b/src/Symfony/Bundle/TwigBundle/composer.json
index 774196bf26..ebcb819338 100644
--- a/src/Symfony/Bundle/TwigBundle/composer.json
+++ b/src/Symfony/Bundle/TwigBundle/composer.json
@@ -23,7 +23,6 @@
"symfony/http-kernel": "~2.8|~3.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/stopwatch": "~2.8|~3.0",
"symfony/dependency-injection": "~2.8|~3.0",
"symfony/expression-language": "~2.8|~3.0",
diff --git a/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist b/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist
index 763b8b68bf..07e7c0e082 100644
--- a/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist
+++ b/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Bundle/WebProfilerBundle/composer.json b/src/Symfony/Bundle/WebProfilerBundle/composer.json
index 2855a73b31..dd5933c2a2 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/composer.json
+++ b/src/Symfony/Bundle/WebProfilerBundle/composer.json
@@ -22,7 +22,6 @@
"symfony/twig-bridge": "~2.8|~3.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0",
"symfony/console": "~2.8|~3.0",
"symfony/dependency-injection": "~2.8|~3.0",
diff --git a/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist b/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist
index f449adf319..0d350dfb89 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist
+++ b/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Asset/composer.json b/src/Symfony/Component/Asset/composer.json
index 15d032749a..d59df002d8 100644
--- a/src/Symfony/Component/Asset/composer.json
+++ b/src/Symfony/Component/Asset/composer.json
@@ -22,7 +22,6 @@
"symfony/http-foundation": ""
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/http-foundation": "~2.8|~3.0"
},
"autoload": {
diff --git a/src/Symfony/Component/Asset/phpunit.xml.dist b/src/Symfony/Component/Asset/phpunit.xml.dist
index 3e53da45d9..cb100612b8 100644
--- a/src/Symfony/Component/Asset/phpunit.xml.dist
+++ b/src/Symfony/Component/Asset/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/BrowserKit/composer.json b/src/Symfony/Component/BrowserKit/composer.json
index 87690e02c4..d4c0d0a3ba 100644
--- a/src/Symfony/Component/BrowserKit/composer.json
+++ b/src/Symfony/Component/BrowserKit/composer.json
@@ -20,7 +20,6 @@
"symfony/dom-crawler": "~2.8|~3.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/process": "~2.8|~3.0",
"symfony/css-selector": "~2.8|~3.0"
},
diff --git a/src/Symfony/Component/BrowserKit/phpunit.xml.dist b/src/Symfony/Component/BrowserKit/phpunit.xml.dist
index d76b2b98af..950c8f80dc 100644
--- a/src/Symfony/Component/BrowserKit/phpunit.xml.dist
+++ b/src/Symfony/Component/BrowserKit/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php b/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php
index 1f6d150769..8090c5e175 100644
--- a/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php
+++ b/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php
@@ -14,14 +14,13 @@ namespace Symfony\Component\ClassLoader\Tests;
use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\ClassLoader\ClassLoader;
+/**
+ * @requires extension apc
+ */
class ApcClassLoaderTest extends \PHPUnit_Framework_TestCase
{
protected function setUp()
{
- if (!extension_loaded('apc')) {
- $this->markTestSkipped('The apc extension is not available.');
- }
-
if (!(ini_get('apc.enabled') && ini_get('apc.enable_cli'))) {
$this->markTestSkipped('The apc extension is available, but not enabled.');
} else {
diff --git a/src/Symfony/Component/ClassLoader/composer.json b/src/Symfony/Component/ClassLoader/composer.json
index 9dd3bd3050..bde56db4a4 100644
--- a/src/Symfony/Component/ClassLoader/composer.json
+++ b/src/Symfony/Component/ClassLoader/composer.json
@@ -20,7 +20,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/finder": "~2.8|~3.0"
},
"autoload": {
diff --git a/src/Symfony/Component/ClassLoader/phpunit.xml.dist b/src/Symfony/Component/ClassLoader/phpunit.xml.dist
index 4856db5be6..b5e7ae76e6 100644
--- a/src/Symfony/Component/ClassLoader/phpunit.xml.dist
+++ b/src/Symfony/Component/ClassLoader/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Config/composer.json b/src/Symfony/Component/Config/composer.json
index a3e2cb2d4d..ed948ee48b 100644
--- a/src/Symfony/Component/Config/composer.json
+++ b/src/Symfony/Component/Config/composer.json
@@ -19,9 +19,6 @@
"php": ">=5.5.9",
"symfony/filesystem": "~2.8|~3.0"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\Config\\": "" }
},
diff --git a/src/Symfony/Component/Config/phpunit.xml.dist b/src/Symfony/Component/Config/phpunit.xml.dist
index 3fe6fd87c8..6aea524a11 100644
--- a/src/Symfony/Component/Config/phpunit.xml.dist
+++ b/src/Symfony/Component/Config/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Console/Output/ConsoleOutput.php b/src/Symfony/Component/Console/Output/ConsoleOutput.php
index d71f062dfb..8e1f360141 100644
--- a/src/Symfony/Component/Console/Output/ConsoleOutput.php
+++ b/src/Symfony/Component/Console/Output/ConsoleOutput.php
@@ -125,7 +125,13 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
*/
private function isRunningOS400()
{
- return 'OS400' === PHP_OS;
+ $checks = array(
+ function_exists('php_uname') ? php_uname('s') : '',
+ getenv('OSTYPE'),
+ PHP_OS,
+ );
+
+ return false !== stristr(implode(';', $checks), 'OS400');
}
/**
diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php
index 9b5b1f0e69..724234ea2a 100644
--- a/src/Symfony/Component/Console/Tests/ApplicationTest.php
+++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php
@@ -534,12 +534,11 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal');
}
+ /**
+ * @requires extension mbstring
+ */
public function testRenderExceptionWithDoubleWidthCharacters()
{
- if (!function_exists('mb_strwidth')) {
- $this->markTestSkipped('The "mb_strwidth" function is not available');
- }
-
$application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));
$application->setAutoExit(false);
$application->expects($this->any())
@@ -1040,12 +1039,11 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command');
}
+ /**
+ * @requires function posix_isatty
+ */
public function testCanCheckIfTerminalIsInteractive()
{
- if (!function_exists('posix_isatty')) {
- $this->markTestSkipped('posix_isatty function is required');
- }
-
$application = new CustomDefaultCommandApplication();
$application->setAutoExit(false);
diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php
index 66e7fa51a1..c39adab494 100644
--- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php
@@ -307,7 +307,9 @@ class CommandTest extends \PHPUnit_Framework_TestCase
);
}
- /** @dataProvider getSetCodeBindToClosureTests */
+ /**
+ * @dataProvider getSetCodeBindToClosureTests
+ */
public function testSetCodeBindToClosure($previouslyBound, $expected)
{
$code = createClosure();
diff --git a/src/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php
index e332774757..15b53e1da6 100644
--- a/src/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php
@@ -52,12 +52,11 @@ class FormatterHelperTest extends \PHPUnit_Framework_TestCase
);
}
+ /**
+ * @requires extension mbstring
+ */
public function testFormatBlockWithDiacriticLetters()
{
- if (!function_exists('mb_detect_encoding')) {
- $this->markTestSkipped('This test requires mbstring to work.');
- }
-
$formatter = new FormatterHelper();
$this->assertEquals(
@@ -69,11 +68,11 @@ class FormatterHelperTest extends \PHPUnit_Framework_TestCase
);
}
+ /**
+ * @requires extension mbstring
+ */
public function testFormatBlockWithDoubleWidthDiacriticLetters()
{
- if (!extension_loaded('mbstring')) {
- $this->markTestSkipped('This test requires mbstring to work.');
- }
$formatter = new FormatterHelper();
$this->assertEquals(
' '."\n".
diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php
index 21fdca0962..78f537543e 100644
--- a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php
@@ -270,12 +270,11 @@ class ProgressBarTest extends \PHPUnit_Framework_TestCase
$bar->advance(1);
}
+ /**
+ * @requires extension mbstring
+ */
public function testMultiByteSupport()
{
- if (!function_exists('mb_strlen') || (false === $encoding = mb_detect_encoding('■'))) {
- $this->markTestSkipped('The mbstring extension is needed for multi-byte support');
- }
-
$bar = new ProgressBar($output = $this->getOutputStream());
$bar->start();
$bar->setBarCharacter('■');
diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php
index b5c2eb11c5..4f89a9938f 100644
--- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php
@@ -464,12 +464,11 @@ TABLE
);
}
+ /**
+ * @requires extension mbstring
+ */
public function testRenderMultiByte()
{
- if (!function_exists('mb_strlen')) {
- $this->markTestSkipped('The "mbstring" extension is not available');
- }
-
$table = new Table($output = $this->getOutputStream());
$table
->setHeaders(array('■■'))
diff --git a/src/Symfony/Component/Console/composer.json b/src/Symfony/Component/Console/composer.json
index d8bcafe304..3804c07e73 100644
--- a/src/Symfony/Component/Console/composer.json
+++ b/src/Symfony/Component/Console/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/event-dispatcher": "~2.8|~3.0",
"symfony/process": "~2.8|~3.0",
"psr/log": "~1.0"
diff --git a/src/Symfony/Component/Console/phpunit.xml.dist b/src/Symfony/Component/Console/phpunit.xml.dist
index ae0dcbeaba..e68d03b732 100644
--- a/src/Symfony/Component/Console/phpunit.xml.dist
+++ b/src/Symfony/Component/Console/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/CssSelector/composer.json b/src/Symfony/Component/CssSelector/composer.json
index 4536d65a71..ab7561cc03 100644
--- a/src/Symfony/Component/CssSelector/composer.json
+++ b/src/Symfony/Component/CssSelector/composer.json
@@ -22,9 +22,6 @@
"require": {
"php": ">=5.5.9"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\CssSelector\\": "" }
},
diff --git a/src/Symfony/Component/CssSelector/phpunit.xml.dist b/src/Symfony/Component/CssSelector/phpunit.xml.dist
index 14a320c873..8593f5b711 100644
--- a/src/Symfony/Component/CssSelector/phpunit.xml.dist
+++ b/src/Symfony/Component/CssSelector/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Debug/composer.json b/src/Symfony/Component/Debug/composer.json
index fbef3d3aef..2b2397f158 100644
--- a/src/Symfony/Component/Debug/composer.json
+++ b/src/Symfony/Component/Debug/composer.json
@@ -23,7 +23,6 @@
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/class-loader": "~2.8|~3.0",
"symfony/http-kernel": "~2.8|~3.0"
},
diff --git a/src/Symfony/Component/Debug/phpunit.xml.dist b/src/Symfony/Component/Debug/phpunit.xml.dist
index e99c4ddf44..4f8f0dfec8 100644
--- a/src/Symfony/Component/Debug/phpunit.xml.dist
+++ b/src/Symfony/Component/Debug/phpunit.xml.dist
@@ -28,4 +28,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
index 6e112bb7ff..aed8cdfe1a 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
@@ -19,10 +19,6 @@ class MergeExtensionConfigurationPassTest extends \PHPUnit_Framework_TestCase
{
public function testExpressionLanguageProviderForwarding()
{
- if (true !== class_exists('Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage')) {
- $this->markTestSkipped('The ExpressionLanguage component isn\'t available!');
- }
-
$tmpProviders = array();
$extension = $this->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface');
diff --git a/src/Symfony/Component/DependencyInjection/composer.json b/src/Symfony/Component/DependencyInjection/composer.json
index 101aa72efd..c62805fea5 100644
--- a/src/Symfony/Component/DependencyInjection/composer.json
+++ b/src/Symfony/Component/DependencyInjection/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/yaml": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0",
"symfony/expression-language": "~2.8|~3.0"
diff --git a/src/Symfony/Component/DependencyInjection/phpunit.xml.dist b/src/Symfony/Component/DependencyInjection/phpunit.xml.dist
index 86252d0456..b9accb7dd1 100644
--- a/src/Symfony/Component/DependencyInjection/phpunit.xml.dist
+++ b/src/Symfony/Component/DependencyInjection/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/DomCrawler/composer.json b/src/Symfony/Component/DomCrawler/composer.json
index f3fd7cd9e1..25098d5227 100644
--- a/src/Symfony/Component/DomCrawler/composer.json
+++ b/src/Symfony/Component/DomCrawler/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/css-selector": "~2.8|~3.0"
},
"suggest": {
diff --git a/src/Symfony/Component/DomCrawler/phpunit.xml.dist b/src/Symfony/Component/DomCrawler/phpunit.xml.dist
index d15dd6a48e..8bccfa3c9b 100644
--- a/src/Symfony/Component/DomCrawler/phpunit.xml.dist
+++ b/src/Symfony/Component/DomCrawler/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/EventDispatcher/composer.json b/src/Symfony/Component/EventDispatcher/composer.json
index 4b27774b2b..df27dca7e6 100644
--- a/src/Symfony/Component/EventDispatcher/composer.json
+++ b/src/Symfony/Component/EventDispatcher/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/dependency-injection": "~2.8|~3.0",
"symfony/expression-language": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0",
diff --git a/src/Symfony/Component/EventDispatcher/phpunit.xml.dist b/src/Symfony/Component/EventDispatcher/phpunit.xml.dist
index ae0586e0b3..ed2f7e22ec 100644
--- a/src/Symfony/Component/EventDispatcher/phpunit.xml.dist
+++ b/src/Symfony/Component/EventDispatcher/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/ExpressionLanguage/composer.json b/src/Symfony/Component/ExpressionLanguage/composer.json
index 55e159f82d..fdefdddd42 100644
--- a/src/Symfony/Component/ExpressionLanguage/composer.json
+++ b/src/Symfony/Component/ExpressionLanguage/composer.json
@@ -18,9 +18,6 @@
"require": {
"php": ">=5.5.9"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\ExpressionLanguage\\": "" }
},
diff --git a/src/Symfony/Component/ExpressionLanguage/phpunit.xml.dist b/src/Symfony/Component/ExpressionLanguage/phpunit.xml.dist
index 183770651e..398e94275d 100644
--- a/src/Symfony/Component/ExpressionLanguage/phpunit.xml.dist
+++ b/src/Symfony/Component/ExpressionLanguage/phpunit.xml.dist
@@ -30,4 +30,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php
index 0ef9c8dddd..cb60736b40 100644
--- a/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php
+++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php
@@ -95,25 +95,25 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase
protected function markAsSkippedIfSymlinkIsMissing()
{
if (!function_exists('symlink')) {
- $this->markTestSkipped('symlink is not supported');
+ $this->markTestSkipped('Function symlink is required.');
}
if ('\\' === DIRECTORY_SEPARATOR && false === self::$symlinkOnWindows) {
- $this->markTestSkipped('symlink requires "Create symbolic links" privilege on windows');
+ $this->markTestSkipped('symlink requires "Create symbolic links" privilege on Windows');
}
}
protected function markAsSkippedIfChmodIsMissing()
{
if ('\\' === DIRECTORY_SEPARATOR) {
- $this->markTestSkipped('chmod is not supported on windows');
+ $this->markTestSkipped('chmod is not supported on Windows');
}
}
protected function markAsSkippedIfPosixIsMissing()
{
- if ('\\' === DIRECTORY_SEPARATOR || !function_exists('posix_isatty')) {
- $this->markTestSkipped('Posix is not supported');
+ if (!function_exists('posix_isatty')) {
+ $this->markTestSkipped('Function posix_isatty is required.');
}
}
}
diff --git a/src/Symfony/Component/Filesystem/composer.json b/src/Symfony/Component/Filesystem/composer.json
index 02fd9110a8..dcbc599fdd 100644
--- a/src/Symfony/Component/Filesystem/composer.json
+++ b/src/Symfony/Component/Filesystem/composer.json
@@ -18,9 +18,6 @@
"require": {
"php": ">=5.5.9"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\Filesystem\\": "" }
},
diff --git a/src/Symfony/Component/Filesystem/phpunit.xml.dist b/src/Symfony/Component/Filesystem/phpunit.xml.dist
index 7c6ba7aba3..0f4157e120 100644
--- a/src/Symfony/Component/Filesystem/phpunit.xml.dist
+++ b/src/Symfony/Component/Filesystem/phpunit.xml.dist
@@ -24,4 +24,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Finder/composer.json b/src/Symfony/Component/Finder/composer.json
index 75ba582a2d..2830f63223 100644
--- a/src/Symfony/Component/Finder/composer.json
+++ b/src/Symfony/Component/Finder/composer.json
@@ -18,9 +18,6 @@
"require": {
"php": ">=5.5.9"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\Finder\\": "" }
},
diff --git a/src/Symfony/Component/Finder/phpunit.xml.dist b/src/Symfony/Component/Finder/phpunit.xml.dist
index 631e570b94..4e7f4f022b 100644
--- a/src/Symfony/Component/Finder/phpunit.xml.dist
+++ b/src/Symfony/Component/Finder/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
index 7fc7d62107..48561daa6b 100644
--- a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
+++ b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
@@ -23,7 +23,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
protected function setUp()
{
if (!extension_loaded('intl')) {
- $this->markTestSkipped('The "intl" extension is not available');
+ $this->markTestSkipped('Extension intl is required.');
}
\Locale::setDefault('en');
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
index 8f23af510a..02131f68c4 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
@@ -236,13 +236,13 @@ class NumberToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($to, $transformer->reverseTransform($from));
}
- // https://github.com/symfony/symfony/issues/7609
+ /**
+ * @see https://github.com/symfony/symfony/issues/7609
+ *
+ * @requires extension mbstring
+ */
public function testReverseTransformWithGroupingAndFixedSpaces()
{
- if (!function_exists('mb_detect_encoding')) {
- $this->markTestSkipped('The "mbstring" extension is required for this test.');
- }
-
// Since we test against other locales, we need the full implementation
IntlTestHelper::requireFullIntl($this);
@@ -583,13 +583,10 @@ class NumberToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCase
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
* @expectedExceptionMessage The number contains unrecognized characters: "foo8"
+ * @requires extension mbstring
*/
public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte()
{
- if (!function_exists('mb_detect_encoding')) {
- $this->markTestSkipped('The "mbstring" extension is required for this test.');
- }
-
// Since we test against other locales, we need the full implementation
IntlTestHelper::requireFullIntl($this);
@@ -603,13 +600,10 @@ class NumberToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCase
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
* @expectedExceptionMessage The number contains unrecognized characters: "foo8"
+ * @requires extension mbstring
*/
public function testReverseTransformIgnoresTrailingSpacesInExceptionMessage()
{
- if (!function_exists('mb_detect_encoding')) {
- $this->markTestSkipped('The "mbstring" extension is required for this test.');
- }
-
// Since we test against other locales, we need the full implementation
IntlTestHelper::requireFullIntl($this);
@@ -634,13 +628,10 @@ class NumberToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCase
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
* @expectedExceptionMessage The number contains unrecognized characters: "foo"
+ * @requires extension mbstring
*/
public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte()
{
- if (!function_exists('mb_detect_encoding')) {
- $this->markTestSkipped('The "mbstring" extension is required for this test.');
- }
-
// Since we test against other locales, we need the full implementation
IntlTestHelper::requireFullIntl($this);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
index e04ea568b5..869ee7ddbb 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
@@ -905,8 +905,7 @@ class DateTypeTest extends TestCase
public function testYearsFor32BitsMachines()
{
if (4 !== PHP_INT_SIZE) {
- $this->markTestSkipped(
- 'PHP must be compiled in 32 bit mode to run this test');
+ $this->markTestSkipped('PHP 32 bit is required.');
}
$form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\DateType', null, array(
diff --git a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php
index 311ce9d3ef..ddbafe49dc 100644
--- a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php
+++ b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php
@@ -24,13 +24,10 @@ class StringUtilTest extends \PHPUnit_Framework_TestCase
/**
* @dataProvider spaceProvider
+ * @requires extension mbstring
*/
public function testTrimUtf8Separators($hex)
{
- if (!function_exists('mb_convert_encoding')) {
- $this->markTestSkipped('The "mb_convert_encoding" function is not available');
- }
-
// Convert hexadecimal representation into binary
// H: hex string, high nibble first (UCS-2BE)
// *: repeat until end of string
diff --git a/src/Symfony/Component/Form/composer.json b/src/Symfony/Component/Form/composer.json
index 619e6b28b8..6f319de08b 100644
--- a/src/Symfony/Component/Form/composer.json
+++ b/src/Symfony/Component/Form/composer.json
@@ -23,7 +23,6 @@
"symfony/property-access": "~2.8|~3.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"doctrine/collections": "~1.0",
"symfony/validator": "~2.8|~3.0",
"symfony/dependency-injection": "~2.8|~3.0",
diff --git a/src/Symfony/Component/Form/phpunit.xml.dist b/src/Symfony/Component/Form/phpunit.xml.dist
index fd668a9e8b..d01295e7ef 100644
--- a/src/Symfony/Component/Form/phpunit.xml.dist
+++ b/src/Symfony/Component/Form/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php b/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php
index 0002478246..8e3145b98a 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php
@@ -68,13 +68,10 @@ class IpUtilsTest extends \PHPUnit_Framework_TestCase
/**
* @expectedException \RuntimeException
+ * @requires extension sockets
*/
public function testAnIpv6WithOptionDisabledIpv6()
{
- if (!extension_loaded('sockets')) {
- $this->markTestSkipped('Only works when the socket extension is enabled');
- }
-
if (defined('AF_INET6')) {
$this->markTestSkipped('Only works when PHP is compiled with the option "disable-ipv6".');
}
diff --git a/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
index f1ea565700..44f264700e 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
@@ -208,10 +208,6 @@ class JsonResponseTest extends \PHPUnit_Framework_TestCase
*/
public function testSetContentJsonSerializeError()
{
- if (!interface_exists('JsonSerializable')) {
- $this->markTestSkipped('Interface JsonSerializable is available in PHP 5.4+');
- }
-
$serializable = new JsonSerializableObject();
JsonResponse::create($serializable);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
index e190a8bd28..368b6b3419 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
@@ -1006,13 +1006,10 @@ class RequestTest extends \PHPUnit_Framework_TestCase
/**
* @dataProvider getContentCantBeCalledTwiceWithResourcesProvider
+ * @requires PHP 5.6
*/
public function testGetContentCanBeCalledTwiceWithResources($first, $second)
{
- if (PHP_VERSION_ID < 50600) {
- $this->markTestSkipped('PHP < 5.6 does not allow to open php://input several times.');
- }
-
$req = new Request();
$a = $req->getContent($first);
$b = $req->getContent($second);
@@ -1279,12 +1276,11 @@ class RequestTest extends \PHPUnit_Framework_TestCase
$this->assertFalse($request->isXmlHttpRequest());
}
+ /**
+ * @requires extension intl
+ */
public function testIntlLocale()
{
- if (!extension_loaded('intl')) {
- $this->markTestSkipped('The intl extension is needed to run this test.');
- }
-
$request = new Request();
$request->setDefaultLocale('fr');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php
index 8d38ab3de9..33fb3f933e 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php
@@ -13,6 +13,9 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHandler;
+/**
+ * @requires extension memcache
+ */
class MemcacheSessionHandlerTest extends \PHPUnit_Framework_TestCase
{
const PREFIX = 'prefix_';
@@ -26,10 +29,6 @@ class MemcacheSessionHandlerTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- if (!class_exists('Memcache')) {
- $this->markTestSkipped('Skipped tests Memcache class is not present');
- }
-
$this->memcache = $this->getMock('Memcache');
$this->storage = new MemcacheSessionHandler(
$this->memcache,
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php
index a7e590871a..e138b7169b 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php
@@ -13,6 +13,9 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler;
+/**
+ * @requires extension memcached
+ */
class MemcachedSessionHandlerTest extends \PHPUnit_Framework_TestCase
{
const PREFIX = 'prefix_';
@@ -27,10 +30,6 @@ class MemcachedSessionHandlerTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- if (!class_exists('Memcached')) {
- $this->markTestSkipped('Skipped tests Memcached class is not present');
- }
-
if (version_compare(phpversion('memcached'), '2.2.0', '>=')) {
$this->markTestSkipped('Tests can only be run with memcached extension 2.1.0 or lower');
}
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
index 806ac629a1..b51a13a279 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
@@ -15,6 +15,7 @@ use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandl
/**
* @author Markus Bachmann
+ * @requires extension mongo
*/
class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase
{
@@ -27,10 +28,6 @@ class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- if (!extension_loaded('mongo')) {
- $this->markTestSkipped('MongoDbSessionHandler requires the PHP "mongo" extension.');
- }
-
$mongoClass = version_compare(phpversion('mongo'), '1.3.0', '<') ? 'Mongo' : 'MongoClient';
$this->mongo = $this->getMockBuilder($mongoClass)
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
index a6cde72960..641362af3b 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
@@ -13,17 +13,13 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler;
+/**
+ * @requires extension pdo_sqlite
+ */
class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase
{
private $dbFile;
- protected function setUp()
- {
- if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
- $this->markTestSkipped('This test requires SQLite support in your environment');
- }
- }
-
protected function tearDown()
{
// make sure the temporary database file is deleted when it has been created (even when a test fails)
diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json
index 3aa37d06bb..d1746e405e 100644
--- a/src/Symfony/Component/HttpFoundation/composer.json
+++ b/src/Symfony/Component/HttpFoundation/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/expression-language": "~2.8|~3.0"
},
"autoload": {
diff --git a/src/Symfony/Component/HttpFoundation/phpunit.xml.dist b/src/Symfony/Component/HttpFoundation/phpunit.xml.dist
index 9ffdb43a2d..69c3f5eb20 100644
--- a/src/Symfony/Component/HttpFoundation/phpunit.xml.dist
+++ b/src/Symfony/Component/HttpFoundation/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/Util/ValueExporterTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/Util/ValueExporterTest.php
index 8d3ddb4e5d..d5bccfd600 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/Util/ValueExporterTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/Util/ValueExporterTest.php
@@ -33,10 +33,6 @@ class ValueExporterTest extends \PHPUnit_Framework_TestCase
public function testDateTimeImmutable()
{
- if (!class_exists('DateTimeImmutable', false)) {
- $this->markTestSkipped('Test skipped, class DateTimeImmutable does not exist.');
- }
-
$dateTime = new \DateTimeImmutable('2014-06-10 07:35:40', new \DateTimeZone('UTC'));
$this->assertSame('Object(DateTimeImmutable) - 2014-06-10T07:35:40+0000', $this->valueExporter->exportValue($dateTime));
}
diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json
index 82f01cd0e4..ba10976e9d 100644
--- a/src/Symfony/Component/HttpKernel/composer.json
+++ b/src/Symfony/Component/HttpKernel/composer.json
@@ -23,7 +23,6 @@
"psr/log": "~1.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/browser-kit": "~2.8|~3.0",
"symfony/class-loader": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0",
diff --git a/src/Symfony/Component/HttpKernel/phpunit.xml.dist b/src/Symfony/Component/HttpKernel/phpunit.xml.dist
index 13149663e4..0c22f2cdff 100644
--- a/src/Symfony/Component/HttpKernel/phpunit.xml.dist
+++ b/src/Symfony/Component/HttpKernel/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php
index 4875f8cbd3..c71ad94646 100644
--- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php
+++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php
@@ -16,6 +16,7 @@ use Symfony\Component\Intl\Intl;
/**
* @author Bernhard Schussek
+ * @requires extension intl
*/
class IntlBundleReaderTest extends \PHPUnit_Framework_TestCase
{
@@ -26,11 +27,6 @@ class IntlBundleReaderTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- // We only run tests if the intl extension is loaded...
- if (!Intl::isExtensionLoaded()) {
- $this->markTestSkipped('The intl extension is not available.');
- }
-
$this->reader = new IntlBundleReader();
}
diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php
index 7605616d04..d630b20ef8 100644
--- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php
+++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php
@@ -64,13 +64,11 @@ class JsonBundleWriterTest extends \PHPUnit_Framework_TestCase
$this->assertFileEquals(__DIR__.'/Fixtures/en.json', $this->directory.'/en.json');
}
+ /**
+ * @requires extension intl
+ */
public function testWriteResourceBundle()
{
- // We only run tests if the intl extension is loaded...
- if (!Intl::isExtensionLoaded()) {
- $this->markTestSkipped('The intl extension is not available.');
- }
-
$bundle = new \ResourceBundle('rb', __DIR__.'/Fixtures', false);
$this->writer->write($this->directory, 'en', $bundle);
diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php
index 2eb76075d9..588d14d846 100644
--- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php
+++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php
@@ -64,13 +64,11 @@ class PhpBundleWriterTest extends \PHPUnit_Framework_TestCase
$this->assertFileEquals(__DIR__.'/Fixtures/en.php', $this->directory.'/en.php');
}
+ /**
+ * @requires extension intl
+ */
public function testWriteResourceBundle()
{
- // We only run tests if the intl extension is loaded...
- if (!Intl::isExtensionLoaded()) {
- $this->markTestSkipped('The intl extension is not available.');
- }
-
$bundle = new \ResourceBundle('rb', __DIR__.'/Fixtures', false);
$this->writer->write($this->directory, 'en', $bundle);
diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
index b24a3f676c..e237ab97d7 100644
--- a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
+++ b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
@@ -369,10 +369,6 @@ abstract class AbstractIntlDateFormatterTest extends \PHPUnit_Framework_TestCase
public function testFormatWithIntlTimeZone()
{
- if (!class_exists('IntlTimeZone')) {
- $this->markTestSkipped('This test requires the IntlTimeZone class from the Intl extension.');
- }
-
$formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, \IntlTimeZone::createTimeZone('GMT+03:00'), IntlDateFormatter::GREGORIAN, 'zzzz');
$this->assertEquals('GMT+03:00', $formatter->format(0));
diff --git a/src/Symfony/Component/Intl/Util/IntlTestHelper.php b/src/Symfony/Component/Intl/Util/IntlTestHelper.php
index 7c6a1e9640..cefb8db991 100644
--- a/src/Symfony/Component/Intl/Util/IntlTestHelper.php
+++ b/src/Symfony/Component/Intl/Util/IntlTestHelper.php
@@ -40,7 +40,7 @@ class IntlTestHelper
// * the intl extension is not loaded
if (IcuVersion::compare(Intl::getIcuVersion(), Intl::getIcuStubVersion(), '!=', 1)) {
- $testCase->markTestSkipped('Please change ICU version to '.Intl::getIcuStubVersion());
+ $testCase->markTestSkipped('ICU version '.Intl::getIcuStubVersion().' is required.');
}
// Normalize the default locale in case this is not done explicitly
@@ -67,12 +67,12 @@ class IntlTestHelper
{
// We only run tests if the intl extension is loaded...
if (!Intl::isExtensionLoaded()) {
- $testCase->markTestSkipped('The intl extension is not available.');
+ $testCase->markTestSkipped('Extension intl is required.');
}
// ... and only if the version is *one specific version*
if (IcuVersion::compare(Intl::getIcuVersion(), Intl::getIcuStubVersion(), '!=', 1)) {
- $testCase->markTestSkipped('Please change ICU version to '.Intl::getIcuStubVersion());
+ $testCase->markTestSkipped('ICU version '.Intl::getIcuStubVersion().' is required.');
}
// Normalize the default locale in case this is not done explicitly
@@ -95,7 +95,7 @@ class IntlTestHelper
public static function require32Bit(\PhpUnit_Framework_TestCase $testCase)
{
if (4 !== PHP_INT_SIZE) {
- $testCase->markTestSkipped('PHP must be compiled in 32 bit mode to run this test');
+ $testCase->markTestSkipped('PHP 32 bit is required.');
}
}
@@ -107,7 +107,7 @@ class IntlTestHelper
public static function require64Bit(\PhpUnit_Framework_TestCase $testCase)
{
if (8 !== PHP_INT_SIZE) {
- $testCase->markTestSkipped('PHP must be compiled in 64 bit mode to run this test');
+ $testCase->markTestSkipped('PHP 64 bit is required.');
}
}
diff --git a/src/Symfony/Component/Intl/composer.json b/src/Symfony/Component/Intl/composer.json
index a1a590a542..e8bf94863b 100644
--- a/src/Symfony/Component/Intl/composer.json
+++ b/src/Symfony/Component/Intl/composer.json
@@ -27,7 +27,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/filesystem": "~2.8|~3.0"
},
"suggest": {
diff --git a/src/Symfony/Component/Intl/phpunit.xml.dist b/src/Symfony/Component/Intl/phpunit.xml.dist
index e42226a1b1..d2eb0ba4aa 100644
--- a/src/Symfony/Component/Intl/phpunit.xml.dist
+++ b/src/Symfony/Component/Intl/phpunit.xml.dist
@@ -31,4 +31,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Ldap/Tests/LdapClientTest.php b/src/Symfony/Component/Ldap/Tests/LdapClientTest.php
index 5b67ea8540..22a548c272 100644
--- a/src/Symfony/Component/Ldap/Tests/LdapClientTest.php
+++ b/src/Symfony/Component/Ldap/Tests/LdapClientTest.php
@@ -13,15 +13,11 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider;
use Symfony\Component\Ldap\LdapClient;
+/**
+ * @requires extension ldap
+ */
class LdapClientTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- if (!extension_loaded('ldap')) {
- $this->markTestSkipped('The ldap extension is not available');
- }
- }
-
/**
* @dataProvider provideLdapEscapeValues
*/
diff --git a/src/Symfony/Component/Ldap/composer.json b/src/Symfony/Component/Ldap/composer.json
index 397eab4fe7..4b74f498b7 100644
--- a/src/Symfony/Component/Ldap/composer.json
+++ b/src/Symfony/Component/Ldap/composer.json
@@ -19,9 +19,6 @@
"php": ">=5.5.9",
"ext-ldap": "*"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\Ldap\\": "" }
},
diff --git a/src/Symfony/Component/Ldap/phpunit.xml.dist b/src/Symfony/Component/Ldap/phpunit.xml.dist
index 82f3331146..2637975ec8 100644
--- a/src/Symfony/Component/Ldap/phpunit.xml.dist
+++ b/src/Symfony/Component/Ldap/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/OptionsResolver/composer.json b/src/Symfony/Component/OptionsResolver/composer.json
index 9b8d28fc7c..5ed2d0a882 100644
--- a/src/Symfony/Component/OptionsResolver/composer.json
+++ b/src/Symfony/Component/OptionsResolver/composer.json
@@ -18,9 +18,6 @@
"require": {
"php": ">=5.5.9"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\OptionsResolver\\": "" }
},
diff --git a/src/Symfony/Component/OptionsResolver/phpunit.xml.dist b/src/Symfony/Component/OptionsResolver/phpunit.xml.dist
index 5a2316a1c9..2c717efa43 100644
--- a/src/Symfony/Component/OptionsResolver/phpunit.xml.dist
+++ b/src/Symfony/Component/OptionsResolver/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Process/ExecutableFinder.php b/src/Symfony/Component/Process/ExecutableFinder.php
index a9c0a5c879..fa11cb6e40 100644
--- a/src/Symfony/Component/Process/ExecutableFinder.php
+++ b/src/Symfony/Component/Process/ExecutableFinder.php
@@ -56,7 +56,8 @@ class ExecutableFinder
$searchPath = explode(PATH_SEPARATOR, ini_get('open_basedir'));
$dirs = array();
foreach ($searchPath as $path) {
- if (is_dir($path)) {
+ // Silencing against https://bugs.php.net/69240
+ if (@is_dir($path)) {
$dirs[] = $path;
} else {
if (basename($path) == $name && is_executable($path)) {
diff --git a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php
index c9979ca3d6..4a8d1a5281 100644
--- a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php
+++ b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php
@@ -72,10 +72,11 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
$this->assertNull($p->getTimeout());
}
+ /**
+ * @requires extension pcntl
+ */
public function testStopWithTimeoutIsActuallyWorking()
{
- $this->verifyPosixIsEnabled();
-
// exec is mandatory here since we send a signal to the process
// see https://github.com/symfony/symfony/issues/5030 about prepending
// command with exec
@@ -702,16 +703,11 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($termSignal, $process->getTermSignal());
}
+ /**
+ * @requires function posix_kill
+ */
public function testProcessThrowsExceptionWhenExternallySignaled()
{
- if ('\\' === DIRECTORY_SEPARATOR) {
- $this->markTestSkipped('Windows does not support POSIX signals');
- }
-
- if (!function_exists('posix_kill')) {
- $this->markTestSkipped('posix_kill is required for this test');
- }
-
$termSignal = defined('SIGKILL') ? SIGKILL : 9;
$process = $this->getProcess('exec php -r "while (true) {}"');
@@ -884,10 +880,11 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
$this->assertNull($process->getPid());
}
+ /**
+ * @requires extension pcntl
+ */
public function testSignal()
{
- $this->verifyPosixIsEnabled();
-
$process = $this->getProcess('exec php -f '.__DIR__.'/SignalListener.php');
$process->start();
usleep(500000);
@@ -900,10 +897,11 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('Caught SIGUSR1', $process->getOutput());
}
+ /**
+ * @requires extension pcntl
+ */
public function testExitCodeIsAvailableAfterSignal()
{
- $this->verifyPosixIsEnabled();
-
$process = $this->getProcess('sleep 4');
$process->start();
$process->signal(SIGKILL);
@@ -920,10 +918,10 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
/**
* @expectedException \Symfony\Component\Process\Exception\LogicException
+ * @requires extension pcntl
*/
public function testSignalProcessNotRunning()
{
- $this->verifyPosixIsEnabled();
$process = $this->getProcess(self::$phpBin.' -v');
$process->signal(SIGHUP);
}
@@ -977,16 +975,6 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
);
}
- private function verifyPosixIsEnabled()
- {
- if ('\\' === DIRECTORY_SEPARATOR) {
- $this->markTestSkipped('POSIX signals do not work on Windows');
- }
- if (!defined('SIGUSR1')) {
- $this->markTestSkipped('The pcntl extension is not enabled');
- }
- }
-
/**
* @expectedException \Symfony\Component\Process\Exception\RuntimeException
*/
diff --git a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
index 61a471b4f6..dccb97c30d 100644
--- a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
+++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
@@ -36,10 +36,6 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
public function testFind()
{
- if (!defined('PHP_BINARY')) {
- $this->markTestSkipped('Requires the PHP_BINARY constant');
- }
-
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
@@ -70,10 +66,6 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
public function testFindWithExtraDirs()
{
- if (!defined('PHP_BINARY')) {
- $this->markTestSkipped('Requires the PHP_BINARY constant');
- }
-
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
@@ -90,10 +82,6 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
public function testFindWithOpenBaseDir()
{
- if (!defined('PHP_BINARY')) {
- $this->markTestSkipped('Requires the PHP_BINARY constant');
- }
-
if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Cannot run test on windows');
}
@@ -115,11 +103,6 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
-
- if (!defined('PHP_BINARY')) {
- $this->markTestSkipped('Requires the PHP_BINARY constant');
- }
-
if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Cannot run test on windows');
}
diff --git a/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php
index cd4abedc9d..7e7f4772b0 100644
--- a/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php
+++ b/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php
@@ -18,30 +18,6 @@ use Symfony\Component\Process\PhpExecutableFinder;
*/
class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
{
- /**
- * tests find() with the env var PHP_PATH.
- */
- public function testFindWithPhpPath()
- {
- if (defined('PHP_BINARY')) {
- $this->markTestSkipped('The PHP binary is easily available as of PHP 5.4');
- }
-
- $f = new PhpExecutableFinder();
-
- $current = $f->find();
-
- //not executable PHP_PATH
- putenv('PHP_PATH=/not/executable/php');
- $this->assertFalse($f->find(), '::find() returns false for not executable PHP');
- $this->assertFalse($f->find(false), '::find() returns false for not executable PHP');
-
- //executable PHP_PATH
- putenv('PHP_PATH='.$current);
- $this->assertEquals($f->find(), $current, '::find() returns the executable PHP');
- $this->assertEquals($f->find(false), $current, '::find() returns the executable PHP');
- }
-
/**
* tests find() with the env var PHP_PATH.
*/
@@ -72,26 +48,4 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($f->findArguments(), array(), '::findArguments() returns no arguments');
}
}
-
- /**
- * tests find() with default executable.
- */
- public function testFindWithSuffix()
- {
- if (defined('PHP_BINARY')) {
- $this->markTestSkipped('The PHP binary is easily available as of PHP 5.4');
- }
-
- putenv('PHP_PATH=');
- putenv('PHP_PEAR_PHP_BIN=');
- $f = new PhpExecutableFinder();
-
- $current = $f->find();
-
- //TODO maybe php executable is custom or even Windows
- if ('\\' === DIRECTORY_SEPARATOR) {
- $this->assertTrue(is_executable($current));
- $this->assertTrue((bool) preg_match('/'.addslashes(DIRECTORY_SEPARATOR).'php\.(exe|bat|cmd|com)$/i', $current), '::find() returns the executable PHP with suffixes');
- }
- }
}
diff --git a/src/Symfony/Component/Process/composer.json b/src/Symfony/Component/Process/composer.json
index 922bb282db..aa91859aaf 100644
--- a/src/Symfony/Component/Process/composer.json
+++ b/src/Symfony/Component/Process/composer.json
@@ -18,9 +18,6 @@
"require": {
"php": ">=5.5.9"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\Process\\": "" }
},
diff --git a/src/Symfony/Component/Process/phpunit.xml.dist b/src/Symfony/Component/Process/phpunit.xml.dist
index b5d605c2ef..7f2a1db706 100644
--- a/src/Symfony/Component/Process/phpunit.xml.dist
+++ b/src/Symfony/Component/Process/phpunit.xml.dist
@@ -24,4 +24,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
index fb4e3c34ee..ce4438550e 100644
--- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
+++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
@@ -11,6 +11,7 @@
namespace Symfony\Component\PropertyAccess\Tests;
+use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException;
use Symfony\Component\PropertyAccess\PropertyAccessor;
use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClass;
use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClassMagicCall;
@@ -139,6 +140,20 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase
$this->assertSame(array('Bernhard'), $object->firstName);
}
+ public function testGetValueNotModifyObjectException()
+ {
+ $propertyAccessor = new PropertyAccessor(false, true);
+ $object = new \stdClass();
+ $object->firstName = array('Bernhard');
+
+ try {
+ $propertyAccessor->getValue($object, 'firstName[1]');
+ } catch (NoSuchIndexException $e) {
+ }
+
+ $this->assertSame(array('Bernhard'), $object->firstName);
+ }
+
/**
* @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException
*/
diff --git a/src/Symfony/Component/PropertyAccess/composer.json b/src/Symfony/Component/PropertyAccess/composer.json
index c313a09a7a..53aa3b5730 100644
--- a/src/Symfony/Component/PropertyAccess/composer.json
+++ b/src/Symfony/Component/PropertyAccess/composer.json
@@ -18,9 +18,6 @@
"require": {
"php": ">=5.5.9"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\PropertyAccess\\": "" }
},
diff --git a/src/Symfony/Component/PropertyAccess/phpunit.xml.dist b/src/Symfony/Component/PropertyAccess/phpunit.xml.dist
index fcf5f6ae56..d132f0b354 100644
--- a/src/Symfony/Component/PropertyAccess/phpunit.xml.dist
+++ b/src/Symfony/Component/PropertyAccess/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php
index ba00d1c792..0740997eed 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php
@@ -75,13 +75,10 @@ class ReflectionExtractorTest extends \PHPUnit_Framework_TestCase
/**
* @dataProvider php7TypesProvider
+ * @requires PHP 7.0
*/
public function testExtractPhp7Type($property, array $type = null)
{
- if (!method_exists('\ReflectionMethod', 'getReturnType')) {
- $this->markTestSkipped('Available only with PHP 7 and superior.');
- }
-
$this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php7Dummy', $property, array()));
}
diff --git a/src/Symfony/Component/PropertyInfo/composer.json b/src/Symfony/Component/PropertyInfo/composer.json
index 314d552dd5..3113366f1a 100644
--- a/src/Symfony/Component/PropertyInfo/composer.json
+++ b/src/Symfony/Component/PropertyInfo/composer.json
@@ -26,7 +26,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/serializer": "~2.8|~3.0",
"phpdocumentor/reflection": "^1.0.7",
"doctrine/annotations": "~1.0"
diff --git a/src/Symfony/Component/PropertyInfo/phpunit.xml.dist b/src/Symfony/Component/PropertyInfo/phpunit.xml.dist
index 518e472db7..99239f5605 100644
--- a/src/Symfony/Component/PropertyInfo/phpunit.xml.dist
+++ b/src/Symfony/Component/PropertyInfo/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Routing/composer.json b/src/Symfony/Component/Routing/composer.json
index d592009195..00963be5e4 100644
--- a/src/Symfony/Component/Routing/composer.json
+++ b/src/Symfony/Component/Routing/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0",
"symfony/http-foundation": "~2.8|~3.0",
"symfony/yaml": "~2.8|~3.0",
diff --git a/src/Symfony/Component/Routing/phpunit.xml.dist b/src/Symfony/Component/Routing/phpunit.xml.dist
index a9083088a9..aba377e30f 100644
--- a/src/Symfony/Component/Routing/phpunit.xml.dist
+++ b/src/Symfony/Component/Routing/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Security/Core/composer.json b/src/Symfony/Component/Security/Core/composer.json
index 860974ee9f..bc14d0abd1 100644
--- a/src/Symfony/Component/Security/Core/composer.json
+++ b/src/Symfony/Component/Security/Core/composer.json
@@ -20,7 +20,6 @@
"paragonie/random_compat": "~1.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/event-dispatcher": "~2.8|~3.0",
"symfony/expression-language": "~2.8|~3.0",
"symfony/http-foundation": "~2.8|~3.0",
diff --git a/src/Symfony/Component/Security/Core/phpunit.xml.dist b/src/Symfony/Component/Security/Core/phpunit.xml.dist
index 8a1a2914b0..739cb6e816 100644
--- a/src/Symfony/Component/Security/Core/phpunit.xml.dist
+++ b/src/Symfony/Component/Security/Core/phpunit.xml.dist
@@ -30,4 +30,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php
index 4166c1eb4a..0eac0a8aa0 100644
--- a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php
+++ b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php
@@ -32,10 +32,6 @@ class SessionTokenStorageTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- if (!interface_exists('Symfony\Component\HttpFoundation\Session\SessionInterface')) {
- $this->markTestSkipped('The "HttpFoundation" component is not available');
- }
-
$this->session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')
->disableOriginalConstructor()
->getMock();
diff --git a/src/Symfony/Component/Security/Csrf/composer.json b/src/Symfony/Component/Security/Csrf/composer.json
index 1510b1d102..7366b026fc 100644
--- a/src/Symfony/Component/Security/Csrf/composer.json
+++ b/src/Symfony/Component/Security/Csrf/composer.json
@@ -21,7 +21,6 @@
"paragonie/random_compat": "~1.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/http-foundation": "~2.8|~3.0"
},
"suggest": {
diff --git a/src/Symfony/Component/Security/Csrf/phpunit.xml.dist b/src/Symfony/Component/Security/Csrf/phpunit.xml.dist
index 8f950a3d3d..3e3d430ccc 100644
--- a/src/Symfony/Component/Security/Csrf/phpunit.xml.dist
+++ b/src/Symfony/Component/Security/Csrf/phpunit.xml.dist
@@ -30,4 +30,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Security/Guard/composer.json b/src/Symfony/Component/Security/Guard/composer.json
index ebb3546bdb..d2a09b9d8b 100644
--- a/src/Symfony/Component/Security/Guard/composer.json
+++ b/src/Symfony/Component/Security/Guard/composer.json
@@ -21,7 +21,6 @@
"symfony/security-http": "~2.8|~3.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"psr/log": "~1.0"
},
"autoload": {
diff --git a/src/Symfony/Component/Security/Guard/phpunit.xml.dist b/src/Symfony/Component/Security/Guard/phpunit.xml.dist
index 093628b332..99251f16dc 100644
--- a/src/Symfony/Component/Security/Guard/phpunit.xml.dist
+++ b/src/Symfony/Component/Security/Guard/phpunit.xml.dist
@@ -30,4 +30,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Security/Http/composer.json b/src/Symfony/Component/Security/Http/composer.json
index 76f1a8be12..b7fe6863d2 100644
--- a/src/Symfony/Component/Security/Http/composer.json
+++ b/src/Symfony/Component/Security/Http/composer.json
@@ -25,7 +25,6 @@
"paragonie/random_compat": "~1.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/routing": "~2.8|~3.0",
"symfony/security-csrf": "~2.8|~3.0",
"psr/log": "~1.0"
diff --git a/src/Symfony/Component/Security/Http/phpunit.xml.dist b/src/Symfony/Component/Security/Http/phpunit.xml.dist
index 49b36f2718..33e60d748e 100644
--- a/src/Symfony/Component/Security/Http/phpunit.xml.dist
+++ b/src/Symfony/Component/Security/Http/phpunit.xml.dist
@@ -30,4 +30,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Security/composer.json b/src/Symfony/Component/Security/composer.json
index af2c50b43b..3f317feb82 100644
--- a/src/Symfony/Component/Security/composer.json
+++ b/src/Symfony/Component/Security/composer.json
@@ -31,7 +31,6 @@
},
"require-dev": {
"symfony/finder": "~2.8|~3.0",
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/intl": "~2.8|~3.0",
"symfony/routing": "~2.8|~3.0",
"symfony/translation": "~2.8|~3.0",
diff --git a/src/Symfony/Component/Security/phpunit.xml.dist b/src/Symfony/Component/Security/phpunit.xml.dist
index 0d9fe5fee1..1ca767d881 100644
--- a/src/Symfony/Component/Security/phpunit.xml.dist
+++ b/src/Symfony/Component/Security/phpunit.xml.dist
@@ -32,4 +32,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Serializer/composer.json b/src/Symfony/Component/Serializer/composer.json
index 2c2497cdd7..2e6f2a1ba4 100644
--- a/src/Symfony/Component/Serializer/composer.json
+++ b/src/Symfony/Component/Serializer/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/yaml": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0",
"symfony/property-access": "~2.8|~3.0",
diff --git a/src/Symfony/Component/Serializer/phpunit.xml.dist b/src/Symfony/Component/Serializer/phpunit.xml.dist
index 279e1eb3aa..3a1aadcb86 100644
--- a/src/Symfony/Component/Serializer/phpunit.xml.dist
+++ b/src/Symfony/Component/Serializer/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Stopwatch/composer.json b/src/Symfony/Component/Stopwatch/composer.json
index 428488ec55..134a41a971 100644
--- a/src/Symfony/Component/Stopwatch/composer.json
+++ b/src/Symfony/Component/Stopwatch/composer.json
@@ -18,9 +18,6 @@
"require": {
"php": ">=5.5.9"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\Stopwatch\\": "" }
},
diff --git a/src/Symfony/Component/Stopwatch/phpunit.xml.dist b/src/Symfony/Component/Stopwatch/phpunit.xml.dist
index b16dcaebf9..87f589ae4b 100644
--- a/src/Symfony/Component/Stopwatch/phpunit.xml.dist
+++ b/src/Symfony/Component/Stopwatch/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Templating/composer.json b/src/Symfony/Component/Templating/composer.json
index 7b59b6ca5d..c4bbabf759 100644
--- a/src/Symfony/Component/Templating/composer.json
+++ b/src/Symfony/Component/Templating/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"psr/log": "~1.0"
},
"suggest": {
diff --git a/src/Symfony/Component/Templating/phpunit.xml.dist b/src/Symfony/Component/Templating/phpunit.xml.dist
index 3da1f5de13..8a06747f37 100644
--- a/src/Symfony/Component/Templating/phpunit.xml.dist
+++ b/src/Symfony/Component/Templating/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php b/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php
index 31be3f2f15..5ef81712f4 100644
--- a/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php
+++ b/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php
@@ -17,12 +17,6 @@ use Symfony\Component\Translation\Loader\ArrayLoader;
class DataCollectorTranslatorTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- if (!class_exists('Symfony\Component\HttpKernel\DataCollector\DataCollector')) {
- $this->markTestSkipped('The "DataCollector" is not available');
- }
- }
public function testCollectMessages()
{
$collector = $this->createCollector();
diff --git a/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php b/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php
index 7122ddd135..117218aec7 100644
--- a/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php
+++ b/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php
@@ -16,12 +16,11 @@ use Symfony\Component\Translation\Dumper\IcuResFileDumper;
class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase
{
+ /**
+ * @requires extension mbstring
+ */
public function testFormatCatalogue()
{
- if (!function_exists('mb_convert_encoding')) {
- $this->markTestSkipped('This test requires mbstring to work.');
- }
-
$catalogue = new MessageCatalogue('en');
$catalogue->add(array('foo' => 'bar'));
diff --git a/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
index ea9643d682..888fb61574 100644
--- a/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
+++ b/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
@@ -14,15 +14,11 @@ namespace Symfony\Component\Translation\Tests\Loader;
use Symfony\Component\Translation\Loader\IcuDatFileLoader;
use Symfony\Component\Config\Resource\FileResource;
+/**
+ * @requires extension intl
+ */
class IcuDatFileLoaderTest extends LocalizedTestCase
{
- protected function setUp()
- {
- if (!extension_loaded('intl')) {
- $this->markTestSkipped('This test requires intl extension to work.');
- }
- }
-
/**
* @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException
*/
diff --git a/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php
index 1a935c0404..8d9ed19914 100644
--- a/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php
+++ b/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php
@@ -14,15 +14,11 @@ namespace Symfony\Component\Translation\Tests\Loader;
use Symfony\Component\Translation\Loader\IcuResFileLoader;
use Symfony\Component\Config\Resource\DirectoryResource;
+/**
+ * @requires extension intl
+ */
class IcuResFileLoaderTest extends LocalizedTestCase
{
- protected function setUp()
- {
- if (!extension_loaded('intl')) {
- $this->markTestSkipped('This test requires intl extension to work.');
- }
- }
-
public function testLoad()
{
// resource is build using genrb command
diff --git a/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php
index 6d4f353bf7..cd5d6339f7 100644
--- a/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php
+++ b/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php
@@ -16,13 +16,6 @@ use Symfony\Component\Config\Resource\FileResource;
class JsonFileLoaderTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
- $this->markTestSkipped('The "Config" component is not available');
- }
- }
-
public function testLoad()
{
$loader = new JsonFileLoader();
diff --git a/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php b/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php
index 9d7c5d70e8..0d1fff7ac4 100644
--- a/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php
+++ b/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php
@@ -16,7 +16,7 @@ abstract class LocalizedTestCase extends \PHPUnit_Framework_TestCase
protected function setUp()
{
if (!extension_loaded('intl')) {
- $this->markTestSkipped('The "intl" extension is not available');
+ $this->markTestSkipped('Extension intl is required.');
}
}
}
diff --git a/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php
index ea0da6d503..8f8224a5cb 100644
--- a/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php
+++ b/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php
@@ -59,12 +59,11 @@ class XliffFileLoaderTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(array('foo' => 'bar', 'extra' => 'extra', 'key' => '', 'test' => 'with'), $catalogue->all('domain1'));
}
+ /**
+ * @requires extension mbstring
+ */
public function testEncoding()
{
- if (!function_exists('iconv') && !function_exists('mb_convert_encoding')) {
- $this->markTestSkipped('The iconv and mbstring extensions are not available.');
- }
-
$loader = new XliffFileLoader();
$catalogue = $loader->load(__DIR__.'/../fixtures/encoding.xlf', 'en', 'domain1');
diff --git a/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php b/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php
index ab98d72e74..9f3e849bf4 100644
--- a/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php
+++ b/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php
@@ -17,13 +17,6 @@ use Symfony\Component\Translation\Loader\ArrayLoader;
class LoggingTranslatorTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- if (!interface_exists('Psr\Log\LoggerInterface')) {
- $this->markTestSkipped('The "LoggerInterface" is not available');
- }
- }
-
public function testTransWithNoTranslationIsLogged()
{
$logger = $this->getMock('Psr\Log\LoggerInterface');
diff --git a/src/Symfony/Component/Translation/composer.json b/src/Symfony/Component/Translation/composer.json
index 8c8506c60e..e6d3bd44e7 100644
--- a/src/Symfony/Component/Translation/composer.json
+++ b/src/Symfony/Component/Translation/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/config": "~2.8|~3.0",
"symfony/intl": "~2.8|~3.0",
"symfony/yaml": "~2.8|~3.0",
diff --git a/src/Symfony/Component/Translation/phpunit.xml.dist b/src/Symfony/Component/Translation/phpunit.xml.dist
index 16cca4afb7..c908a7985f 100644
--- a/src/Symfony/Component/Translation/phpunit.xml.dist
+++ b/src/Symfony/Component/Translation/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php
index f61483d147..8dc6a39d5d 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php
@@ -82,12 +82,11 @@ class LengthValidatorTest extends AbstractConstraintValidatorTest
);
}
+ /**
+ * @requires extension mbstring
+ */
public function getOneCharset()
{
- if (!function_exists('iconv') && !function_exists('mb_convert_encoding')) {
- $this->markTestSkipped('Mbstring or iconv is required for this test.');
- }
-
return array(
array('é', 'utf8', true),
array("\xE9", 'CP1252', true),
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php
index 5829336033..db4076cb70 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php
@@ -94,10 +94,6 @@ class StaticMethodLoaderTest extends \PHPUnit_Framework_TestCase
// strict standards error
error_reporting(0);
- if (0 !== error_reporting()) {
- $this->markTestSkipped('Could not disable error reporting');
- }
-
$metadata = new ClassMetadata(__NAMESPACE__.'\AbstractStaticMethodLoader');
$loader = new StaticMethodLoader('loadMetadata');
diff --git a/src/Symfony/Component/Validator/composer.json b/src/Symfony/Component/Validator/composer.json
index 88c7639f5a..5a4ddb89ef 100644
--- a/src/Symfony/Component/Validator/composer.json
+++ b/src/Symfony/Component/Validator/composer.json
@@ -20,7 +20,6 @@
"symfony/translation": "~2.8|~3.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"symfony/http-foundation": "~2.8|~3.0",
"symfony/intl": "~2.8|~3.0",
"symfony/yaml": "~2.8|~3.0",
diff --git a/src/Symfony/Component/Validator/phpunit.xml.dist b/src/Symfony/Component/Validator/phpunit.xml.dist
index 1bf4391c3c..57b15e0165 100644
--- a/src/Symfony/Component/Validator/phpunit.xml.dist
+++ b/src/Symfony/Component/Validator/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php
index 3f4f94fc3d..faa6534117 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php
@@ -19,12 +19,11 @@ use Symfony\Component\VarDumper\Cloner\Stub;
*/
class PdoCasterTest extends \PHPUnit_Framework_TestCase
{
+ /**
+ * @requires extension pdo_sqlite
+ */
public function testCastPdo()
{
- if (!extension_loaded('pdo_sqlite')) {
- $this->markTestSkipped('pdo_sqlite extension is required');
- }
-
$pdo = new \PDO('sqlite::memory:');
$pdo->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array($pdo)));
diff --git a/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php b/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
index c6071ae6d6..4522aa4aaa 100644
--- a/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
@@ -108,12 +108,11 @@ EOTXT
);
}
+ /**
+ * @requires extension xml
+ */
public function testXmlResource()
{
- if (!extension_loaded('xml')) {
- $this->markTestSkipped('xml extension is required');
- }
-
$var = xml_parser_create();
$this->assertDumpMatchesFormat(
@@ -310,13 +309,10 @@ EOTXT
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
+ * @requires PHP 5.6
*/
public function testSpecialVars56()
{
- if (PHP_VERSION_ID < 50600) {
- $this->markTestSkipped('PHP 5.6 is required');
- }
-
$var = $this->getSpecialVars();
$this->assertDumpEquals(
diff --git a/src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php b/src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
index e731b3fe93..4e70101ae2 100644
--- a/src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
@@ -113,11 +113,11 @@ EOTXT
);
}
+ /**
+ * @requires extension mbstring
+ */
public function testCharset()
{
- if (!extension_loaded('mbstring')) {
- $this->markTestSkipped('This test requires mbstring.');
- }
$var = mb_convert_encoding('Словарь', 'CP1251', 'UTF-8');
$dumper = new HtmlDumper('php://output', 'CP1251');
diff --git a/src/Symfony/Component/VarDumper/composer.json b/src/Symfony/Component/VarDumper/composer.json
index 32d078ce28..43fd4267c7 100644
--- a/src/Symfony/Component/VarDumper/composer.json
+++ b/src/Symfony/Component/VarDumper/composer.json
@@ -19,7 +19,6 @@
"php": ">=5.5.9"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0",
"twig/twig": "~1.20|~2.0"
},
"suggest": {
diff --git a/src/Symfony/Component/VarDumper/phpunit.xml.dist b/src/Symfony/Component/VarDumper/phpunit.xml.dist
index 05128b9fa1..30b4a0a8f9 100644
--- a/src/Symfony/Component/VarDumper/phpunit.xml.dist
+++ b/src/Symfony/Component/VarDumper/phpunit.xml.dist
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php
index 6e3877bff0..a5b53bd965 100644
--- a/src/Symfony/Component/Yaml/Inline.php
+++ b/src/Symfony/Component/Yaml/Inline.php
@@ -224,8 +224,8 @@ class Inline
$i += strlen($output);
// remove comments
- if (false !== $strpos = strpos($output, ' #')) {
- $output = rtrim(substr($output, 0, $strpos));
+ if (preg_match('/[ \t]+#/', $output, $match, PREG_OFFSET_CAPTURE)) {
+ $output = substr($output, 0, $match[0][1]);
}
} elseif (preg_match('/^(.+?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) {
$output = $match[1];
diff --git a/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml b/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml
index 6a7ffeca46..b72a9b6996 100644
--- a/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml
+++ b/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml
@@ -7,8 +7,11 @@ yaml: |
ex2: "foo # bar" # comment
ex3: 'foo # bar' # comment
ex4: foo # comment
+ ex5: foo # comment with tab before
+ ex6: foo#foo # comment here
+ ex7: foo # ignore me # and me
php: |
- array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo')
+ array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo', 'ex5' => 'foo', 'ex6' => 'foo#foo', 'ex7' => 'foo')
---
test: Comments in the middle
brief: >
diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php
index 791585ff90..0ccc6ee979 100644
--- a/src/Symfony/Component/Yaml/Tests/ParserTest.php
+++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php
@@ -446,14 +446,11 @@ EOF;
$this->parser->parse('foo: !!php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";}', true, false);
}
+ /**
+ * @requires extension iconv
+ */
public function testNonUtf8Exception()
{
- if (!function_exists('iconv')) {
- $this->markTestSkipped('Exceptions for non-utf8 charsets require the iconv() function.');
-
- return;
- }
-
$yamls = array(
iconv('UTF-8', 'ISO-8859-1', "foo: 'äöüß'"),
iconv('UTF-8', 'ISO-8859-15', "euro: '€'"),
diff --git a/src/Symfony/Component/Yaml/composer.json b/src/Symfony/Component/Yaml/composer.json
index bd9e0bca89..d650e635d6 100644
--- a/src/Symfony/Component/Yaml/composer.json
+++ b/src/Symfony/Component/Yaml/composer.json
@@ -18,9 +18,6 @@
"require": {
"php": ">=5.5.9"
},
- "require-dev": {
- "symfony/phpunit-bridge": "~2.8|~3.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\Yaml\\": "" }
},
diff --git a/src/Symfony/Component/Yaml/phpunit.xml.dist b/src/Symfony/Component/Yaml/phpunit.xml.dist
index 418b2c6c9a..010f356b32 100644
--- a/src/Symfony/Component/Yaml/phpunit.xml.dist
+++ b/src/Symfony/Component/Yaml/phpunit.xml.dist
@@ -25,4 +25,8 @@
+
+
+
+