Failed Conditions
Pull Request — master (#3033)
by Aleksey
15:03
created

DriverTest::checkForSkippingTest()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 3
nc 2
nop 1
1
<?php
2
3
namespace Doctrine\Tests\DBAL\Driver\SQLSrv;
4
5
use Doctrine\DBAL\Driver\AbstractSQLServerDriver;
6
use Doctrine\DBAL\Driver\SQLSrv\Driver;
7
use Doctrine\Tests\DBAL\Driver\AbstractSQLServerDriverTest;
8
use function extension_loaded;
9
10
class DriverTest extends AbstractSQLServerDriverTest
11
{
12
    public function testReturnsName()
13
    {
14
        self::assertSame('sqlsrv', $this->driver->getName());
15
    }
16
17
    protected function createDriver()
18
    {
19
        return new Driver();
20
    }
21
22
    protected function checkForSkippingTest(AbstractSQLServerDriver $driver) : void
23
    {
24
        if (extension_loaded('sqlsrv') && $driver instanceof Driver) {
25
            return;
26
        }
27
28
        $this->markTestSkipped('The test is only for the sqlsrv drivers');
29
    }
30
}
31