Created
September 6, 2011 05:07
-
-
Save gjohnson/1196636 to your computer and use it in GitHub Desktop.
idea for a php 5.4 micro testing framework
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
<?php | |
/** | |
* concept for a new testing framework | |
*/ | |
Testy\Test::describe('Addition') | |
->before(function() { | |
}) | |
->when([ | |
'adding 1 and 1' => [ | |
'it should be 2' => function() { | |
$this->expect(1+1)->toEqual(2); | |
} | |
] | |
]) | |
->when([ | |
'adding anything with 0' => [ | |
'it should be the same' => function() { | |
$this->expect(5+0)->toEqual(5); | |
} | |
] | |
]) | |
->after(function() { | |
}) | |
->run(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment