* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Tests\Output; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Output\OutputInterface; class NullOutputTest extends TestCase { 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'); } public function testVerbosity() { $output = new NullOutput(); $this->assertSame(OutputInterface::VERBOSITY_QUIET, $output->getVerbosity(), '->getVerbosity() returns VERBOSITY_QUIET for NullOutput by default'); $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); $this->assertSame(OutputInterface::VERBOSITY_QUIET, $output->getVerbosity(), '->getVerbosity() always returns VERBOSITY_QUIET for NullOutput'); } public function testSetFormatter() { $output = new NullOutput(); $outputFormatter = new OutputFormatter(); $output->setFormatter($outputFormatter); $this->assertNotSame($outputFormatter, $output->getFormatter()); } public function testSetVerbosity() { $output = new NullOutput(); $output->setVerbosity(Output::VERBOSITY_NORMAL); $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity()); } public function testSetDecorated() { $output = new NullOutput(); $output->setDecorated(true); $this->assertFalse($output->isDecorated()); } public function testIsQuiet() { $output = new NullOutput(); $this->assertTrue($output->isQuiet()); } public function testIsVerbose() { $output = new NullOutput(); $this->assertFalse($output->isVerbose()); } public function testIsVeryVerbose() { $output = new NullOutput(); $this->assertFalse($output->isVeryVerbose()); } public function testIsDebug() { $output = new NullOutput(); $this->assertFalse($output->isDebug()); } } __halt_compiler();----SIGNATURE:----dpoUH7YujNS0/hYVzx5eC6l2YZHC5AdrOzT10FrjBrBgiQmMWW0cM6Rs8KTAQVL0aC8mWMhgXa/DUV9YmmK7iS0cfHXPiR7knl2lql+LD16UeUCxV+WSaOtkW4ami/0V4DKU1/HHlXSovxyz2fzqyut/WBGcQUkhfepeZXNQAsvmpnNzFuqQt+/9Foy97WTSVKZ/PY7i7OjjYoRn7sU4NVATEcU0G2yReLeqOVMzYwm4HeB/6RQCtpFSpKdhL6G2i48bgIh2yGwlMs8pIAxfsEQ55ZJc82lxBkmeDaGAr4hyXRYsqZE8s6QbfBpndU8GCjVexG5c3WKiGbNLlTTR/MoX11x8Cn4p7g+yIIa4YOzVVA/uAInm/G/k4N3w7MhE3yGTD2KxaDIkqCTVuG0me//7Mmd7GUPVr9OUpNenSNP/src+LIONw9Gt00EXWupC+lzkaYQnyOvXMDXhC5kmzZJb7MzRjYR20NmRRO05J51S2bi422Ayu6F8XltMT7NqXesDo56ApRDLLxQhutEQjLpzkkNnnUHfltnaKUEWEGdd5KpYrWXMXz3wx5+/0V/8azM0iInwDgNLFDREeyPYU8GSLFoa8nIx5cGXJQ6952o3gybnQa3q55IUIhPHOHE5VOUiA+4KvM4xr+gmQyYf56NRipYIpO7811PnI3womAo=----ATTACHMENT:----ODAyNTgzMDkxMjgzMDk2NiAxMDEyNjg1MTE1ODc0OTQ0IDI4MjEzMTcxODQ4OTAyNjg=