public function setUp() { parent::setUp(); $config = DI::getDefault()->get('config'); require_once $config->application->moduleDir . '/Test/forms/Fake.php'; $this->prepareFakeObject(); }
public function setUp() { parent::setUp(); $this->config = $this->createExportConfig(); $this->adapter = new Csv(); $this->adapter->setConfig($this->config); }
public function setUp() { parent::setUp(); $this->setUpDI(); $this->config = $this->createExportConfig(); $this->adapter = new Pdf(); $this->adapter->setConfig($this->config); $this->getDI()->get('exporter')->setConfig($this->config); }
public function setUp() { parent::setUp(); $this->setUpDI(); $this->exporter = $this->getDI()->get('exporter'); foreach (['.csv', '.pdf', '.xls', '.xml'] as $ext) { $filePath = $this->getTestFilePath($ext); file_exists($filePath) && unlink($filePath); } }
public function tearDown() { parent::setUp(); foreach (Parental::find() as $p) { $p->delete(); } foreach (Child::find() as $c) { $c->delete(); } }
public function setUp() { parent::setUp(); $this->tmpFilePath = $this->getTmpFilePath(); if (file_exists($this->tmpFilePath)) { unlink($this->tmpFilePath); } if (file_exists(dirname($this->tmpFilePath))) { rmdir(dirname($this->tmpFilePath)); } }
public function setUp() { parent::setUp(); $di = DI::getDefault(); $di->set('view', function () use($di) { $view = new View($di->get('config')->application->view->toArray()); $path = $di->get('config')->application->moduleDir . '/Test/views'; if (file_exists($path)) { $view->setViewsDir($path); } return $view; }); $modules = (new ModuleLoader($di))->dump($di->get('config')->application->moduleDir, $di->get('config')->application->configDir); $app = new Application(); $app->registerModules($modules); $this->di = $di; }
public function setUp() { parent::setUp(); $this->dao = new Manager(); $this->dao->setDI($this->di); }
public function setUp() { parent::setUp(); $this->adapter = $this->getMockForAbstractClass('\\Vegas\\Exporter\\Adapter\\AdapterAbstract'); }