Passed
Push — master ( b8e489...8edc98 )
by Jean Paul
07:19
created

testSetGetDbName()   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
eloc 5
c 1
b 0
f 0
dl 0
loc 10
rs 10
cc 1
nc 1
nop 0
1
<?php declare( strict_types = 1 );
2
3
namespace Coco\SourceWatcher\Tests\Core\Database\Connections;
4
5
use Coco\SourceWatcher\Core\Database\Connections\MySqlConnector;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * Class ClientServerDatabaseConnectorTest
10
 */
11
class ClientServerDatabaseConnectorTest extends TestCase
12
{
13
    /**
14
     *
15
     */
16
    public function testSetGetHost () : void
17
    {
18
        $connector = new MySqlConnector();
19
20
        $given = "localhost";
21
        $expected = "localhost";
22
23
        $connector->setHost( $given );
24
25
        $this->assertEquals( $expected, $connector->getHost() );
26
    }
27
28
    /**
29
     *
30
     */
31
    public function testSetGetPort () : void
32
    {
33
        $connector = new MySqlConnector();
34
35
        $given = 3306;
36
        $expected = 3306;
37
38
        $connector->setPort( $given );
39
40
        $this->assertEquals( $expected, $connector->getPort() );
41
    }
42
43
    /**
44
     *
45
     */
46
    public function testSetGetDbName () : void
47
    {
48
        $connector = new MySqlConnector();
49
50
        $given = "test";
51
        $expected = "test";
52
53
        $connector->setDbName( $given );
54
55
        $this->assertEquals( $expected, $connector->getDbName() );
56
    }
57
}
58