addOperation() public method

public addOperation ( Composer\DependencyResolver\Operation\OperationInterface $operation )
$operation Composer\DependencyResolver\Operation\OperationInterface
コード例 #1
0
    public function test_it_outputs_right_text()
    {
        $this->SUT->addOperation(new FakeOperation('operation 1'));
        $this->SUT->addOperation(new FakeOperation('operation 2'));
        $expectedOutput = <<<TEXT
<fg=green>Changelogs summary:</fg=green>

 - Output handler 2, operation 1
   /compare-url2
   /release-url2

 - Output handler 2, operation 2
   /compare-url2
   /release-url2

TEXT;
        $this->assertSame($expectedOutput, $this->SUT->getOutput());
    }
コード例 #2
0
 /**
  * @param PackageEvent $event
  */
 public function postPackageOperation(PackageEvent $event)
 {
     $operation = $event->getOperation();
     $this->outputter->addOperation($operation);
 }