Exemplo n.º 1
0
 /**
  * Will test if a new ColumnComposer will be instantiated correctly
  */
 public function testViewConstruction()
 {
     $versionEngine = Mockery::mock('OpenSkill\\Datatable\\Versions\\VersionEngine');
     $versionEngine->shouldReceive('getVersion')->andReturn();
     $dt = new Datatable($versionEngine);
     $dtv = $dt->view();
 }
Exemplo n.º 2
0
 /**
  * Will test if a new ColumnComposer will be instantiated correctly
  */
 public function testViewConstruction()
 {
     $version = Mockery::mock('OpenSkill\\Datatable\\Versions\\Version');
     $version->shouldReceive('tableView')->andReturn('fooBar');
     $version->shouldReceive('scriptView')->andReturn('fooBar');
     $versionEngine = Mockery::mock('OpenSkill\\Datatable\\Versions\\VersionEngine');
     $versionEngine->shouldReceive('getVersion')->andReturn($version);
     $viewFactory = Mockery::mock('Illuminate\\Contracts\\View\\Factory');
     $configRepository = Mockery::mock('Illuminate\\Contracts\\Config\\Repository');
     $configRepository->shouldReceive('get')->andReturn("fooBar");
     $dt = new Datatable($versionEngine, $viewFactory, $configRepository);
     $dtv = $dt->view();
 }