Вход Регистрация
Файл: 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 $objectMethodProphecy $methodCall $call)
    {
        
$returnFirstCallCallback = function ($calls$object$method) {
            throw new 
RuntimeException;
        };

        
$this->beConstructedWith($returnFirstCallCallback);

        
$this->shouldThrow('RuntimeException')->duringCheck(array($call), $object$method);
    }
}
Онлайн: 0
Реклама