/** * gets data type * * @param array $definition * @return string * @throws \LogicException */ protected function getDataType(array $definition) { if (!isset($definition['type'])) { throw new \LogicException('Missing type in definition'); } $length = isset($definition['length']) ? $definition['length'] : null; return $this->dataTypeMapper->getMappedDataType($definition['type'], $length); }
/** * @dataProvider provideGetMappedDataType */ public function testGetMappedDataType($length, $ormType, $expected) { $actual = $this->dataTypeMapper->getMappedDataType($ormType, $length); $this->assertEquals($expected, $actual); }