Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup GH8127 test case #10424

Merged
merged 2 commits into from
Jan 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/GH8127Test.php
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ protected function setUp(): void
$this->createSchemaForModels(
GH8127Root::class,
GH8127Middle::class,
GH8127Middle2::class,
GH8127Leaf::class
);
}
@@ -26,21 +25,19 @@ protected function setUp(): void
*/
public function testLoadFieldsFromAllClassesInHierarchy(string $queryClass): void
{
$entity = new GH8127Leaf();
$entity->root = 'root';
$entity->middle = 'middle';
$entity->middle2 = 'middle2';
$entity->leaf = 'leaf';
$entity = new GH8127Leaf();
$entity->root = 'root';
$entity->middle = 'middle';
$entity->leaf = 'leaf';

$this->_em->persist($entity);
$this->_em->flush();
$this->_em->clear();

$loadedEntity = $this->_em->find(GH8127Root::class, $entity->id);
$loadedEntity = $this->_em->find($queryClass, $entity->id);

self::assertSame('root', $loadedEntity->root);
self::assertSame('middle', $loadedEntity->middle);
self::assertSame('middle2', $loadedEntity->middle2);
self::assertSame('leaf', $loadedEntity->leaf);
}

@@ -94,20 +91,7 @@ abstract class GH8127Middle extends GH8127Root
/**
* @ORM\Entity
*/
abstract class GH8127Middle2 extends GH8127Middle
{
/**
* @ORM\Column
*
* @var string
*/
public $middle2;
}

/**
* @ORM\Entity
*/
class GH8127Leaf extends GH8127Middle2
class GH8127Leaf extends GH8127Middle
{
/**
* @ORM\Column