Example #1
0
 public function setUp()
 {
     parent::setUp();
     $config = DI::getDefault()->get('config');
     require_once $config->application->moduleDir . '/Test/forms/Fake.php';
     $this->prepareFakeObject();
 }
Example #2
0
 public function setUp()
 {
     parent::setUp();
     $this->config = $this->createExportConfig();
     $this->adapter = new Csv();
     $this->adapter->setConfig($this->config);
 }
Example #3
0
 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);
 }
Example #4
0
 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);
     }
 }
Example #5
0
 public function tearDown()
 {
     parent::setUp();
     foreach (Parental::find() as $p) {
         $p->delete();
     }
     foreach (Child::find() as $c) {
         $c->delete();
     }
 }
Example #6
0
 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));
     }
 }
Example #7
0
 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;
 }
Example #8
0
 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');
 }