Failed Conditions
Pull Request — 2.6 (#7857)
by
unknown
07:24
created

GH7854Test::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\ORM\Functional\Ticket;
6
7
use Doctrine\Tests\OrmFunctionalTestCase;
8
9
/**
10
 * @group GH7854
11
 * @requires PHP >= 7.4
12
 */
13
class GH7854Test extends OrmFunctionalTestCase
14
{
15
    public function setUp()
16
    {
17
        parent::setUp();
18
19
        $this->_schemaTool->createSchema(
20
            [
21
                $this->_em->getClassMetadata(GH7854TestEntity::class),
22
                $this->_em->getClassMetadata(GH7854ValueObject::class),
23
            ]
24
        );
25
    }
26
27
    public function testTypedPropertyContainingEmbeddable() : void
28
    {
29
        $entity = new GH7854TestEntity();
30
        $this->_em->persist($entity);
31
        $this->_em->flush();
32
        $this->_em->clear();
33
        $entities = $this->_em->getRepository(GH7854TestEntity::class)->findAll();
34
        $this->assertEquals($entity, $entities[0]);
35
    }
36
}
37