Author: Ross Riley (riley.ross@gmail.com)
Inheritance: extends PHPUnit_Framework_TestCase
 public function getApp()
 {
     $app = parent::getApp();
     $extension = new Extension($app);
     $app['extensions']->register($extension);
     return $app;
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $app = $this->getApp();
     $adapter = new NullAdapter(TEST_ROOT);
     $fs = new Filesystem($adapter);
     $this->container = new UploadContainer($fs);
 }
Ejemplo n.º 6
0
 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;
 }
Ejemplo n.º 7
0
 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();
 }
Ejemplo n.º 8
0
 protected function setUp()
 {
     parent::setUp();
     $app = $this->getApp();
     $filesystem = $app['filesystem'];
     if ($filesystem->has('config://config.yml')) {
         $filesystem->delete('config://config.yml');
     }
 }
Ejemplo n.º 9
0
 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;
 }
Ejemplo n.º 11
0
 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;
 }
Ejemplo n.º 12
0
 protected function tearDown()
 {
     parent::tearDown();
 }
Ejemplo n.º 13
0
 protected function tearDown()
 {
     parent::tearDown();
     $this->resetDirs();
 }
Ejemplo n.º 14
0
 protected function tearDown()
 {
     parent::tearDown();
     VarDumper::setHandler(null);
 }
Ejemplo n.º 15
0
 protected function getCacheMock($path = null, $flushResult = true)
 {
     $cache = parent::getCacheMock($path);
     $cache->expects($this->once())->method('flushAll')->will($this->returnValue($flushResult));
     return $cache;
 }
Ejemplo n.º 16
0
 protected function tearDown()
 {
     parent::tearDown();
     $this->app = null;
 }
 protected function getApp($boot = true)
 {
     $bolt = parent::getApp($boot);
     return $this->authApp($bolt);
 }
Ejemplo n.º 18
0
 public function getApp()
 {
     $app = parent::getApp();
     $app['asset.file.hash'] = $app->protect(function ($fileName) {
         return md5($fileName);
     });
     return $app;
 }