* * 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:----vUbAFD4C/y4m1RCS+vhyObrRtEJssh7TVAGjyb8aaglcoWKMIWQfM3CFrYpm4MHVuqsD3XwGKiQqcd15FWcsfrvGw7XSV3y4vBIYSgADMxgTFCgrGZJ6YWtiHiMteJV/3wwpokNdUJ6+V+XpgNelz9tRy2bXLnLQ+0biAoZ/rVm5t6ruopmAsdcsiJSdl5TB+5uxRks/M78pu79TQajrx02vybGMi/xQCk1aXnhi0bnjVBmDSX/a9fpqils2c9CmWeVvFXwPqfSX4pIgdjZmG0C3F94SlCOftKoI4tGaXUsyUIUbzvVO/VDulx2QXV6Wkpw0QvzShYz2oLjiGRu15XsLalXpDmmHlvBxzY8bwrAEQFduFhxJag5HRTbeSmMXdoVlat1wvcM/fVboWFLTrkVGqlfJexNq4SZcf759tBwPUDfgfiHoUCt3vtfDND1FyapV/56KAVvCQA4y3AwyyTFSKr3dXqX0uf8q9cLv2YH6NzyWE/SfFpN6TvN+bWcZRuM6h5h+QEcRnobDpRhGRo80WSGSMhHcW/TnUzYu11wW6wYt7BqmWTxh5hFULc9GzsqxZLKoOTSyEKxb7sYrVT6YlK8kcYLY6lI1iALyb0tASZt8k2fdSzu9Oax/+ZTS1bpKNrNG/2aNm08dw4pd7qbHYzusKboxPj/qYNAO3Is=----ATTACHMENT:----NjQwMDM5MDI5MzEwOTAxNyAyMjE2OTMyMDgxOTUyNzEyIDY3NDc0Mjg2MTkyNzQ2NTA=