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