Optimized SourceMemberInformation

This commit is contained in:
Kevin Frantz
2018-12-30 16:12:46 +01:00
parent 713ddae0df
commit 3a6ed4d54d
4 changed files with 44 additions and 51 deletions

View File

@@ -75,7 +75,7 @@ class RightCheckerTest extends TestCase
public function testSecondDimension(): void
{
$secondSource = $this->getSourceMock();
$this->source->getMemberRelation()->getMembers()->add($secondSource);
$this->source->getMemberRelation()->getMembers()->add($secondSource->getMemberRelation());
$granted = $this->rightManager->isGranted($this->layer, $this->type, $secondSource);
$this->assertTrue($granted);
$notGranted = $this->rightManager->isGranted(LayerType::SOURCE, $this->type, $secondSource);
@@ -91,8 +91,8 @@ class RightCheckerTest extends TestCase
{
$thirdSource = $this->getSourceMock();
$secondSource = $this->getSourceMock();
$secondSource->getMemberRelation()->getMembers()->add($thirdSource);
$this->source->getMemberRelation()->getMembers()->add($secondSource);
$secondSource->getMemberRelation()->getMembers()->add($thirdSource->getMemberRelation());
$this->source->getMemberRelation()->getMembers()->add($secondSource->getMemberRelation());
$granted = $this->rightManager->isGranted($this->layer, $this->type, $thirdSource);
$this->assertTrue($granted);
$notGranted = $this->rightManager->isGranted(LayerType::SOURCE, $this->type, $thirdSource);