| 1 | <?php |
||
| 8 | class ConsoleLoaderSpec extends ObjectBehavior |
||
| 9 | { |
||
| 10 | function let(Table $table) |
||
| 11 | { |
||
| 12 | $this->beConstructedWith($table); |
||
| 13 | } |
||
| 14 | |||
| 15 | function it_is_initializable() |
||
| 16 | { |
||
| 17 | $this->shouldHaveType('Extraload\Loader\ConsoleLoader'); |
||
| 18 | } |
||
| 19 | |||
| 20 | function it_implements_loader_interface() |
||
| 21 | { |
||
| 22 | $this->shouldImplement('Extraload\Loader\LoaderInterface'); |
||
| 23 | } |
||
| 24 | |||
| 25 | function it_loads_data_in_console_using_table_helper(Table $table) |
||
| 26 | { |
||
| 27 | $table->addRow(['a1', 'b1', 'c1'])->shouldBeCalled(); |
||
| 28 | |||
| 29 | $this->load(['a1', 'b1', 'c1']); |
||
| 30 | } |
||
| 31 | |||
| 32 | function it_renders_data_in_console_on_flush(Table $table) |
||
| 33 | { |
||
| 34 | $table->render()->shouldBeCalled(); |
||
| 35 | |||
| 36 | $this->flush(); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |