From 07aca6c4a3d364b71f966c11d099dc9256b5def7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 20 Jun 2017 18:09:55 +0200 Subject: [PATCH] fix gitlab-ci - remove php 5.6; - fix some namespace problem with PHPUnit in tests ; - add phpunit to vendors --- .gitlab-ci.yml | 15 +++++++-------- .../ConfigConsistencyCompilerPassTest.php | 2 +- Tests/Search/AbstractSearchTest.php | 2 +- Tests/Search/SearchProviderTest.php | 2 +- composer.json | 15 ++++++++++----- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 136a42db8..2b903aa03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,19 +16,18 @@ stages: - build-doc - deploy-doc - - -test:php-5.6: - stage: test - <<: *test_definition - image: chill/ci-image:php-5.6 - script: phpunit test:php-7: stage: test <<: *test_definition image: chill/ci-image:php-7 - script: phpunit + script: vendor/bin/phpunit + +test:php-7: + stage: test + <<: *test_definition + image: chill/ci-image:php-7.1 + script: vendor/bin/phpunit # deploy documentation api-doc-build: diff --git a/Tests/DependencyInjection/ConfigConsistencyCompilerPassTest.php b/Tests/DependencyInjection/ConfigConsistencyCompilerPassTest.php index 0528bef56..a86e282fe 100644 --- a/Tests/DependencyInjection/ConfigConsistencyCompilerPassTest.php +++ b/Tests/DependencyInjection/ConfigConsistencyCompilerPassTest.php @@ -28,7 +28,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilderInterface; * * @author Julien Fastré */ -class ConfigConsistencyCompilerPassTest extends \PHPUnit_Framework_TestCase +class ConfigConsistencyCompilerPassTest extends \PHPUnit\Framework\TestCase { /** diff --git a/Tests/Search/AbstractSearchTest.php b/Tests/Search/AbstractSearchTest.php index cce33dde5..c0f1827fb 100644 --- a/Tests/Search/AbstractSearchTest.php +++ b/Tests/Search/AbstractSearchTest.php @@ -25,7 +25,7 @@ namespace Chill\MainBundle\Tests\Search; * * @author Julien Fastré */ -class AbstractSearchTest extends \PHPUnit_Framework_TestCase +class AbstractSearchTest extends \PHPUnit\Framework\TestCase { /** * @var \Chill\MainBundle\Search\AbstractSearch diff --git a/Tests/Search/SearchProviderTest.php b/Tests/Search/SearchProviderTest.php index a5205215c..f991ae9db 100644 --- a/Tests/Search/SearchProviderTest.php +++ b/Tests/Search/SearchProviderTest.php @@ -23,7 +23,7 @@ use Chill\MainBundle\Search\SearchProvider; use Chill\MainBundle\Search\SearchInterface; -class SearchProviderTest extends \PHPUnit_Framework_TestCase +class SearchProviderTest extends \PHPUnit\Framework\TestCase { /** diff --git a/composer.json b/composer.json index 70b7c8a63..9586a0afa 100644 --- a/composer.json +++ b/composer.json @@ -36,23 +36,28 @@ "champs-libres/composer-bundle-migration": "~1.0", "doctrine/doctrine-migrations-bundle": "~1.1", "doctrine/migrations": "~1.0", - "phpoffice/phpspreadsheet": "dev-develop#9e835676a6a2df9f7e445a28d4d89f6bd296a7c5@dev" + "phpoffice/phpspreadsheet": "dev-develop#9e835676a6a2df9f7e445a28d4d89f6bd296a7c5@dev", + "sensio/distribution-bundle": "^5.0" }, "require-dev": { "symfony/dom-crawler": "2.5", "doctrine/doctrine-fixtures-bundle": "~2.2", "symfony/security": "~2.5", - "symfony/phpunit-bridge": "^2.7" + "symfony/phpunit-bridge": "^2.7", + "phpunit/phpunit": "~5.6" }, "scripts": { "post-install-cmd": [ - "ComposerBundleMigration\\Composer\\Migrations::synchronizeMigrations" + "ComposerBundleMigration\\Composer\\Migrations::synchronizeMigrations", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap" ], "post-update-cmd": [ - "ComposerBundleMigration\\Composer\\Migrations::synchronizeMigrations" + "ComposerBundleMigration\\Composer\\Migrations::synchronizeMigrations", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap" ] }, "extra": { - "app-migrations-dir": "Tests/Fixtures/App/DoctrineMigrations" + "app-migrations-dir": "Tests/Fixtures/App/DoctrineMigrations", + "symfony-app-dir": "Tests/Fixtures/App/" } }