/** * Setup test case needed properties * * @access public */ public function setUp() { $this->serviceManager = \PhpunitBootstrap::getServiceManager(); if (empty($this->getApplicationConfig())) { $this->setApplicationConfig($this->serviceManager->get('ApplicationConfig')); } $this->application = $this->getApplication(); $this->fixtureLoader = $this->serviceManager->get("Utilities\\Service\\Fixture\\FixtureLoader"); $this->fixtureLoader->setDefaultFixtures(array("System\\Fixture\\Settings", "Users\\Fixture\\Acl", "Users\\Fixture\\Role")); // refresh DB structure if (self::$firstTestCaseFlag === true) { shell_exec("bin/doctrine orm:schema-tool:drop --force; " . "bin/doctrine orm:schema-tool:update --force;"); } else { $this->truncateDatabase(); } parent::setUp(); self::$firstTestCaseFlag = false; }