Esempio n. 1
0
 /**
  * @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));
 }
Esempio n. 2
0
 public function testInitialize()
 {
     $options = array('foo');
     $this->blank->expects($this->once())->method('initialize')->with($options);
     $this->condition->initialize($options);
 }
Esempio n. 3
0
 public function testInitialize()
 {
     $options = array('left' => 'foo', 'right' => 'bar');
     $this->equalTo->expects($this->once())->method('initialize')->with($options);
     $this->condition->initialize($options);
 }