CallbackPredictionSpec.php in Zircon Profile 8.0
File
vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php
View source
<?php
namespace spec\Prophecy\Prediction;
use PhpSpec\ObjectBehavior;
use RuntimeException;
class CallbackPredictionSpec extends ObjectBehavior {
function let() {
$this
->beConstructedWith('get_class');
}
function it_is_prediction() {
$this
->shouldHaveType('Prophecy\\Prediction\\PredictionInterface');
}
function it_proxies_call_to_callback($object, $method, $call) {
$returnFirstCallCallback = function ($calls, $object, $method) {
throw new RuntimeException();
};
$this
->beConstructedWith($returnFirstCallCallback);
$this
->shouldThrow('RuntimeException')
->duringCheck(array(
$call,
), $object, $method);
}
}