public function setUp()
 {
     parent::setUp();
     $config = $this->getMockedConfig();
     $config->shouldReceive('get')->with('multilang::cachePrefix')->andReturn('test');
     $config->shouldReceive('get')->with('multilang::rememberTime')->andReturn(1);
     $this->content = new Content();
     $this->image = new Image();
     $this->checkerAttribute = new CheckerAttribute($this->app['db']->connection()->getSchemaBuilder(), $this->app['cache.store'], $config);
 }
Example #2
0
 public function setUp()
 {
     parent::setUp();
     $this->config = m::mock('Illuminate\\Config\\Repository');
     $this->config->shouldReceive('get')->with('multilang::languageModel')->andReturn('Muratsplat\\Multilang\\Tests\\Model\\Language');
     $this->config->shouldReceive('get')->with('multilang::reservedAttribute')->andReturn('__lang_id__');
     $this->config->shouldReceive('offsetGet')->andReturn('testbench');
     $this->app['config'] = $this->config;
     $this->contentLang = new ContentLang();
 }
Example #3
0
 public function setUp()
 {
     parent::setUp();
     $configForChecker = $this->getMockedConfig();
     $configForChecker->shouldReceive('get')->with('multilang::cachePrefix')->andReturn('/test/multilang');
     $configForChecker->shouldReceive('get')->with('multilang::rememberTime')->andReturn(1);
     $mockedConfig = m::mock('Illuminate\\Config\\Repository')->shouldReceive('get')->with('multilang::reservedAttribute')->andReturn('__lang_id__')->getMock();
     $mockedConfig->shouldReceive('get')->with('multilang::rememberTime')->andReturn(1);
     $mockedConfig->shouldReceive('get')->with('multilang::cachePrefix')->andReturn('/test/multilang');
     $mockedConfig->shouldReceive('get')->with('multilang::cache')->andReturn(true);
     $this->wrapper = new Wrapper($mockedConfig, new CheckerAttribute($this->app['db']->connection()->getSchemaBuilder(), $this->app['cache.store'], $configForChecker), $this->app['cache.store']);
     $this->content = new Content();
     $this->image = new Image();
 }
 public function setUp()
 {
     parent::setUp();
     $this->language = new Language();
 }
Example #5
0
 public function setUp()
 {
     parent::setUp();
     // setting laravel events object
     MultiLang::setEventDispatcher($this->app['events']);
 }