21 private $firstVisibilityMock;
26 private $secondVisibilityMock;
30 $this->firstVisibilityMock = $this->getMockBuilder(ElementVisibilityInterface::class)
31 ->getMockForAbstractClass();
32 $this->secondVisibilityMock = $this->getMockBuilder(ElementVisibilityInterface::class)
33 ->getMockForAbstractClass();
47 'stdClass' => new \stdClass()
61 public function testDisabled($firstExpects, $firstResult, $secondExpects, $secondResult, $expectedResult)
64 $this->firstVisibilityMock->expects($firstExpects)
65 ->method(
'isDisabled')
67 ->willReturn($firstResult);
68 $this->secondVisibilityMock->expects($secondExpects)
69 ->method(
'isDisabled')
71 ->willReturn($secondResult);
73 $this->assertSame($expectedResult, $this->model->isDisabled(
$path));
84 public function testHidden($firstExpects, $firstResult, $secondExpects, $secondResult, $expectedResult)
87 $this->firstVisibilityMock->expects($firstExpects)
90 ->willReturn($firstResult);
91 $this->secondVisibilityMock->expects($secondExpects)
94 ->willReturn($secondResult);
96 $this->assertSame($expectedResult, $this->model->isHidden(
$path));
105 [$this->once(),
false, $this->once(),
false,
false],
106 [$this->once(),
false, $this->once(),
true,
true],
107 [$this->once(),
true, $this->never(),
true,
true],
108 [$this->once(),
true, $this->never(),
false,
true],
testHidden($firstExpects, $firstResult, $secondExpects, $secondResult, $expectedResult)
testDisabled($firstExpects, $firstResult, $secondExpects, $secondResult, $expectedResult)