Passed
Push — master ( b0ca68...10680f )
by Wilmer
27:02 queued 23:37
created

ConnectionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetTableSchema() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Tests\Connection;
6
7
use Yiisoft\Db\Exception\NotSupportedException;
8
use Yiisoft\Db\Tests\AbstractConnectionTest;
9
use Yiisoft\Db\Tests\Support\TestTrait;
10
11
/**
12
 * @group db
13
 *
14
 * @psalm-suppress PropertyNotSetInConstructor
15
 */
16
final class ConnectionTest extends AbstractConnectionTest
17
{
18
    use TestTrait;
19
20
    public function testGetTableSchema(): void
21
    {
22
        $db = $this->getConnection();
23
24
        $this->expectException(NotSupportedException::class);
25
        $this->expectExceptionMessage(
26
            'Yiisoft\Db\Tests\Support\Stub\Schema::loadTableSchema is not supported by this DBMS.'
27
        );
28
29
        $db->getTableSchema('non_existing_table');
30
    }
31
}
32