on our previous app, using laravel 5.3, setting processisolation
false sped our tests without causing errors:
phpunit.xml: <phpunit backupglobals="false" ... processisolation="false" stoponfailure="false">
on our current project, in laravel 5.4, setting processisolation
false causes of our functional tests fail (though indeed faster) (some removed brevity):
5) tests\feature\callstoactionapicontrollertest::testusers symfony\component\httpkernel\exception\notfoundhttpexception: /johnny/vendor/laravel/framework/src/illuminate/routing/routecollection.php:161 /johnny/vendor/laravel/framework/src/illuminate/routing/router.php:533 /johnny/vendor/laravel/framework/src/illuminate/routing/router.php:512 /johnny/vendor/laravel/framework/src/illuminate/routing/router.php:498 /johnny/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php:174 /johnny/vendor/laravel/framework/src/illuminate/routing/pipeline.php:30 /johnny/vendor/barryvdh/laravel-cors/src/handlecors.php:34 /johnny/vendor/laravel/framework/src/illuminate/pipeline/pipeline.php:148 ... /johnny/vendor/laravel/framework/src/illuminate/pipeline/pipeline.php:102 /johnny/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php:149 /johnny/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php:116 /johnny/vendor/laravel/framework/src/illuminate/foundation/testing/concerns/makeshttprequests.php:234 /johnny/vendor/laravel/framework/src/illuminate/foundation/testing/concerns/makeshttprequests.php:206 /johnny/tests/functional/callstoaction/callstoactionapicontrollertest.php:142 ... 7) tests\feature\emailendpointcontrollertest::testcaptureeventswithblankrequest expected status code 200 received 404. failed asserting false true. /johnny/vendor/laravel/framework/src/illuminate/foundation/testing/testresponse.php:55 /johnny/tests/functional/email/emailactionapicontrollertest.php:88 8) tests\feature\emailendpointcontrollertest::testunsubscribe expected status code 200 received 404. failed asserting false true. /johnny/vendor/laravel/framework/src/illuminate/foundation/testing/testresponse.php:55 /johnny/tests/functional/email/emailactionapicontrollertest.php:96 9) tests\feature\emailendpointcontrollertest::testunsubscribewithalreadyunsubscribedemail expected status code 200 received 404. failed asserting false true. /johnny/vendor/laravel/framework/src/illuminate/foundation/testing/testresponse.php:55 /johnny/tests/functional/email/emailactionapicontrollertest.php:108 errors! tests: 72, assertions: 79, errors: 21, failures: 9. script ./vendor/bin/phpunit handling test event returned error code 2
they 404 errors, or notfoundhttpexception errors.
our working earlier project laravel 5.3 , phpunit 5.5; our current broken project laravel 5.4 , phpunit 5.7. noticed 1 change between 2 laravels application url in app.php
changed from
'url' => 'http://localhost'
to
'url' => env('app_url', 'http://localhost'),
but changing didn't anything. please -- our tests take 10 minutes instead of 10 seconds.
Comments
Post a Comment