PHPUnit has $this->setExpectedException('PHPUnit_Framework_Error_Warning');. Leo should provide some way of doing this too. Something like this:
expect(function () {
trigger_error('Oh no!', E_USER_WARNING);
})->to->triggererror(E_USER_WARNING, 'Oh no!');