diff options
Diffstat (limited to 'vendor/symfony/console/Tests/Output')
4 files changed, 72 insertions, 4 deletions
diff --git a/vendor/symfony/console/Tests/Output/ConsoleOutputTest.php b/vendor/symfony/console/Tests/Output/ConsoleOutputTest.php index 1afbbb6e..db39a02b 100644 --- a/vendor/symfony/console/Tests/Output/ConsoleOutputTest.php +++ b/vendor/symfony/console/Tests/Output/ConsoleOutputTest.php @@ -11,10 +11,12 @@ namespace Symfony\Component\Console\Tests\Output; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\Console\Output\Output; -class ConsoleOutputTest extends \PHPUnit_Framework_TestCase +class ConsoleOutputTest extends TestCase { public function testConstructor() { @@ -22,4 +24,19 @@ class ConsoleOutputTest extends \PHPUnit_Framework_TestCase $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument'); $this->assertSame($output->getFormatter(), $output->getErrorOutput()->getFormatter(), '__construct() takes a formatter or null as the third argument'); } + + public function testSetFormatter() + { + $output = new ConsoleOutput(); + $outputFormatter = new OutputFormatter(); + $output->setFormatter($outputFormatter); + $this->assertSame($outputFormatter, $output->getFormatter()); + } + + public function testSetVerbosity() + { + $output = new ConsoleOutput(); + $output->setVerbosity(Output::VERBOSITY_VERBOSE); + $this->assertSame(Output::VERBOSITY_VERBOSE, $output->getVerbosity()); + } } diff --git a/vendor/symfony/console/Tests/Output/NullOutputTest.php b/vendor/symfony/console/Tests/Output/NullOutputTest.php index b20ae4e8..b7ff4be3 100644 --- a/vendor/symfony/console/Tests/Output/NullOutputTest.php +++ b/vendor/symfony/console/Tests/Output/NullOutputTest.php @@ -11,10 +11,13 @@ 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 \PHPUnit_Framework_TestCase +class NullOutputTest extends TestCase { public function testConstructor() { @@ -36,4 +39,50 @@ class NullOutputTest extends \PHPUnit_Framework_TestCase $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()); + } } diff --git a/vendor/symfony/console/Tests/Output/OutputTest.php b/vendor/symfony/console/Tests/Output/OutputTest.php index 45e6ddc7..d8330d0b 100644 --- a/vendor/symfony/console/Tests/Output/OutputTest.php +++ b/vendor/symfony/console/Tests/Output/OutputTest.php @@ -11,10 +11,11 @@ namespace Symfony\Component\Console\Tests\Output; +use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Formatter\OutputFormatterStyle; -class OutputTest extends \PHPUnit_Framework_TestCase +class OutputTest extends TestCase { public function testConstructor() { diff --git a/vendor/symfony/console/Tests/Output/StreamOutputTest.php b/vendor/symfony/console/Tests/Output/StreamOutputTest.php index 2fd4f612..780b5681 100644 --- a/vendor/symfony/console/Tests/Output/StreamOutputTest.php +++ b/vendor/symfony/console/Tests/Output/StreamOutputTest.php @@ -11,10 +11,11 @@ namespace Symfony\Component\Console\Tests\Output; +use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Output\StreamOutput; -class StreamOutputTest extends \PHPUnit_Framework_TestCase +class StreamOutputTest extends TestCase { protected $stream; |