You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How could I execute one time unit test for different test classes (with their own test methods) without incur in the error for which i can't create more than one Yii Application?
The text was updated successfully, but these errors were encountered:
Proper answer: you do not create a Yii Application object in the unit tests, as they will become integrated tests in such a case (unless, of course, you are testing this specific object itself without its environment).
Answer to exactly your own problem: PHPUnit has a special feature of bootstrap file:
The above incantation will execute the ./tests/bootstrap.php before running all PHPUnit test classes from tests/units subdirectory. See in documentation, as usual: https://phpunit.de/manual/current/en/textui.html
How could I execute one time unit test for different test classes (with their own test methods) without incur in the error for which i can't create more than one Yii Application?
The text was updated successfully, but these errors were encountered: