Failed Conditions
Pull Request — 2.6 (#7857)
by
unknown
08:35
created

GH7854Test   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 2
eloc 11
c 3
b 0
f 0
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 8 1
A testTypedPropertyContainingEmbeddable() 0 8 1
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