atoum/atoum — pull request #211 by jubianchi (2013-04-29 21:37:03+00:00)
Title: Hande E_RECOVERABLE_ERROR in test's error handler

@juliens discovered a tiny bug in atoum test's error handler : it does not correctly handle E_RECOVERABLE_ERROR if there is another error after it.

He built an example repository to reproduce the bug : https://github.com/Juliens/atoum_sandbox

To sum-up: given we have something like this:

```php
test(); }
public function foo2(Foo $test) { }
}
```

And the test:

```php
variable($class->foo(''))->isNull();
}
public function testTypeHintSuccess()
{
$class = new testedClass();

$this->variable($class->foo2(''))->isNull();
}
}
```

When we run this test, we get an output which only shows the ```FATAL ERROR``` telling us we are callin a method (```test```) on a non-object because we didn't pass the required parameter in the ```testTypeHintFail``` test method.

Fo the second one, ```testTypeHintSuccess```, the ```E_RECOVERABLE_ERROR``` is shown as expected because it's the only error in the test.

This PR changes the error handler behavior a bit so that it correctly handle ```E_RECOVERABLE_ERROR```: the handler now returns false when it gets called for this type of error, stopping the test execution and letting us see the right error message (the first raised error).