Skip to content

Commit

Permalink
Add assertErrorEmpty()
Browse files Browse the repository at this point in the history
This is handy for making sure a shell doesn't output any error messages.
  • Loading branch information
markstory committed Aug 25, 2017
1 parent e5808ba commit 11b109a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/TestSuite/ConsoleIntegrationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,18 @@ public function assertErrorRegExp($pattern, $message = '')
$this->assertRegExp($pattern, $output, $message);
}

/**
* Asserts that `stderr` is empty
*
* @param string $message The message to output when the assertion fails.
* @return void
*/
public function assertErrorEmpty($message = 'stderr was not empty')
{
$output = implode(PHP_EOL, $this->_err->messages());
$this->assertSame('', $output, $message);
}

/**
* Builds the appropriate command dispatcher
*
Expand Down

0 comments on commit 11b109a

Please sign in to comment.