atoum/atoum — pull request #281 by mageekguy (2013-10-11 19:56:34+00:00)
Title: Close #268 and #269.

This PR add several things.
First, it's a huge refactoring about adapter and mock asserter to simplify the code and improve its architecture.
Now, `mock` asserter extends `adapter` asserter and there no duplicated code between them.
Moreover, it's possible to write the following assertion, according to #268:
```php
$this->if($adapter->fwrite = function($resource, $data) { return strlen($data); })
->and($obj = $file->write($string = uniqid()))
->and($file->setFilename('anotherNameAgain'))
->then
->string($file->getFilename())->isEqualTo('anotherNameAgain')
->adapter($adapter)
->call('fclose')->withArguments($resource)
->after($this->adapter($adapter)->call('flock')->withArguments($resource, LOCK_UN))
->once()
```
It's possible to write the same assertion with `before()` to check if an adapter or a mock method is used before an another.
And finaly, this PR improve the phpFunction asserter, according to #269.
It extends from abstract asserter `call`, which is the base of `adapter`and `mock` asserter, so it's possible to using it with `before()` and `after()`.