Skip to content

Commit

Permalink
Make DB2Platform::initializeDoctrineTypeMappings() protected
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Sep 19, 2021
1 parent ba3e2f7 commit c38477a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 45 deletions.
2 changes: 1 addition & 1 deletion src/Platforms/DB2Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getBlobTypeDeclarationSQL(array $column)
/**
* {@inheritDoc}
*/
public function initializeDoctrineTypeMappings()
protected function initializeDoctrineTypeMappings()
{
$this->doctrineTypeMapping = [
'bigint' => 'bigint',
Expand Down
44 changes: 0 additions & 44 deletions tests/Platforms/DB2PlatformTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down

0 comments on commit c38477a

Please sign in to comment.