Skip to content

Instantly share code, notes, and snippets.

@gjohnson
Created September 6, 2011 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gjohnson/1196636 to your computer and use it in GitHub Desktop.
Save gjohnson/1196636 to your computer and use it in GitHub Desktop.
idea for a php 5.4 micro testing framework
<?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