Issues (201)

tests/Driver/AbstractSQLServerDriverTest.php (1 issue)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Tests\Driver;
6
7
use Doctrine\DBAL\Connection;
8
use Doctrine\DBAL\Driver;
9
use Doctrine\DBAL\Driver\AbstractSQLServerDriver;
10
use Doctrine\DBAL\Platforms\AbstractPlatform;
11
use Doctrine\DBAL\Platforms\SQLServer2012Platform;
12
use Doctrine\DBAL\Schema\AbstractSchemaManager;
13
use Doctrine\DBAL\Schema\SQLServerSchemaManager;
14
15
class AbstractSQLServerDriverTest extends AbstractDriverTest
16
{
17
    protected function createDriver() : Driver
18
    {
19
        return $this->getMockForAbstractClass(AbstractSQLServerDriver::class);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getMockFor...SQLServerDriver::class) returns the type PHPUnit\Framework\MockObject\MockObject which is incompatible with the type-hinted return Doctrine\DBAL\Driver.
Loading history...
20
    }
21
22
    protected function createPlatform() : AbstractPlatform
23
    {
24
        return new SQLServer2012Platform();
25
    }
26
27
    protected function createSchemaManager(Connection $connection) : AbstractSchemaManager
28
    {
29
        return new SQLServerSchemaManager($connection);
30
    }
31
32
    /**
33
     * {@inheritDoc}
34
     */
35
    protected function getDatabasePlatformsForVersions() : array
36
    {
37
        return [
38
            ['12', SQLServer2012Platform::class],
39
        ];
40
    }
41
}
42