|
8 | 8 | use Doctrine\DBAL\Driver; |
9 | 9 | use Doctrine\DBAL\Driver\Result; |
10 | 10 | use Doctrine\DBAL\Platforms\AbstractPlatform; |
11 | | -use Doctrine\DBAL\Schema\AbstractSchemaManager; |
12 | | -use Doctrine\DBAL\Schema\Name\UnquotedIdentifierFolding; |
13 | | -use Doctrine\DBAL\Schema\SchemaConfig; |
| 11 | +use Doctrine\DBAL\Platforms\SQLitePlatform; |
14 | 12 | use Doctrine\ORM\Cache\CacheConfiguration; |
15 | 13 | use Doctrine\ORM\Cache\CacheFactory; |
16 | 14 | use Doctrine\ORM\Cache\DefaultCacheFactory; |
|
22 | 20 | use Psr\Cache\CacheItemPoolInterface; |
23 | 21 | use Symfony\Component\Cache\Adapter\ArrayAdapter; |
24 | 22 |
|
25 | | -use function enum_exists; |
26 | 23 | use function realpath; |
27 | 24 | use function sprintf; |
28 | 25 |
|
@@ -66,9 +63,7 @@ protected function createAttributeDriver(array $paths = []): AttributeDriver |
66 | 63 | */ |
67 | 64 | protected function getTestEntityManager(): EntityManagerMock |
68 | 65 | { |
69 | | - return $this->buildTestEntityManagerWithPlatform( |
70 | | - $this->createConnectionMock($this->createPlatformMock()), |
71 | | - ); |
| 66 | + return $this->createTestEntityManagerWithPlatform(new SQLitePlatform()); |
72 | 67 | } |
73 | 68 |
|
74 | 69 | protected function createTestEntityManagerWithConnection(Connection $connection): EntityManagerMock |
@@ -147,24 +142,6 @@ private function createConnectionMock(AbstractPlatform $platform): Connection |
147 | 142 | return $connection; |
148 | 143 | } |
149 | 144 |
|
150 | | - private function createPlatformMock(): AbstractPlatform |
151 | | - { |
152 | | - $schemaManager = $this->createMock(AbstractSchemaManager::class); |
153 | | - $schemaManager->method('createSchemaConfig') |
154 | | - ->willReturn(new SchemaConfig()); |
155 | | - |
156 | | - $platform = $this->getMockBuilder(AbstractPlatform::class) |
157 | | - ->setConstructorArgs(enum_exists(UnquotedIdentifierFolding::class) ? [UnquotedIdentifierFolding::UPPER] : []) |
158 | | - ->onlyMethods(['supportsIdentityColumns', 'createSchemaManager']) |
159 | | - ->getMockForAbstractClass(); |
160 | | - $platform->method('supportsIdentityColumns') |
161 | | - ->willReturn(true); |
162 | | - $platform->method('createSchemaManager') |
163 | | - ->willReturn($schemaManager); |
164 | | - |
165 | | - return $platform; |
166 | | - } |
167 | | - |
168 | 145 | private function createDriverMock(AbstractPlatform $platform): Driver |
169 | 146 | { |
170 | 147 | $result = $this->createMock(Result::class); |
|
0 commit comments