This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/web/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php
2017-02-13 15:31:17 +00:00

37 lines
889 B
PHP

<?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');
}
/**
* @param \Prophecy\Prophecy\ObjectProphecy $object
* @param \Prophecy\Prophecy\MethodProphecy $method
* @param \Prophecy\Call\Call $call
*/
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);
}
}