Ejemplo n.º 1
0
 /**
  * Test if the `isRegistered` method returns true if an operand is registered for the given identifier.
  */
 public function testIsRegisteredReturnsTrue()
 {
     /* @var \PHPUnit_Framework_MockObject_MockObject $operand */
     $operand = $this->getMock('com\\mohiva\\pyramid\\Operand');
     $operand->expects($this->any())->method('getIdentifiers')->will($this->returnValue(array(1)));
     /* @var \com\mohiva\pyramid\Operand $operand */
     $token = new Token(1, 1, 1);
     $table = new OperandTable();
     $table->addOperand($operand);
     $this->assertTrue($table->isRegistered($token));
 }