public function setVerbosity($verbosity) { Assert::oneOf($verbosity, array(IO::NORMAL, IO::VERBOSE, IO::VERY_VERBOSE, IO::DEBUG), 'The verbosity must be one of IO::NORMAL, IO::VERBOSE, IO::VERY_VERBOSE and IO::DEBUG.'); $this->verbosity = (int) $verbosity; }
public function testWriteLineRawWhenDebug() { $this->output->setVerbosity(IO::DEBUG); $this->output->writeLineRaw('Lorem ipsum'); $this->output->writeLineRaw('dolor sit amet', IO::VERBOSE); $this->output->writeLineRaw('consetetur', IO::VERY_VERBOSE); $this->output->writeLineRaw('sadipscing elitr', IO::DEBUG); $this->assertSame('Lorem ipsum' . PHP_EOL . 'dolor sit amet' . PHP_EOL . 'consetetur' . PHP_EOL . 'sadipscing elitr' . PHP_EOL, $this->stream->fetch()); }