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 11
11
- 7.1
12
12
13
13
env :
14
+ global :
15
+ - TEST_COMMAND="composer test"
14
16
matrix :
15
17
- SYMFONY_VERSION=3.3.*
16
18
@@ -21,17 +23,19 @@ matrix:
21
23
env : SYMFONY_VERSION=4.0.*
22
24
include :
23
25
- 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"
25
29
- php : 7.1
26
30
env : SYMFONY_VERSION=4.0.*
27
31
28
32
before_script :
29
33
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
30
34
# 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
32
36
33
37
script :
34
- - phpunit
38
+ - $TEST_COMMAND
35
39
36
40
after_success :
37
41
- 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
264
264
265
265
Setup the test suite using [Composer](http://getcomposer.org/) :
266
266
267
+
267
268
` ` ` bash
268
- composer install --dev --prefer-source
269
+ composer update
270
+ composer test
269
271
` ` `
270
272
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
273
274
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.
275
277
276
278
` ` ` 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
278
283
` ` `
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()
44
44
* We check for DoctrineTestCase because it is in the same package as OrmTestCase and we want to be able to
45
45
* fake OrmTestCase
46
46
*/
47
- static ::markTestSkipped ('Doctrine\Tests\OrmTestCase was not found. ' );
47
+ static ::fail ('Doctrine\Tests\OrmTestCase was not found. ' );
48
48
}
49
49
parent ::setUpBeforeClass ();
50
50
}
Original file line number Diff line number Diff line change 18
18
"symfony/console" : " ^3.3 || ^4.0"
19
19
},
20
20
"require-dev" : {
21
- "phpunit/phpunit" : " ^5.7 " ,
21
+ "phpunit/phpunit" : " ^6.2 " ,
22
22
"symfony/yaml" : " ^3.3 || ^4.0" ,
23
23
"geoip/geoip" : " ~1.17" ,
24
24
"doctrine/cache" : " ~1.3" ,
25
25
"doctrine/orm" : " ~2.3" ,
26
26
"php-http/message" : " ^1.5" ,
27
27
"php-http/curl-client" : " ^1.7" ,
28
28
"nyholm/psr7" : " ^0.2.2" ,
29
- "nyholm/symfony-bundle-test" : " ^1.1 " ,
29
+ "nyholm/symfony-bundle-test" : " ^1.2 " ,
30
30
"geocoder-php/google-maps-provider" : " ^4.0" ,
31
31
"geocoder-php/cache-provider" : " ^4.0" ,
32
32
"geocoder-php/arcgis-online-provider" : " ^4.0" ,
58
58
}
59
59
},
60
60
"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"
63
63
},
64
64
"minimum-stability" : " dev" ,
65
65
"prefer-stable" : true ,
Original file line number Diff line number Diff line change 12
12
bootstrap =" Tests/bootstrap.php"
13
13
>
14
14
<testsuites >
15
- <testsuite name =" Geocoder for the Symfony Framework " >
15
+ <testsuite name =" main " >
16
16
<directory >./Tests</directory >
17
+ <exclude >./Tests/Doctrine</exclude >
18
+ </testsuite >
19
+ <testsuite name =" doctrine" >
20
+ <directory >./Tests/Doctrine</directory >
17
21
</testsuite >
18
22
</testsuites >
19
23
27
31
</exclude >
28
32
</whitelist >
29
33
</filter >
30
- </phpunit >
34
+ </phpunit >
You can’t perform that action at this time.
0 commit comments