Passed
Push — master ( 72d254...356a09 )
by Jean Paul
01:39
created

SqliteConnectorTest::testSetIsMemory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 10
rs 10
1
<?php declare( strict_types = 1 );
2
3
namespace Coco\SourceWatcher\Tests\Core\Database\Connections;
4
5
use Coco\SourceWatcher\Core\Database\Connections\SqliteConnector;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * Class SqliteConnectorTest
10
 * @package Coco\SourceWatcher\Tests\Core\Database\Connections
11
 */
12
class SqliteConnectorTest extends TestCase
13
{
14
    /**
15
     *
16
     */
17
    public function testSetGetPath () : void
18
    {
19
        $connector = new SqliteConnector();
20
21
        $givenPath = __DIR__ . "/../../samples/data/sqlite/people-db.sqlite";
22
        $expectedPath = __DIR__ . "/../../samples/data/sqlite/people-db.sqlite";
23
24
        $connector->setPath( $givenPath );
25
26
        $this->assertEquals( $expectedPath, $connector->getPath() );
27
    }
28
29
    /**
30
     *
31
     */
32
    public function testSetIsMemory () : void
33
    {
34
        $connector = new SqliteConnector();
35
36
        $givenMemoryValue = true;
37
        $expectedMemoryValue = true;
38
39
        $connector->setMemory( $givenMemoryValue );
40
41
        $this->assertEquals( $expectedMemoryValue, $connector->isMemory() );
42
    }
43
}
44