-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expand file tree
/
Copy pathGH9538Test.php
More file actions
41 lines (34 loc) · 890 Bytes
/
GH9538Test.php
File metadata and controls
41 lines (34 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
declare(strict_types=1);
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\Tests\OrmFunctionalTestCase;
class GH9538Test extends OrmFunctionalTestCase
{
protected function setUp(): void
{
parent::setUp();
$this->setUpEntitySchema([
GH9538EntityA::class,
]);
}
public function testCanRemoveEntityWithReadonlyId(): void
{
$this->_em->persist($entity = new GH9538EntityA());
$this->_em->flush();
$this->_em->remove($entity);
$this->_em->flush();
$this->expectNotToPerformAssertions();
}
}
#[Entity]
class GH9538EntityA
{
#[Column(type: 'integer')]
#[Id]
#[GeneratedValue(strategy: 'AUTO')]
public readonly int $id;
}