public function testConstructor() { $output = new NullOutput(); $output->write('foo'); $this->assertTrue(true, '->write() does nothing'); // FIXME }
public function testConstructor() { $output = new NullOutput(); ob_start(); $output->write('foo'); $buffer = ob_get_clean(); $this->assertSame('', $buffer, '->write() does nothing (at least nothing is printed)'); $this->assertFalse($output->isDecorated(), '->isDecorated() returns false'); }
/** * Returns a instance of composer * * @param InputInterface $input * @param OutputInterface $output * @param unknown_type $pathToComposer */ public static function getComposer(InputInterface $input = null, OutputInterface $output = null, $pathToComposer = null, $required = true, $localConfig = null) { if ($input == null) { $input = new ArrayInput(array()); } if ($output == null) { $output = new NullOutput(); } if (null === self::$composer) { self::checkComposer($pathToComposer); $output->write("Initializing composer ... "); try { self::$composer = self::createComposer($input, $output, $localConfig); } catch (\InvalidArgumentException $e) { if ($required) { throw $e; } } $output->writeln("<info>done</info>."); } return self::$composer; }