Optimized testing

This commit is contained in:
Kevin Frantz 2018-12-30 00:31:03 +01:00
parent 01c6f2d8f8
commit 25ed71221d

View File

@ -117,22 +117,24 @@ class LawPermissionCheckerTest extends TestCase
$this->assertFalse($this->checkClientPermission()); $this->assertFalse($this->checkClientPermission());
} }
// /** public function testChildMemberPermission(): void
// * @todo Implement! {
// */ $parentSource = $this->getSourceMock();
// public function testChildMemberPermission(): void $parentSource->setSlug('Parent Source');
// { $parentSourceMemberManager = new SourceMemberManager($parentSource);
// $parentSource = $this->getSourceMock(); $parentSourceMemberManager->addMember($this->clientSource);
// $parentSource->setSlug('Parent Source'); $this->assertEquals($parentSource, $this->clientSource->getMemberRelation()->getMemberships()->get(0)->getSource());
// $sourceMemberManager = new SourceMemberManager($parentSource); $this->assertEquals($this->clientSource, $parentSource->getMemberRelation()->getMembers()->get(0)->getSource());
// $sourceMemberManager->addMember($this->clientSource); $parentSourceRight = $this->getClonedClientRight();
// $parentSourceRight = $this->getClonedClientRight(); $parentSourceRight->setReciever($parentSource);
// $parentSourceRight->setReciever($parentSource); $this->law->getRights()->add($parentSourceRight);
// $this->law->getRights()->add($parentSourceRight); $this->assertEquals($parentSourceRight, $this->law->getRights()->get(0));
// $this->assertTrue($this->checkClientPermission()); $this->assertEquals($parentSource, $parentSourceRight->getReciever());
// $this->law->setRights(new ArrayCollection()); $this->assertEquals($this->source, $parentSourceRight->getSource());
// $this->assertFalse($this->checkClientPermission()); $this->assertTrue($this->checkClientPermission());
// } $this->law->setRights(new ArrayCollection());
$this->assertFalse($this->checkClientPermission());
}
public function testGetRightsByType(): void public function testGetRightsByType(): void
{ {