Файл: gapps/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php
Строк: 34
<?php
namespace specProphecyPromise;
use PhpSpecObjectBehavior;
use ProphecyProphecyMethodProphecy;
use ProphecyProphecyObjectProphecy;
class ReturnArgumentPromiseSpec extends ObjectBehavior
{
function it_is_promise()
{
$this->shouldBeAnInstanceOf('ProphecyPromisePromiseInterface');
}
function it_should_return_first_argument_if_provided(ObjectProphecy $object, MethodProphecy $method)
{
$this->execute(array('one', 'two'), $object, $method)->shouldReturn('one');
}
function it_should_return_null_if_no_arguments_provided(ObjectProphecy $object, MethodProphecy $method)
{
$this->execute(array(), $object, $method)->shouldReturn(null);
}
function it_should_return_nth_argument_if_provided(ObjectProphecy $object, MethodProphecy $method)
{
$this->beConstructedWith(1);
$this->execute(array('one', 'two'), $object, $method)->shouldReturn('two');
}
}