File tree Expand file tree Collapse file tree
Tests/Integration/Controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66use Doctrine \ORM \EntityManagerInterface ;
77use PhpList \PhpList4 \Core \Bootstrap ;
8+ use PhpList \PhpList4 \Core \Environment ;
89use PHPUnit \DbUnit \Database \Connection ;
910use PHPUnit \DbUnit \DataSet \CsvDataSet ;
1011use PHPUnit \DbUnit \TestCaseTrait ;
@@ -49,8 +50,7 @@ abstract class AbstractControllerTest extends WebTestCase
4950 protected function setUp ()
5051 {
5152 $ this ->initializeDatabaseTester ();
52- $ this ->bootstrap = Bootstrap::getInstance ()->setApplicationContext (Bootstrap::APPLICATION_CONTEXT_TESTING )
53- ->configure ();
53+ $ this ->bootstrap = Bootstrap::getInstance ()->setEnvironment (Environment::TESTING )->configure ();
5454 $ this ->entityManager = $ this ->bootstrap ->getEntityManager ();
5555 self ::assertTrue ($ this ->entityManager ->isOpen ());
5656 }
Original file line number Diff line number Diff line change 55
66use Doctrine \Common \Persistence \ObjectRepository ;
77use PhpList \PhpList4 \Core \Bootstrap ;
8+ use PhpList \PhpList4 \Core \Environment ;
89use PhpList \PhpList4 \Domain \Model \Identity \AdministratorToken ;
910use PhpList \PhpList4 \Domain \Repository \Identity \AdministratorTokenRepository ;
1011use Symfony \Bundle \FrameworkBundle \Client ;
@@ -36,9 +37,9 @@ protected function setUp()
3637 {
3738 parent ::setUp ();
3839
39- Bootstrap::getInstance ()->setApplicationContext (Bootstrap:: APPLICATION_CONTEXT_TESTING )->configure ();
40+ $ this -> bootstrap = Bootstrap::getInstance ()->setEnvironment (Environment:: TESTING )->configure ();
4041
41- $ this ->client = self ::createClient (['environment ' => Bootstrap:: APPLICATION_CONTEXT_TESTING ]);
42+ $ this ->client = self ::createClient (['environment ' => Environment:: TESTING ]);
4243
4344 $ this ->administratorTokenRepository = $ this ->entityManager ->getRepository (AdministratorToken::class);
4445 }
You can’t perform that action at this time.
0 commit comments