Passed
Push — master ( 88983b...1e7624 )
by Wilmer
02:43
created

TestCase::replaceQuotes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 8
rs 10
c 4
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\ActiveRecord\Tests;
6
7
use Yiisoft\ActiveRecord\Tests\Support\DbHelper;
8
use Yiisoft\Db\Connection\ConnectionInterface;
9
10
class TestCase extends \PHPUnit\Framework\TestCase
11
{
12
    protected ConnectionInterface $db;
13
14
    protected function checkFixture(ConnectionInterface $db, string $tablename, bool $reset = false): void
15
    {
16
        $schema = $db->getSchema();
17
        $tableSchema = $schema->getTableSchema($tablename, true);
18
19
        if ($tableSchema === null || $reset) {
20
            DbHelper::loadFixture($db);
21
22
            $schema->refresh();
23
        }
24
    }
25
}
26