Completed
Pull Request — master (#2)
by Саша
36:16 queued 06:11
created

it_implements_loader_interface()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace spec\Extraload\Loader;
4
5
use PhpSpec\ObjectBehavior;
6
use Symfony\Component\Console\Helper\Table;
7
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