Esempio n. 1
0
 /**
  * Get an instruction for a processor
  * 
  * @param Processor $processor
  * @return mixed
  */
 public function getInstruction(Processor $processor)
 {
     $prop = $processor->getProperty();
     if (!isset($this->{$prop})) {
         throw new \LogicException("Node doesn't have instruction property '{$prop}'");
     }
     return $this->resolve($this->{$prop});
 }
Esempio n. 2
0
 public function setUp()
 {
     $this->processor = $this->createMock(Processor::class);
     $this->processor->expects($this->any())->method('getProperty')->willReturn('<process>');
 }