From 5d167b87146e8ef2b6df66b55baec6b723231038 Mon Sep 17 00:00:00 2001 From: Jan Tvrdik Date: Tue, 25 Sep 2018 21:05:51 +0200 Subject: [PATCH] tests: run all integration tests also with --prefer-lowest --- composer.bridgeless.json | 2 +- composer.json | 2 +- .../symfony-bundle/SymfonyBundleTest.phpt | 2 ++ tests/matrix/dbal/doctrine-2.0.sh | 2 +- ...{nette-2.0.sh => nette-2.0-php-5.4-to-7.1.sh} | 2 +- tests/matrix/dbal/nette-2.0-php-7.2.sh | 6 ++++++ tests/matrix/nette-di/nette-2.3-php-5.4.sh | 5 +++-- .../matrix/nette-di/nette-2.3-php-5.5-to-7.1.sh | 5 +++-- .../matrix/nette-di/nette-2.4-php-5.6-to-7.0.sh | 5 +++-- .../matrix/nette-di/nette-2.4-php-7.1-to-7.2.sh | 5 +++-- .../matrix/nette-di/nette-3.0-php-7.1-to-7.2.sh | 3 ++- tests/matrix/symfony-bundle/symfony-3.0.sh | 16 +++++++++------- tests/matrix/symfony-bundle/symfony-4.0.sh | 6 ++++-- tests/run-integration.sh | 15 +++++++++++++-- 14 files changed, 52 insertions(+), 24 deletions(-) rename tests/matrix/dbal/{nette-2.0.sh => nette-2.0-php-5.4-to-7.1.sh} (87%) create mode 100644 tests/matrix/dbal/nette-2.0-php-7.2.sh diff --git a/composer.bridgeless.json b/composer.bridgeless.json index 383a422..74aa559 100644 --- a/composer.bridgeless.json +++ b/composer.bridgeless.json @@ -1,6 +1,6 @@ { "require-dev": { - "nette/tester": "~1.4", + "nette/tester": "~1.7", "mockery/mockery": "~0.9" }, "autoload": { diff --git a/composer.json b/composer.json index 2fb680f..e667fff 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "doctrine/cache": "~1.5", "nette/database": "~2.2", "nette/di": "~2.3.12 | ~2.4", - "nette/tester": "~1.4", + "nette/tester": "~1.7", "nette/utils": "~2.3", "nextras/dbal": "~1.0 | ~2.0", "mockery/mockery": "~0.9", diff --git a/tests/cases/integration/symfony-bundle/SymfonyBundleTest.phpt b/tests/cases/integration/symfony-bundle/SymfonyBundleTest.phpt index 71bf832..8781cf7 100644 --- a/tests/cases/integration/symfony-bundle/SymfonyBundleTest.phpt +++ b/tests/cases/integration/symfony-bundle/SymfonyBundleTest.phpt @@ -28,6 +28,8 @@ class SymfonyBundleTest extends TestCase { parent::setUp(); + Environment::lock(__CLASS__, __DIR__ . '/../../../temp'); + $options = Environment::loadData(); $driversConfig = parse_ini_file(__DIR__ . '/../../../drivers.ini', TRUE); $dbalOptions = $driversConfig[$options['driver']]; diff --git a/tests/matrix/dbal/doctrine-2.0.sh b/tests/matrix/dbal/doctrine-2.0.sh index b359d2d..8e6223e 100644 --- a/tests/matrix/dbal/doctrine-2.0.sh +++ b/tests/matrix/dbal/doctrine-2.0.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash PHP_VERSION_MIN="50400" PHP_VERSION_MAX="70299" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" DBAL="doctrine" diff --git a/tests/matrix/dbal/nette-2.0.sh b/tests/matrix/dbal/nette-2.0-php-5.4-to-7.1.sh similarity index 87% rename from tests/matrix/dbal/nette-2.0.sh rename to tests/matrix/dbal/nette-2.0-php-5.4-to-7.1.sh index 4737035..e27c390 100644 --- a/tests/matrix/dbal/nette-2.0.sh +++ b/tests/matrix/dbal/nette-2.0-php-5.4-to-7.1.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash PHP_VERSION_MIN="50400" -PHP_VERSION_MAX="70299" +PHP_VERSION_MAX="70199" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/database:~2.2" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/caching:~2.2" DBAL="nette" diff --git a/tests/matrix/dbal/nette-2.0-php-7.2.sh b/tests/matrix/dbal/nette-2.0-php-7.2.sh new file mode 100644 index 0000000..2936ec2 --- /dev/null +++ b/tests/matrix/dbal/nette-2.0-php-7.2.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +PHP_VERSION_MIN="70200" +PHP_VERSION_MAX="70299" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/database:~2.4" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/caching:~2.4" +DBAL="nette" diff --git a/tests/matrix/nette-di/nette-2.3-php-5.4.sh b/tests/matrix/nette-di/nette-2.3-php-5.4.sh index 95c5a26..2a9bc26 100644 --- a/tests/matrix/nette-di/nette-2.3-php-5.4.sh +++ b/tests/matrix/nette-di/nette-2.3-php-5.4.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash PHP_VERSION_MIN="50400" PHP_VERSION_MAX="50499" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.3.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.3.12" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~2.3.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~3.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~1.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~2.0" diff --git a/tests/matrix/nette-di/nette-2.3-php-5.5-to-7.1.sh b/tests/matrix/nette-di/nette-2.3-php-5.5-to-7.1.sh index 39512fe..0a6ed75 100644 --- a/tests/matrix/nette-di/nette-2.3-php-5.5-to-7.1.sh +++ b/tests/matrix/nette-di/nette-2.3-php-5.5-to-7.1.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash PHP_VERSION_MIN="50500" PHP_VERSION_MAX="70199" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.3.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.3.12" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~2.3.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~3.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.0" diff --git a/tests/matrix/nette-di/nette-2.4-php-5.6-to-7.0.sh b/tests/matrix/nette-di/nette-2.4-php-5.6-to-7.0.sh index 757efb5..4cf2d65 100644 --- a/tests/matrix/nette-di/nette-2.4-php-5.6-to-7.0.sh +++ b/tests/matrix/nette-di/nette-2.4-php-5.6-to-7.0.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash PHP_VERSION_MIN="50600" PHP_VERSION_MAX="70099" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.4.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.4.1" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~2.4.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~3.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.0" diff --git a/tests/matrix/nette-di/nette-2.4-php-7.1-to-7.2.sh b/tests/matrix/nette-di/nette-2.4-php-7.1-to-7.2.sh index ca4b62f..8417e4d 100644 --- a/tests/matrix/nette-di/nette-2.4-php-7.1-to-7.2.sh +++ b/tests/matrix/nette-di/nette-2.4-php-7.1-to-7.2.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash PHP_VERSION_MIN="70100" PHP_VERSION_MAX="70299" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.4.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.4.1" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~2.4.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~4.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~3.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~4.0" diff --git a/tests/matrix/nette-di/nette-3.0-php-7.1-to-7.2.sh b/tests/matrix/nette-di/nette-3.0-php-7.1-to-7.2.sh index aca3e03..b576c8c 100644 --- a/tests/matrix/nette-di/nette-3.0-php-7.1-to-7.2.sh +++ b/tests/matrix/nette-di/nette-3.0-php-7.1-to-7.2.sh @@ -4,6 +4,7 @@ PHP_VERSION_MAX="70299" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~3.0.0@alpha" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~3.0.0@alpha" COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~4.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~3.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~4.0" diff --git a/tests/matrix/symfony-bundle/symfony-3.0.sh b/tests/matrix/symfony-bundle/symfony-3.0.sh index fd1af17..f48e131 100644 --- a/tests/matrix/symfony-bundle/symfony-3.0.sh +++ b/tests/matrix/symfony-bundle/symfony-3.0.sh @@ -1,12 +1,14 @@ #!/usr/bin/env bash PHP_VERSION_MIN="50500" PHP_VERSION_MAX="70299" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/doctrine-bundle" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.3" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.3" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.3" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.3" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.3" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.3" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.3" DBAL='doctrine' diff --git a/tests/matrix/symfony-bundle/symfony-4.0.sh b/tests/matrix/symfony-bundle/symfony-4.0.sh index d883557..af7caa5 100644 --- a/tests/matrix/symfony-bundle/symfony-4.0.sh +++ b/tests/matrix/symfony-bundle/symfony-4.0.sh @@ -1,12 +1,14 @@ #!/usr/bin/env bash PHP_VERSION_MIN="70100" PHP_VERSION_MAX="70299" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0" -COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.5" COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/doctrine-bundle" COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~4.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~4.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~4.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~4.0" +COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~4.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~4.0" COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~4.0" DBAL='doctrine' diff --git a/tests/run-integration.sh b/tests/run-integration.sh index 5a7e5a2..5fb5476 100755 --- a/tests/run-integration.sh +++ b/tests/run-integration.sh @@ -34,7 +34,16 @@ run() fi create_dbals_ini "$DBAL" - composer_prepare_dependencies "$COMPOSER_REQUIRE" + + composer_prepare_dependencies "$COMPOSER_REQUIRE" "" + tester_run_integration_group "$INTEGRATION_GROUP" + + echo + echo + echo "# $FILENAME with --prefer-lowest" + echo + + composer_prepare_dependencies "$COMPOSER_REQUIRE" "--prefer-lowest" tester_run_integration_group "$INTEGRATION_GROUP" } @@ -60,6 +69,7 @@ create_dbals_ini() composer_prepare_dependencies() { COMPOSER_REQUIRE="$1" + COMPOSER_PREFER_LOWEST="$2" cp "$PROJECT_DIR/composer.bridgeless.json" "$PROJECT_DIR/composer.json" @@ -75,7 +85,8 @@ composer_prepare_dependencies() composer update \ --no-interaction \ --no-progress \ - --quiet + --quiet \ + $COMPOSER_PREFER_LOWEST }