Pyrech\ComposerChangelogs\Outputter::addOperation PHP Метод

addOperation() публичный Метод

public addOperation ( Composer\DependencyResolver\Operation\OperationInterface $operation )
$operation Composer\DependencyResolver\Operation\OperationInterface
    public function addOperation(OperationInterface $operation)
    {
        $this->operations[] = $operation;
    }

Usage Example

    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());
    }
All Usage Examples Of Pyrech\ComposerChangelogs\Outputter::addOperation