From 06603699266015c66b637c7b7c118b244da4a3d4 Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Mon, 28 Oct 2024 13:30:45 -0600 Subject: [PATCH] Extracted EntityStub from FactoryBuilderTest --- tests/Assets/Testing/EntityStub.php | 32 ++++++++++++++++++++ tests/Feature/Testing/FactoryBuilderTest.php | 28 +---------------- 2 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 tests/Assets/Testing/EntityStub.php diff --git a/tests/Assets/Testing/EntityStub.php b/tests/Assets/Testing/EntityStub.php new file mode 100644 index 00000000..5d4c5703 --- /dev/null +++ b/tests/Assets/Testing/EntityStub.php @@ -0,0 +1,32 @@ +assertTrue($afterMakingRan); } } - -use Doctrine\ORM\Mapping\Entity; -use Doctrine\ORM\Mapping\Id; -use Doctrine\ORM\Mapping\GeneratedValue; -use Doctrine\ORM\Mapping\Column; -use Doctrine\ORM\Mapping\JoinTable; -use Doctrine\ORM\Mapping\JoinColumn; -use Doctrine\ORM\Mapping\ManyToMany; -use Doctrine\ORM\Mapping\InverseJoinColumn; - -#[Entity] -class EntityStub -{ - #[Id] - #[GeneratedValue] - #[Column(type: "integer")] - public $id; - - #[Column(type: "string")] - public $name; - - #[ManyToMany(targetEntity: "EntityStub")] - #[JoinTable(name: "stub_stubs")] - #[JoinColumn(name: "owner_id", referencedColumnName: "id")] - #[InverseJoinColumn(name: "owned_id", referencedColumnName: "id")] - public $others; -}