Skip to content

Commit

Permalink
标注 @expectedExceptionMessage 区分具体的异常信息
Browse files Browse the repository at this point in the history
  • Loading branch information
ueaner committed Mar 1, 2018
1 parent ee45bb7 commit 07940df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/Di/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ public function testGetServiceById()

/**
* @expectedException \Exception
* @expectedExceptionMessageRegExp /Service '.+' wasn't found in the dependency injection container/
*/
public function testCantGetServiceById()
{
Expand Down Expand Up @@ -274,6 +275,7 @@ public function testClosureInjectionUseThisCallOtherService()

/**
* @expectedException \Exception
* @expectedExceptionMessageRegExp /Service '.+' wasn't found in the dependency injection container/
*/
public function testCannotResolved()
{
Expand Down
2 changes: 2 additions & 0 deletions tests/Di/ServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function testIsShared()

/**
* @expectedException \Exception
* @expectedExceptionMessageRegExp /Service '.+' cannot be resolved/
*/
public function testCannotResolved()
{
Expand All @@ -96,6 +97,7 @@ public function testCannotResolved()

/**
* @expectedException \Exception
* @expectedExceptionMessageRegExp /Service '.+' cannot be resolved/
*/
public function testResolvedCannotCase()
{
Expand Down

0 comments on commit 07940df

Please sign in to comment.