X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FTestwork%2FOutput%2FPrinter%2FStreamOutputPrinter.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FTestwork%2FOutput%2FPrinter%2FStreamOutputPrinter.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=6b3fb4e49963f08f3545007f3622bfc9d30c5bf8;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/behat/behat/src/Behat/Testwork/Output/Printer/StreamOutputPrinter.php b/vendor/behat/behat/src/Behat/Testwork/Output/Printer/StreamOutputPrinter.php deleted file mode 100644 index 6b3fb4e49..000000000 --- a/vendor/behat/behat/src/Behat/Testwork/Output/Printer/StreamOutputPrinter.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Behat\Testwork\Output\Printer; - -use Behat\Testwork\Output\Printer\Factory\OutputFactory; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author Wouter J - * @author Konstantin Kudryashov - */ -class StreamOutputPrinter implements OutputPrinter -{ - /** - * @var OutputInterface - */ - private $output; - /** - * @var OutputFactory - */ - private $outputFactory; - - public function __construct(OutputFactory $outputFactory) - { - $this->outputFactory = $outputFactory; - } - - /** - * @return OutputFactory - */ - protected function getOutputFactory() - { - return $this->outputFactory; - } - - /** - * {@inheritdoc} - */ - public function setOutputPath($path) - { - $this->outputFactory->setOutputPath($path); - $this->flush(); - } - - /** - * {@inheritdoc} - */ - public function getOutputPath() - { - return $this->outputFactory->getOutputPath(); - } - - /** - * {@inheritdoc} - */ - public function setOutputStyles(array $styles) - { - $this->outputFactory->setOutputStyles($styles); - $this->flush(); - } - - /** - * {@inheritdoc} - */ - public function getOutputStyles() - { - return $this->outputFactory->getOutputStyles(); - } - - /** - * {@inheritdoc} - */ - public function setOutputDecorated($decorated) - { - $this->outputFactory->setOutputDecorated($decorated); - $this->flush(); - } - - /** - * {@inheritdoc} - */ - public function isOutputDecorated() - { - return $this->outputFactory->isOutputDecorated(); - } - - /** - * {@inheritdoc} - */ - public function setOutputVerbosity($level) - { - $this->outputFactory->setOutputVerbosity($level); - $this->flush(); - } - - /** - * {@inheritdoc} - */ - public function getOutputVerbosity() - { - return $this->outputFactory->getOutputVerbosity(); - } - - /** - * {@inheritdoc} - */ - public function write($messages) - { - $this->getWritingStream()->write($messages, false); - } - - /** - * {@inheritdoc} - */ - public function writeln($messages = '') - { - $this->getWritingStream()->write($messages, true); - } - - /** - * {@inheritdoc} - */ - public function flush() - { - $this->output = null; - } - - /** - * Returns output instance, prepared to write. - * - * @return OutputInterface - */ - final protected function getWritingStream() - { - if (null === $this->output) { - $this->output = $this->outputFactory->createOutput(); - } - - return $this->output; - } -}