Completed
Pull Request — 2.6 (#7857)
by
unknown
06:46
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
 */
12
class GH7854Test extends OrmFunctionalTestCase
13
{
14
    public function setUp()
15
    {
16
        parent::setUp();
17
18
        $this->_schemaTool->createSchema(
19
            [
20
                $this->_em->getClassMetadata(GH7854Entity::class),
21
                $this->_em->getClassMetadata(GH7854ValueObject::class),
22
            ]
23
        );
24
    }
25
26
    public function testTypedPropertyContainingEmbeddable() : void
27
    {
28
        $this->_em->persist(new GH7854Entity());
29
        $this->_em->flush();
30
        $this->_em->getRepository(GH7854Entity::class)->findAll();
31
    }
32
}
33
34
/**
35
 * @Entity()
36
 */
37
class GH7854Entity
38
{
39
    /**
40
     * @Embedded(class = "GH7854ValueObject")
41
     */
42
    private GH7854ValueObject $valueObject;
0 ignored issues
show
introduced by
The private property $valueObject is not used, and could be removed.
Loading history...
43
}
44
45
/**
46
 * @Embeddable()
47
 */
48
class GH7854ValueObject
49
{
50
    /** @Id() @Column(type="integer") @GeneratedValue(strategy="AUTO") */
51
    private int $value;
0 ignored issues
show
introduced by
The private property $value is not used, and could be removed.
Loading history...
52
}
53