public function testNoLocalesConfigException() { // Mock Config Illuminate\Support\Facades\Config::swap($config = m::mock('ConfigMock')); $config->shouldReceive('get')->with('js-localization::config.locales')->andReturn(null); $this->setExpectedException('Exception'); $this->runCommand(); }
public function setUp() { parent::setUp(); $app = m::mock('AppMock'); $app->shouldReceive('instance')->once()->andReturn($app); Illuminate\Support\Facades\Facade::setFacadeApplication($app); Illuminate\Support\Facades\Config::swap($config = m::mock('ConfigMock')); }
public function setUp() { parent::setUp(); $app = m::mock('AppMock'); $app->shouldReceive('instance')->once()->andReturn($app); Illuminate\Support\Facades\Facade::setFacadeApplication($app); Illuminate\Support\Facades\Config::swap($config = m::mock('ConfigMock')); $config->shouldReceive('get')->once()->with('logviewer::log_dirs')->andReturn(array('app' => 'app/storage/logs')); $this->logviewer = new Logviewer('app', 'cgi-fcgi', '2013-06-01'); }
public function setUp() { $tmpConfig = (include 'config.php'); $app = m::mock('AppMock'); $app->shouldReceive('instance')->once()->andReturn($app); Illuminate\Support\Facades\Facade::setFacadeApplication($app); Illuminate\Support\Facades\Config::swap($config = m::mock('ConfigMock')); foreach ($tmpConfig as $key => $row) { $config->shouldReceive('get')->once()->with("smarty::{$key}")->andReturn($row); } $this->manager = new SmartyManager(m::mock('Illuminate\\View\\Engines\\EngineResolver'), m::mock('Illuminate\\View\\ViewFinderInterface'), m::mock('Illuminate\\Events\\Dispatcher'), new \Smarty()); }