Completed
Push — master ( 614b63...a2526c )
by Jacob
03:14
created

testIsInstanceOfChangelogRepository()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 9
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 9
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Jacobemerick\Web\Domain\Stream\Changelog;
4
5
use Aura\Sql\ConnectionLocator;
6
use Aura\Sql\ExtendedPdo;
7
use PHPUnit_Framework_TestCase;
8
9 View Code Duplication
class MysqlChangelogRepositoryTest extends PHPUnit_Framework_TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
12
    public function testIsInstanceOfChangelogRepository()
13
    {
14
        $repository = new MysqlChangelogRepository(new ConnectionLocator());
15
16
        $this->assertInstanceOf(
17
            'Jacobemerick\Web\Domain\Stream\Changelog\MysqlChangelogRepository',
18
            $repository
19
        );
20
    }
21
22
    public function testImplementsChangelogInterface()
23
    {
24
        $repository = new MysqlChangelogRepository(new ConnectionLocator());
25
26
        $this->assertInstanceOf(
27
            'Jacobemerick\Web\Domain\Stream\Changelog\ChangelogRepositoryInterface',
28
            $repository
29
        );
30
    }
31
32
    public function testConstructSetsConnections()
33
    {
34
        $connection = new ConnectionLocator();
35
        $respository = new MysqlChangelogRepository($connection);
36
37
        $this->assertAttributeSame(
38
            $connection,
39
            'connections',
40
            $respository
41
        );
42
    }
43
}
44