public function getApp() { $app = parent::getApp(); $extension = new Extension($app); $app['extensions']->register($extension); return $app; }
protected function getApp() { $bolt = parent::getApp(); $bolt['extend.action.options']['basedir'] = $bolt['resources']->getPath('extensions'); $bolt['extend.action.options']['composerjson'] = $bolt['resources']->getPath('extensions') . '/composer.json'; return $bolt; }
protected function getApp($boot = true) { $bolt = parent::getApp(); $bolt['extend.action.options']->set('basedir', $bolt['resources']->getPath('extensions')); $bolt['extend.action.options']->set('composerjson', $bolt['resources']->getPath('extensions') . '/composer.json'); return $bolt; }
protected function tearDown() { parent::tearDown(); // Clear the queue of LowlevelExceptions or they get needlessly reported at the end of the test run. // @deprcated remove with new error handling. LowlevelException::$screen = null; }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $app = $this->getApp(); $adapter = new NullAdapter(TEST_ROOT); $fs = new Filesystem($adapter); $this->container = new UploadContainer($fs); }
protected function getCacheMock($type = 'good') { $good = ['successfiles' => 1, 'failedfiles' => 0]; $bad = ['successfiles' => 0, 'failedfiles' => 1, 'failed' => ['test.txt']]; $cache = parent::getCacheMock(); $cache->expects($this->once())->method('doFlush')->will($this->returnValue(${$type})); return $cache; }
protected function getApp($boot = true) { $this->php->expects($this->any())->method('is_dir')->will($this->returnValue(true)); $this->php->expects($this->any())->method('file_exists')->will($this->returnValue(true)); $this->php->expects($this->any())->method('is_writable')->will($this->returnValue(true)); $this->php->expects($this->any())->method('is_readable')->will($this->returnValue(true)); return parent::getApp(); }
protected function setUp() { parent::setUp(); $app = $this->getApp(); $filesystem = $app['filesystem']; if ($filesystem->has('config://config.yml')) { $filesystem->delete('config://config.yml'); } }
protected function getApp($boot = true) { if ($this->app) { return $this->app; } $app = parent::getApp($boot); $extension = new Extension($app); $app['extensions']->register($extension); return $this->app = $app; }
protected function getApp($boot = true) { if ($this->app) { return $this->app; } $app = parent::getApp($boot); $extension = new Extension($app); $app['extensions']->register($extension); unset($app['extensions.BoltForms']->config['contact']); $app['extensions.BoltForms']->config['testing_form'] = $this->formFieldBaseConfig(); return $this->app = $app; }
public function getApp($boot = true) { $app = parent::getApp($boot); $extension = new Extension($app); $boltforms = new BoltFormsExtension($app); $boltformsSp = new BoltFormsServiceProvider(); $boltformsSp->register($app); $config = $this->getMock('\\Bolt\\Config', array('getWhichEnd'), array($app)); $config->expects($this->any())->method('getWhichEnd')->will($this->returnValue('frontend')); $app['config'] = $config; $app['extensions']->register($boltforms); $app['extensions']->register($extension); $app->boot(); return $app; }
protected function tearDown() { parent::tearDown(); }
protected function tearDown() { parent::tearDown(); $this->resetDirs(); }
protected function tearDown() { parent::tearDown(); VarDumper::setHandler(null); }
protected function getCacheMock($path = null, $flushResult = true) { $cache = parent::getCacheMock($path); $cache->expects($this->once())->method('flushAll')->will($this->returnValue($flushResult)); return $cache; }
protected function tearDown() { parent::tearDown(); $this->app = null; }
protected function getApp($boot = true) { $bolt = parent::getApp($boot); return $this->authApp($bolt); }
public function getApp() { $app = parent::getApp(); $app['asset.file.hash'] = $app->protect(function ($fileName) { return md5($fileName); }); return $app; }