public function testConstructor()
 {
     try {
         $output = new StreamOutput('foo');
         $this->fail('__construct() throws an \\InvalidArgumentException if the first argument is not a stream');
     } catch (\Exception $e) {
         $this->assertInstanceOf('\\InvalidArgumentException', $e, '__construct() throws an \\InvalidArgumentException if the first argument is not a stream');
         $this->assertEquals('The StreamOutput class needs a stream as its first argument.', $e->getMessage());
     }
     $output = new StreamOutput($this->stream, Output::VERBOSITY_QUIET, true);
     $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument');
     $this->assertTrue($output->isDecorated(), '__construct() takes the decorated flag as its second argument');
 }
 public function testConstructor()
 {
     $output = new StreamOutput($this->stream, Output::VERBOSITY_QUIET, true);
     $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument');
     $this->assertTrue($output->isDecorated(), '__construct() takes the decorated flag as its second argument');
 }