Skip to content

Commit

Permalink
Add assertOutputNotContains()
Browse files Browse the repository at this point in the history
It is helpful to be able to ensure output did not get created sometimes.
  • Loading branch information
markstory committed Oct 24, 2017
1 parent 22895fc commit ae5b535
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 @@ -162,6 +162,18 @@ public function assertOutputContains($expected, $message = '')
$output = implode(PHP_EOL, $this->_out->messages());
$this->assertContains($expected, $output, $message);
}
/**
* Asserts `stdout` does not contain expected output
*
* @param string $expected Expected output
* @param string $message Failure message
* @return void
*/
public function assertOutputNotContains($expected, $message = '')
{
$output = implode(PHP_EOL, $this->_out->messages());
$this->assertNotContains($expected, $output, $message);
}

/**
* Asserts `stdout` contains expected regexp
Expand Down

0 comments on commit ae5b535

Please sign in to comment.