| @@ 175-186 (lines=12) @@ | ||
| 172 | * @depends testTypeIsExported |
|
| 173 | * @param ClassMetadata $class |
|
| 174 | */ |
|
| 175 | public function testIdentifierIsExported($class) |
|
| 176 | { |
|
| 177 | self::assertNotNull($class->getProperty('id')); |
|
| 178 | ||
| 179 | $property = $class->getProperty('id'); |
|
| 180 | ||
| 181 | self::assertTrue($property->isPrimaryKey()); |
|
| 182 | self::assertEquals(['id'], $class->identifier); |
|
| 183 | self::assertEquals(GeneratorType::IDENTITY, $class->getProperty('id')->getValueGenerator()->getType(), "Generator Type wrong"); |
|
| 184 | ||
| 185 | return $class; |
|
| 186 | } |
|
| 187 | ||
| 188 | /** |
|
| 189 | * @depends testIdentifierIsExported |
|
| @@ 335-346 (lines=12) @@ | ||
| 332 | * @depends testProperties |
|
| 333 | * @param ClassMetadata $class |
|
| 334 | */ |
|
| 335 | public function testIdentifier($class) |
|
| 336 | { |
|
| 337 | self::assertNotNull($class->getProperty('id')); |
|
| 338 | ||
| 339 | $property = $class->getProperty('id'); |
|
| 340 | ||
| 341 | self::assertEquals('integer', $property->getTypeName()); |
|
| 342 | self::assertEquals(['id'], $class->identifier); |
|
| 343 | self::assertEquals(Mapping\GeneratorType::AUTO, $property->getValueGenerator()->getType(), "ID-Generator is not GeneratorType::AUTO"); |
|
| 344 | ||
| 345 | return $class; |
|
| 346 | } |
|
| 347 | ||
| 348 | /** |
|
| 349 | * @group #6129 |
|