From c38477a2cccc4bed4edf74aaf58a9013b7ecbff2 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Sun, 19 Sep 2021 12:49:34 -0700 Subject: [PATCH] Make DB2Platform::initializeDoctrineTypeMappings() protected --- src/Platforms/DB2Platform.php | 2 +- tests/Platforms/DB2PlatformTest.php | 44 ----------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/src/Platforms/DB2Platform.php b/src/Platforms/DB2Platform.php index 6e984f5bdaf..c019fba7ce4 100644 --- a/src/Platforms/DB2Platform.php +++ b/src/Platforms/DB2Platform.php @@ -69,7 +69,7 @@ public function getBlobTypeDeclarationSQL(array $column) /** * {@inheritDoc} */ - public function initializeDoctrineTypeMappings() + protected function initializeDoctrineTypeMappings() { $this->doctrineTypeMapping = [ 'bigint' => 'bigint', diff --git a/tests/Platforms/DB2PlatformTest.php b/tests/Platforms/DB2PlatformTest.php index fe07ca6f6b3..98f69680a13 100644 --- a/tests/Platforms/DB2PlatformTest.php +++ b/tests/Platforms/DB2PlatformTest.php @@ -289,50 +289,6 @@ public function testGeneratesColumnTypesDeclarationSQL(): void self::assertEquals('TIME', $this->platform->getTimeTypeDeclarationSQL($fullColumnDef)); } - public function testInitializesDoctrineTypeMappings(): void - { - $this->platform->initializeDoctrineTypeMappings(); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('smallint')); - self::assertSame('smallint', $this->platform->getDoctrineTypeMapping('smallint')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('bigint')); - self::assertSame('bigint', $this->platform->getDoctrineTypeMapping('bigint')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('integer')); - self::assertSame('integer', $this->platform->getDoctrineTypeMapping('integer')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('time')); - self::assertSame('time', $this->platform->getDoctrineTypeMapping('time')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('date')); - self::assertSame('date', $this->platform->getDoctrineTypeMapping('date')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('varchar')); - self::assertSame('string', $this->platform->getDoctrineTypeMapping('varchar')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('character')); - self::assertSame('string', $this->platform->getDoctrineTypeMapping('character')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('clob')); - self::assertSame('text', $this->platform->getDoctrineTypeMapping('clob')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('blob')); - self::assertSame('blob', $this->platform->getDoctrineTypeMapping('blob')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('decimal')); - self::assertSame('decimal', $this->platform->getDoctrineTypeMapping('decimal')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('double')); - self::assertSame('float', $this->platform->getDoctrineTypeMapping('double')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('real')); - self::assertSame('float', $this->platform->getDoctrineTypeMapping('real')); - - self::assertTrue($this->platform->hasDoctrineTypeMappingFor('timestamp')); - self::assertSame('datetime', $this->platform->getDoctrineTypeMapping('timestamp')); - } - /** * {@inheritDoc} */