Пример #1
0
 /**
  * Test the `addOperator` and `getOperatorTable` accessors.
  */
 public function testOperatorTableAccessors()
 {
     $operator = new BinaryOperator(1, 1, BinaryOperator::LEFT, function () {
     });
     $token = new Token($operator->getCode(), 1, 1);
     $grammar = new Grammar();
     $grammar->addOperator($operator);
     $this->assertSame($operator, $grammar->getOperatorTable()->getBinaryOperator($token));
 }