isVeryVerbose() public method

public isVeryVerbose ( )
示例#1
0
 public function testIsVeryVerbose()
 {
     $inputMock = $this->getMockBuilder('Symfony\\Component\\Console\\Input\\InputInterface')->getMock();
     $outputMock = $this->getMockBuilder('Symfony\\Component\\Console\\Output\\Output')->setMethods(['getVerbosity', 'doWrite'])->getMock();
     $outputMock->expects($this->at(0))->method('getVerbosity')->will($this->returnValue(3));
     $outputMock->expects($this->at(1))->method('getVerbosity')->will($this->returnValue(2));
     $helperMock = $this->getMockBuilder('Symfony\\Component\\Console\\Helper\\HelperSet')->getMock();
     $consoleIO = new ConsoleIO($inputMock, $outputMock, $helperMock);
     $this->assertTrue($consoleIO->isVeryVerbose());
     $this->assertFalse($consoleIO->isVeryVerbose());
 }
示例#2
0
 public function testIsVeryVerbose()
 {
     $isVeryVerbose = true;
     $this->command->setCode(function (InputInterface $input, OutputInterface $output) use(&$isVeryVerbose) {
         $io = new ConsoleIO($input, $output);
         $this->assertEquals($isVeryVerbose, $io->isVeryVerbose());
     });
     $this->tester->execute([], ['verbosity' => 3]);
     $isVeryVerbose = false;
     $this->tester->execute([], ['verbosity' => 2]);
 }