Ejemplo n.º 1
0
 public function setUp()
 {
     $this->mockOperator = $this->getMockBuilder('\\Minty\\Compiler\\Operator')->setMethods(['operators'])->setConstructorArgs([1])->getMockForAbstractClass();
     $this->mockOperator->expects($this->any())->method('operators')->will($this->returnValue(['+', '-']));
     $this->otherOperator = $this->getMockBuilder('\\Minty\\Compiler\\Operator')->setMethods(['operators'])->setConstructorArgs([1])->getMockForAbstractClass();
     $this->otherOperator->expects($this->any())->method('operators')->will($this->returnValue('*'));
     $this->collection = new OperatorCollection();
     $this->collection->addOperator($this->mockOperator);
     $this->collection->addOperator($this->otherOperator);
 }