File tree Expand file tree Collapse file tree 5 files changed +32
-15
lines changed Expand file tree Collapse file tree 5 files changed +32
-15
lines changed Original file line number Diff line number Diff line change 1111 - 7.1
1212
1313env :
14+ global :
15+ - TEST_COMMAND="composer test"
1416 matrix :
1517 - SYMFONY_VERSION=3.3.*
1618
@@ -21,17 +23,19 @@ matrix:
2123 env : SYMFONY_VERSION=4.0.*
2224 include :
2325 - php : 7.0
24- env : COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_VERSION=3.3.* TEST_COMMAND="phpunit --coverage-text --coverage-clover=build/coverage.xml" COVERAGE=true
26+ env : TEST_COMMAND="composer test-ci" COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_VERSION=3.3.* COVERAGE=true
27+ - php : 7.0
28+ env : TEST_COMMAND="phpunit" COMPOSER_FLAGS="--prefer-source" SYMFONY_VERSION="3.3.* phpunit/phpunit:^5.7"
2529 - php : 7.1
2630 env : SYMFONY_VERSION=4.0.*
2731
2832before_script :
2933 - composer require symfony/symfony:${SYMFONY_VERSION} --no-update
3034 # This command must be run with `--prefer-source`, otherwise the `Doctrine\Tests\OrmTestCase` class won't be found.
31- - composer update --prefer-source
35+ - composer update $COMPOSER_FLAGS
3236
3337script :
34- - phpunit
38+ - $TEST_COMMAND
3539
3640after_success :
3741 - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
Original file line number Diff line number Diff line change @@ -264,15 +264,24 @@ Testing
264264
265265Setup the test suite using [Composer](http://getcomposer.org/) :
266266
267+
267268` ` ` bash
268- composer install --dev --prefer-source
269+ composer update
270+ composer test
269271` ` `
270272
271- **Important:** this command must be run with `--prefer-source`, otherwise the
272- ` Doctrine\T ests\O rmTestCase` class won't be found.
273+ # ## Doctrine test
273274
274- Run it using PHPUnit :
275+ There is also a test that tests the doctrine integration. It runs automatically on
276+ Traivs but if you want to run it locally you must do the following.
275277
276278` ` ` bash
277- composer test
279+ composer require phpunit/phpunit:^5.7 --no-update
280+ composer update --prefer-source
281+ wget https://phar.phpunit.de/phpunit-5.7.phar
282+ php phpunit-5.7.phar --testsuit doctrine
278283` ` `
284+
285+ **Important:** this command must be run with `--prefer-source`, otherwise the
286+ ` Doctrine\T ests\O rmTestCase` class won't be found.
287+
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public static function setUpBeforeClass()
4444 * We check for DoctrineTestCase because it is in the same package as OrmTestCase and we want to be able to
4545 * fake OrmTestCase
4646 */
47- static ::markTestSkipped ('Doctrine\Tests\OrmTestCase was not found. ' );
47+ static ::fail ('Doctrine\Tests\OrmTestCase was not found. ' );
4848 }
4949 parent ::setUpBeforeClass ();
5050 }
Original file line number Diff line number Diff line change 1818 "symfony/console" : " ^3.3 || ^4.0"
1919 },
2020 "require-dev" : {
21- "phpunit/phpunit" : " ^5.7 " ,
21+ "phpunit/phpunit" : " ^6.2 " ,
2222 "symfony/yaml" : " ^3.3 || ^4.0" ,
2323 "geoip/geoip" : " ~1.17" ,
2424 "doctrine/cache" : " ~1.3" ,
2525 "doctrine/orm" : " ~2.3" ,
2626 "php-http/message" : " ^1.5" ,
2727 "php-http/curl-client" : " ^1.7" ,
2828 "nyholm/psr7" : " ^0.2.2" ,
29- "nyholm/symfony-bundle-test" : " ^1.1 " ,
29+ "nyholm/symfony-bundle-test" : " ^1.2 " ,
3030 "geocoder-php/google-maps-provider" : " ^4.0" ,
3131 "geocoder-php/cache-provider" : " ^4.0" ,
3232 "geocoder-php/arcgis-online-provider" : " ^4.0" ,
5858 }
5959 },
6060 "scripts" : {
61- "test" : " vendor/bin/phpunit" ,
62- "test-ci" : " vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
61+ "test" : " vendor/bin/phpunit --testsuite main " ,
62+ "test-ci" : " vendor/bin/phpunit --testsuite main -- coverage-text --coverage-clover=build/coverage.xml"
6363 },
6464 "minimum-stability" : " dev" ,
6565 "prefer-stable" : true ,
Original file line number Diff line number Diff line change 1212 bootstrap =" Tests/bootstrap.php"
1313 >
1414 <testsuites >
15- <testsuite name =" Geocoder for the Symfony Framework " >
15+ <testsuite name =" main " >
1616 <directory >./Tests</directory >
17+ <exclude >./Tests/Doctrine</exclude >
18+ </testsuite >
19+ <testsuite name =" doctrine" >
20+ <directory >./Tests/Doctrine</directory >
1721 </testsuite >
1822 </testsuites >
1923
2731 </exclude >
2832 </whitelist >
2933 </filter >
30- </phpunit >
34+ </phpunit >
You can’t perform that action at this time.
0 commit comments