Passed
Pull Request — master (#14)
by Alexander
11:30
created

ConnectionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 11
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testDsnHelper() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Mysql\Tests;
6
7
use Yiisoft\Db\Drivers\Connection;
8
use Yiisoft\Db\Helper\Dsn;
9
use Yiisoft\Db\Tests\ConnectionTest as AbstractConnectionTest;
10
11
class ConnectionTest extends AbstractConnectionTest
12
{
13
    protected ?string $driverName = 'mysql';
14
15
    public function testDsnHelper(): void
16
    {
17
        $dsn = new Dsn('mysql', '127.0.0.1', 'yiitest', '3306');
18
19
        $connection = new Connection($this->cache, $this->logger, $this->profiler, $dsn->getDsn());
20
21
        $this->assertEquals('mysql:host=127.0.0.1;dbname=yiitest;port=3306', $connection->getDsn());
22
    }
23
}
24