1
0
mirror of synced 2025-03-06 21:06:16 +03:00

Improving the documentation of enums as discriminators test

@Ocramius was too eager to merge stuff

Related to: https://github.com/doctrine/doctrine2/pull/6141
This commit is contained in:
Luís Cobucci 2016-11-23 19:20:47 +01:00
parent 7789df39c5
commit 6344fd34cb
No known key found for this signature in database
GPG Key ID: 8042585A7DBC92E1

View File

@ -24,6 +24,13 @@ class GH6141Test extends OrmFunctionalTestCase
); );
} }
/**
* The intent of this test is to ensure that the ORM is capable
* of using objects as discriminators (which makes things a bit
* more dynamic as you can see on the mapping of `GH6141Person`)
*
* @group 6141
*/
public function testEnumDiscriminatorsShouldBeConvertedToString() public function testEnumDiscriminatorsShouldBeConvertedToString()
{ {
$boss = new GH6141Boss('John'); $boss = new GH6141Boss('John');
@ -157,8 +164,8 @@ class GH6141People
* @InheritanceType("JOINED") * @InheritanceType("JOINED")
* @DiscriminatorColumn(name="discr", type="gh6141people") * @DiscriminatorColumn(name="discr", type="gh6141people")
* @DiscriminatorMap({ * @DiscriminatorMap({
* "boss" = GH6141Boss::class, * Doctrine\Tests\ORM\Functional\Ticket\GH6141People::BOSS = GH6141Boss::class,
* "employee" = GH6141Employee::class * Doctrine\Tests\ORM\Functional\Ticket\GH6141People::EMPLOYEE = GH6141Employee::class
* }) * })
*/ */
abstract class GH6141Person abstract class GH6141Person