Exemple #1
0
 /** @test */
 public function it_render_table_attributes()
 {
     $this->admin->htmlBuilder->shouldReceive('attributes')->with([])->once()->andReturn('table-attributes');
     $this->admin->htmlBuilder->shouldReceive('attributes')->with(['data-ordering' => 'false'])->once()->andReturn('table-attributes-with-ordering');
     $modelItem = new ModelItem('\\Foo\\Bar\\Model');
     $attr = $modelItem->renderTableAttributes();
     $this->assertEquals('table-attributes', $attr);
     $modelItem = new ModelItem('\\ModelItemTestClass');
     $attr = $modelItem->renderTableAttributes();
     $this->assertEquals('table-attributes-with-ordering', $attr);
 }