Commit 08526cf
committed
minor #11899 [Testing] Fix wrong include in custom bootstrap for tests (gregurco)
This PR was merged into the 4.3 branch.
Discussion
----------
[Testing] Fix wrong include in custom bootstrap for tests
Hello.
There is a wrong include in custom `tests/bootstrap.php` for tests. Till 4.3 it was ok, but from 4.3 following the article you will receive next error:
```
LogicException: You must set the KERNEL_CLASS environment variable to the fully-qualified class name of your Kernel in phpunit.xml / phpunit.xml.dist or override the App\Tests\Foo\BarTest::createKernel() or App\Tests\Foo\BaTest::getKernelClass() method.
```
The problem exists, because the sequence of bootstrap is changes:
`phpunit.dist.xml -> config/bootstrap.php -> vendor/autoload.php`
and normally if something is injected in phpunit config, it should respect the sequence:
`phpunit.dist.xml -> tests/bootstrap.php (CUSTOM) -> config/bootstrap.php -> vendor/autoload.php`
Actual state in documentation (wrong one)
`phpunit.dist.xml -> tests/bootstrap.php -> vendor/autoload.php`
Red to recipe: https://github.com/symfony/recipes/blob/master/phpunit/phpunit/4.7/phpunit.xml.dist#L8
Thanks, Vlad.
Commits
-------
f34bd0b Fix wrong include in custom bootstrap for tests1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments