requiredFields = ['container']; } public function _initialize(): void { $this->app = AppFactory::createApp( [ Environment::BASE_DIR => Configuration::projectDir(), Environment::APP_ENV => ApplicationEnvironment::Testing->value, ] ); $container = $this->app->getContainer(); if (null === $container) { throw new RuntimeException('Container was not set on App.'); } $this->container = $container; $this->em = $this->container->get(ReloadableEntityManagerInterface::class); parent::_initialize(); } public function _before(TestInterface $test): void { $this->client = new Connector(); $this->client->setApp($this->app); parent::_before($test); } public function _after(TestInterface $test): void { $_GET = []; $_POST = []; $_COOKIE = []; parent::_after($test); } public function _getEntityManager(): EntityManagerInterface { return $this->em; } }