-
-
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.
fixed expectExceptionMessage and expectExceptionCode not working whit…
…hout setExpectedException
- Loading branch information
1 parent
e934314
commit e208250
Showing
2 changed files
with
29 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
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,21 @@ | ||
<?php | ||
|
||
/** | ||
* @author Jean Carlo Machado <contato@jeancarlomachado.com.br> | ||
*/ | ||
class Test extends PHPUnit_Framework_TestCase | ||
{ | ||
public function testOne() | ||
{ | ||
$this->expectExceptionMessage('message'); | ||
|
||
throw new Exception('message'); | ||
} | ||
|
||
public function testTwo() | ||
{ | ||
$this->expectExceptionCode(123); | ||
|
||
throw new Exception('message', 123); | ||
} | ||
} |