function it_accepts_a_method_during_which_an_error_should_be_triggered(ArrayObject $arr)
{
$arr->ksort()->will(function () {
trigger_error('An error', E_USER_NOTICE);
});
$this->positiveMatch('trigger', $arr, array(E_USER_NOTICE, 'An error'))->during('ksort', array());
}