You are here

public function OutputTest::testSetGetVerbosity in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Output/OutputTest.php \Symfony\Component\Console\Tests\Output\OutputTest::testSetGetVerbosity()

File

vendor/symfony/console/Tests/Output/OutputTest.php, line 33

Class

OutputTest

Namespace

Symfony\Component\Console\Tests\Output

Code

public function testSetGetVerbosity() {
  $output = new TestOutput();
  $output
    ->setVerbosity(Output::VERBOSITY_QUIET);
  $this
    ->assertEquals(Output::VERBOSITY_QUIET, $output
    ->getVerbosity(), '->setVerbosity() sets the verbosity');
  $this
    ->assertTrue($output
    ->isQuiet());
  $this
    ->assertFalse($output
    ->isVerbose());
  $this
    ->assertFalse($output
    ->isVeryVerbose());
  $this
    ->assertFalse($output
    ->isDebug());
  $output
    ->setVerbosity(Output::VERBOSITY_NORMAL);
  $this
    ->assertFalse($output
    ->isQuiet());
  $this
    ->assertFalse($output
    ->isVerbose());
  $this
    ->assertFalse($output
    ->isVeryVerbose());
  $this
    ->assertFalse($output
    ->isDebug());
  $output
    ->setVerbosity(Output::VERBOSITY_VERBOSE);
  $this
    ->assertFalse($output
    ->isQuiet());
  $this
    ->assertTrue($output
    ->isVerbose());
  $this
    ->assertFalse($output
    ->isVeryVerbose());
  $this
    ->assertFalse($output
    ->isDebug());
  $output
    ->setVerbosity(Output::VERBOSITY_VERY_VERBOSE);
  $this
    ->assertFalse($output
    ->isQuiet());
  $this
    ->assertTrue($output
    ->isVerbose());
  $this
    ->assertTrue($output
    ->isVeryVerbose());
  $this
    ->assertFalse($output
    ->isDebug());
  $output
    ->setVerbosity(Output::VERBOSITY_DEBUG);
  $this
    ->assertFalse($output
    ->isQuiet());
  $this
    ->assertTrue($output
    ->isVerbose());
  $this
    ->assertTrue($output
    ->isVeryVerbose());
  $this
    ->assertTrue($output
    ->isDebug());
}