atoum/atoum — pull request #320 by mageekguy (2014-03-26 12:46:01+00:00)
Title: Bug fix, optimization and new features.

Hi folks!

This is a HUGE PR to improve atoum at technical and functional level.
In summary, this PR add:
* Several bug/typo fix,
* Several tiny optimization to improve performance,
* Remove useless code,
* Improve unit tests,
* Improve SOLID,
* Add CC.md which describe coding convention,
* Add a git command which is used in pusher script,
* Add `__call` support on mocked interface and abstract class,
* Add `object::isNotInstanceOf()` method, thanks to @Juliens,
* Add dynamic assertion definition (it's now possible to do something like ` $this->then = function() use ($test) { $test->getTestAdapterStorage()->resetCalls(); return $test; };`),
* Add `$this->newTestedInstance` and `$this->testedInstance` support to improve test readability (`$this->newTestedInstance('foo', 'bar')` create an instance of the tested class, if the tested class constructor has no mandatory argument, you can do `$this->newTestedInstance` instead, and `$this->testedInstance` is the tested class instance, so you can do `$this->object($this->testedInstance->doSomething())->isTestedInstance`),
* Add class constant asserter, so you can do `$this->testedClass->hasConstant('foo')->equalTo('bar'),
* Add `->once`, `->twice` and so on (to avoid BC break, `->once()`, `->twice()` and so on are always supported), and more generally, asserter methods which have no mandatory argument can be used without brace,
* Add `$this->function->foo->doesNothing` and `$this->calling($mock)->foo->doesNothing` (without brace) and `$this->function->foo->doesSomething` and `$this->calling($mock)->foo->doesSomething`,
* Add `$this->resetFunction($this->function->foo)` to reset calls on a mocked function,
* Add aliasing to `assertion\manager`, so it's now possible to define alias on every assertion, for example `$this->from('object')->use('newTestedInstance')->as('newSut')`.

And thanks to @jubianchi for its help, you're awesome, man!