mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Optimized testing
This commit is contained in:
parent
01c6f2d8f8
commit
25ed71221d
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user