Exemple #1
0
 /**
  * @test
  */
 public function applicationOptionsOverrideNodeOptions()
 {
     $nodeOptions = array('MyVendor\\MyPackage\\Task\\TaskGroup\\MyTask[taskOption]' => 'Node');
     $this->node->setOptions($nodeOptions);
     $applicationOptions = array('MyVendor\\MyPackage\\Task\\TaskGroup\\MyTask[taskOption]' => 'Application');
     $this->application->setOptions($applicationOptions);
     $this->task->expects($this->atLeastOnce())->method('execute')->willReturnCallback(function ($_, $__, $___, $options) {
         if ($options['taskOption'] !== 'Application') {
             throw new \RuntimeException('Node options do not override deployment options!');
         }
     });
     $localOptions = array();
     $this->taskManager->execute('MyVendor\\MyPackage\\Task\\TaskGroup\\MyTask', $this->node, $this->application, $this->deployment, 'test', $localOptions);
 }