diff --git a/application/tests/Integration/Domain/SourceManagement/SourceMemberManagerIntegrationTest.php b/application/tests/Integration/Domain/SourceManagement/SourceMemberManagerIntegrationTest.php new file mode 100644 index 0000000..50b9353 --- /dev/null +++ b/application/tests/Integration/Domain/SourceManagement/SourceMemberManagerIntegrationTest.php @@ -0,0 +1,45 @@ +source = $this->createSource(); + $this->sourceMemberManager = new SourceMemberManager($this->source); + } + + public function testSourceMemberInformationIntegration(): void + { + $childSource = $this->createSource(); + $sourceMemberInformation = new SourceMemberInformation($this->source); + $this->sourceMemberManager->addMember($childSource); + $this->assertEquals($childSource, $sourceMemberInformation->getAllMembers()->get(0)); + $this->sourceMemberManager->removeMember($childSource); + $this->assertEquals(0, $sourceMemberInformation->getAllMembers()->count()); + } +} diff --git a/application/tests/Unit/Domain/SourceManagement/SourceMemberManagerTest.php b/application/tests/Unit/Domain/SourceManagement/SourceMemberManagerTest.php index 85ba278..00e5705 100644 --- a/application/tests/Unit/Domain/SourceManagement/SourceMemberManagerTest.php +++ b/application/tests/Unit/Domain/SourceManagement/SourceMemberManagerTest.php @@ -7,7 +7,6 @@ use App\Entity\Source\SourceInterface; use App\Domain\SourceManagement\SourceMemberManagerInterface; use App\Entity\Source\AbstractSource; use App\Domain\SourceManagement\SourceMemberManager; -use App\Domain\SourceManagement\SourceMemberInformation; class SourceMemberManagerTest extends TestCase { @@ -54,17 +53,4 @@ class SourceMemberManagerTest extends TestCase $this->assertEquals(0, $this->source->getMemberRelation()->getMemberships()->count()); $this->assertEquals(0, $membership->getMemberRelation()->getMembers()->count()); } - - /** - * @todo Move this function to an own integration test class - */ - public function testSourceMemberInformationIntegration(): void - { - $childSource = $this->createSource(); - $sourceMemberInformation = new SourceMemberInformation($this->source); - $this->sourceMemberManager->addMember($childSource); - $this->assertEquals($childSource, $sourceMemberInformation->getAllMembers()->get(0)); - $this->sourceMemberManager->removeMember($childSource); - $this->assertEquals(0, $sourceMemberInformation->getAllMembers()->count()); - } }