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

DriverTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
dl 0
loc 19
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createDriver() 0 3 1
A testReturnsName() 0 3 1
A checkForSkippingTest() 0 7 3
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