-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1437: Risky test messages mask failures.
- Loading branch information
1 parent
eb0d227
commit 9cde063
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
GH-1437: Risky test messages mask failures | ||
--FILE-- | ||
<?php | ||
|
||
$_SERVER['argv'][1] = '--no-configuration'; | ||
$_SERVER['argv'][2] = 'Issue1437Test'; | ||
$_SERVER['argv'][3] = dirname(__FILE__).'/1437/Issue1437Test.php'; | ||
|
||
require __DIR__ . '/../../bootstrap.php'; | ||
PHPUnit_TextUI_Command::main(); | ||
?> | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann. | ||
|
||
F | ||
|
||
Time: %s, Memory: %sMb | ||
|
||
There was 1 failure: | ||
|
||
1) Issue1437Test::testFailure | ||
Failed asserting that false is true. | ||
|
||
%sIssue1437Test.php:%i | ||
|
||
FAILURES! | ||
Tests: 1, Assertions: 1, Failures: 1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
class Issue1437Test extends PHPUnit_Framework_TestCase | ||
{ | ||
public function testFailure() | ||
{ | ||
ob_start(); | ||
$this->assertTrue(false); | ||
} | ||
} |