Created
January 24, 2017 01:49
-
-
Save trq/ae2c4775cf7ecc35346f8f1ee9e4de13 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
/** | |
* @test | |
* | |
* @expectedException \RuntimeException | |
*/ | |
function throws_exception() | |
{ | |
$sut = new SomeSut(); | |
try { | |
$sut->someFailingCall(); | |
} catch (\RuntimeException $e) { | |
// Assertions here | |
throw $e; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment