Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae47d61
commit ae3fcc0
Showing
2 changed files
with
37 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--TEST-- | ||
GH-2731: Empty exception message cannot be expected | ||
--FILE-- | ||
<?php | ||
$_SERVER['argv'][1] = '--no-configuration'; | ||
$_SERVER['argv'][2] = 'Issue2731Test'; | ||
$_SERVER['argv'][3] = __DIR__ . '/2731/Issue2731Test.php'; | ||
|
||
require __DIR__ . '/../../bootstrap.php'; | ||
|
||
PHPUnit_TextUI_Command::main(); | ||
?> | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
F 1 / 1 (100%) | ||
|
||
Time: %s, Memory: %s | ||
|
||
There was 1 failure: | ||
|
||
1) Issue2731Test::testOne | ||
Failed asserting that exception message is empty but is 'message'. | ||
|
||
FAILURES! | ||
Tests: 1, Assertions: 2, 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,11 @@ | ||
<?php | ||
class Issue2731Test extends PHPUnit\Framework\TestCase | ||
{ | ||
public function testOne() | ||
{ | ||
$this->expectException(Exception::class); | ||
$this->expectExceptionMessage(''); | ||
|
||
throw new Exception('message'); | ||
} | ||
} |