| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName |
||
| 26 | protected function getCommand( $name ) { |
||
| 27 | // `$command->configure()` is called by `->__construct()`, which may |
||
| 28 | // call Config, so we need Config to have an output set. Set one that |
||
| 29 | // asserts that nothing is output, we don't need to test Config failure |
||
| 30 | // cases here. |
||
| 31 | $output = $this->getMockBuilder( BufferedOutput::class ) |
||
| 32 | ->setMethods( array( 'doWrite' ) ) |
||
| 33 | ->getMock(); |
||
| 34 | $output->expects( $this->never() )->method( 'doWrite' ); |
||
| 35 | Config::setOutput( $output ); |
||
| 36 | |||
| 37 | $app = new Application(); |
||
| 38 | return $app->find( $name ); |
||
| 39 | } |
||
| 40 | |||
| 52 |