Completed
Pull Request — master (#2)
by Саша
08:50
created

DbalLoaderSpec::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 1
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 1
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace spec\Extraload\Loader\Doctrine;
4
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
use Doctrine\DBAL\Connection;
8
9
class DbalLoaderSpec extends ObjectBehavior
10
{
11
    function let(Connection $connection)
12
    {
13
        $this->beConstructedWith($connection, 'data');
14
    }
15
16
    function it_is_initializable()
17
    {
18
        $this->shouldHaveType('Extraload\Loader\Doctrine\DbalLoader');
19
    }
20
21
    function it_implements_loader_interface()
22
    {
23
        $this->shouldImplement('Extraload\Loader\LoaderInterface');
24
    }
25
26
    function it_loads_data_into_database_using_doctrine_dbal_connection(Connection $connection)
27
    {
28
        $connection->insert('data', ['a1', 'b1', 'c1'])->shouldBeCalled();
29
30
        $this->load(['a1', 'b1', 'c1']);
31
    }
32
}
33