Файл: gapps/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php
Строк: 29
<?php
namespace specProphecyPrediction;
use PhpSpecObjectBehavior;
use ProphecyCallCall;
use ProphecyProphecyMethodProphecy;
use ProphecyProphecyObjectProphecy;
use RuntimeException;
class CallbackPredictionSpec extends ObjectBehavior
{
function let()
{
$this->beConstructedWith('get_class');
}
function it_is_prediction()
{
$this->shouldHaveType('ProphecyPredictionPredictionInterface');
}
function it_proxies_call_to_callback(ObjectProphecy $object, MethodProphecy $method, Call $call)
{
$returnFirstCallCallback = function ($calls, $object, $method) {
throw new RuntimeException;
};
$this->beConstructedWith($returnFirstCallCallback);
$this->shouldThrow('RuntimeException')->duringCheck(array($call), $object, $method);
}
}