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;
 }
示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#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);
 }
示例#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;
 }
示例#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();
 }
示例#8
0
 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;
 }
示例#12
0
 protected function tearDown()
 {
     parent::tearDown();
 }
示例#13
0
 protected function tearDown()
 {
     parent::tearDown();
     $this->resetDirs();
 }
示例#14
0
 protected function tearDown()
 {
     parent::tearDown();
     VarDumper::setHandler(null);
 }
示例#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;
 }
示例#16
0
 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;
 }