From a848d69dbc9f449d0685693c6ae939e86c896f6a Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 24 Dec 2014 10:20:55 +0100 Subject: [PATCH 1/3] [travis] remove sh wrapper --- .travis.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index d10abab198..0a1f81496a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,19 +26,20 @@ env: before_install: - travis_retry sudo apt-get install parallel - composer self-update - - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; fi;' - - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;' - - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;' - - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then pecl install -f memcached-2.1.0; fi;' - - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;' + - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; fi; + - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; fi; + - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi; + - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi; + - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then pecl install -f memcached-2.1.0; fi; + - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi; - sudo locale-gen fr_FR.UTF-8 && sudo update-locale -# - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "5.3.3" ]; then phpunit --self-update; fi;' +# - if [ "$TRAVIS_PHP_VERSION" != "5.3.3" ]; then phpunit --self-update; fi; install: - - sh -c 'if [ "$components" = "no" ]; then sh -c "COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install"; fi;' + - if [ "$components" = "no" ]; then COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install; fi; script: - - sh -c 'if [ "$components" = "no" ]; then sh -c "ls -d src/Symfony/*/* | parallel --gnu --keep-order '\''echo \"Running {} tests\"; phpunit --exclude-group tty,benchmark,intl-data {};'\''"; fi;' - - sh -c 'if [ "$components" = "no" ]; then sh -c "echo "\""Running tests requiring tty"\""; phpunit --group tty"; fi;' - - sh -c 'if [ "$components" = "high" ]; then sh -c "find src/Symfony -mindepth 3 -type f -name '\''phpunit.xml.dist'\'' | sed '\''s#\(.*\)/.*#\1#'\'' | parallel --gnu --keep-order '\''echo \"Running {} tests\"; cd {}; COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install; phpunit --exclude-group tty,benchmark,intl-data;'\''"; fi;' - - sh -c 'if [ "$components" = "low" ]; then sh -c "find src/Symfony -mindepth 3 -type f -name '\''phpunit.xml.dist'\'' | sed '\''s#\(.*\)/.*#\1#'\'' | parallel --gnu --keep-order '\''echo \"Running {} tests\"; cd {}; COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data;'\''"; fi;' + - if [ "$components" = "no" ]; then ls -d src/Symfony/*/* | parallel --gnu --keep-order 'echo "Running {} tests"; phpunit --exclude-group tty,benchmark,intl-data {};'; fi; + - if [ "$components" = "no" ]; then echo "Running tests requiring tty"; phpunit --group tty; fi; + - if [ "$components" = "high" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order 'echo "Running {} tests"; cd {}; COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install; phpunit --exclude-group tty,benchmark,intl-data;'; fi; + - if [ "$components" = "low" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order 'echo "Running {} tests"; cd {}; COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data;'; fi; From e714f8583e96292db32f9cbcf1e03a3647db2e7c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 24 Dec 2014 10:23:01 +0100 Subject: [PATCH 2/3] [Console] Move QuestionHelperTest to tty group --- src/Symfony/Bridge/Propel1/Tests/Fixtures/Column.php | 7 +------ .../Component/Console/Tests/Helper/QuestionHelperTest.php | 6 +++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bridge/Propel1/Tests/Fixtures/Column.php b/src/Symfony/Bridge/Propel1/Tests/Fixtures/Column.php index 399a8531a8..4e46f272e1 100644 --- a/src/Symfony/Bridge/Propel1/Tests/Fixtures/Column.php +++ b/src/Symfony/Bridge/Propel1/Tests/Fixtures/Column.php @@ -14,7 +14,7 @@ namespace Symfony\Bridge\Propel1\Tests\Fixtures; class Column extends \ColumnMap { private $name; - private $type; + protected $type; public function __construct($name, $type) { @@ -23,11 +23,6 @@ class Column extends \ColumnMap $this->phpName = ucfirst($name); } - public function getType() - { - return $this->type; - } - public function isText() { if (!$this->type) { diff --git a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php index bba25375dc..ac360241ad 100644 --- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -19,6 +19,9 @@ use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; use Symfony\Component\Console\Question\Question; +/** + * @group tty + */ class QuestionHelperTest extends \PHPUnit_Framework_TestCase { public function testAskChoice() @@ -125,9 +128,6 @@ class QuestionHelperTest extends \PHPUnit_Framework_TestCase $this->assertEquals('FooBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); } - /** - * @group tty - */ public function testAskHiddenResponse() { if (defined('PHP_WINDOWS_VERSION_BUILD')) { From 333fb6f3dfeb0d73721602103179992962d152ad Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 24 Dec 2014 11:36:03 +0100 Subject: [PATCH 3/3] [VarDumper] fix tests under 5.3 --- src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php index 5125e17d9d..eaed9dbb16 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php @@ -36,7 +36,7 @@ class PdoCasterTest extends \PHPUnit_Framework_TestCase $this->assertSame('BOTH', $attr['DEFAULT_FETCH_MODE']->class); $xCast = array( - "\0~\0inTransaction" => false, + "\0~\0inTransaction" => $pdo->inTransaction(), "\0~\0attributes" => array( 'CASE' => $attr['CASE'], 'ERRMODE' => $attr['ERRMODE'],