/** * @dataProvider isAllowedDataProvider * * @param array $options * @param $context * @param array $expectedCalls * @param $expectedResult */ public function testIsAllowed(array $options, $context, array $expectedCalls, $expectedResult) { foreach ($expectedCalls as $key => $calls) { $this->addMockExpectedCalls($key, $calls); } $this->condition->initialize($options); $this->assertEquals($expectedResult, $this->condition->isAllowed($context)); }
public function testInitialize() { $options = array('foo'); $this->blank->expects($this->once())->method('initialize')->with($options); $this->condition->initialize($options); }
public function testInitialize() { $options = array('left' => 'foo', 'right' => 'bar'); $this->equalTo->expects($this->once())->method('initialize')->with($options); $this->condition->initialize($options); }