Move into nested docroot

This commit is contained in:
Rob Davies 2017-02-13 15:31:17 +00:00
parent 83a0d3a149
commit c8b70abde9
13405 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,57 @@
<?php
namespace spec\Prophecy\Exception\Prediction;
use PhpSpec\ObjectBehavior;
class AggregateExceptionSpec extends ObjectBehavior
{
function let()
{
$this->beConstructedWith(null);
}
function it_is_prediction_exception()
{
$this->shouldBeAnInstanceOf('RuntimeException');
$this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\PredictionException');
}
/**
* @param \Prophecy\Prophecy\ObjectProphecy $object
*/
function it_can_store_objectProphecy_link($object)
{
$this->setObjectProphecy($object);
$this->getObjectProphecy()->shouldReturn($object);
}
function it_should_not_have_exceptions_at_the_beginning()
{
$this->getExceptions()->shouldHaveCount(0);
}
/**
* @param \Prophecy\Exception\Prediction\PredictionException $exception
*/
function it_should_append_exception_through_append_method($exception)
{
$exception->getMessage()->willReturn('Exception #1');
$this->append($exception);
$this->getExceptions()->shouldReturn(array($exception));
}
/**
* @param \Prophecy\Exception\Prediction\PredictionException $exception
*/
function it_should_update_message_during_append($exception)
{
$exception->getMessage()->willReturn('Exception #1');
$this->append($exception);
$this->getMessage()->shouldReturn(" Exception #1");
}
}

View file

@ -0,0 +1,29 @@
<?php
namespace spec\Prophecy\Exception\Prediction;
use PhpSpec\ObjectBehavior;
class NoCallsExceptionSpec extends ObjectBehavior
{
/**
* @param \Prophecy\Prophecy\ObjectProphecy $objectProphecy
* @param \Prophecy\Prophecy\MethodProphecy $methodProphecy
*/
function let($objectProphecy, $methodProphecy)
{
$methodProphecy->getObjectProphecy()->willReturn($objectProphecy);
$this->beConstructedWith('message', $methodProphecy);
}
function it_is_PredictionException()
{
$this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException');
}
function it_extends_MethodProphecyException()
{
$this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException');
}
}

View file

@ -0,0 +1,31 @@
<?php
namespace spec\Prophecy\Exception\Prediction;
use PhpSpec\ObjectBehavior;
class UnexpectedCallsCountExceptionSpec extends ObjectBehavior
{
/**
* @param \Prophecy\Prophecy\ObjectProphecy $objectProphecy
* @param \Prophecy\Prophecy\MethodProphecy $methodProphecy
* @param \Prophecy\Call\Call $call1
* @param \Prophecy\Call\Call $call2
*/
function let($objectProphecy, $methodProphecy, $call1, $call2)
{
$methodProphecy->getObjectProphecy()->willReturn($objectProphecy);
$this->beConstructedWith('message', $methodProphecy, 5, array($call1, $call2));
}
function it_extends_UnexpectedCallsException()
{
$this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\UnexpectedCallsException');
}
function it_should_expose_expectedCount_through_getter()
{
$this->getExpectedCount()->shouldReturn(5);
}
}

View file

@ -0,0 +1,36 @@
<?php
namespace spec\Prophecy\Exception\Prediction;
use PhpSpec\ObjectBehavior;
class UnexpectedCallsExceptionSpec extends ObjectBehavior
{
/**
* @param \Prophecy\Prophecy\ObjectProphecy $objectProphecy
* @param \Prophecy\Prophecy\MethodProphecy $methodProphecy
* @param \Prophecy\Call\Call $call1
* @param \Prophecy\Call\Call $call2
*/
function let($objectProphecy, $methodProphecy, $call1, $call2)
{
$methodProphecy->getObjectProphecy()->willReturn($objectProphecy);
$this->beConstructedWith('message', $methodProphecy, array($call1, $call2));
}
function it_is_PredictionException()
{
$this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException');
}
function it_extends_MethodProphecyException()
{
$this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException');
}
function it_should_expose_calls_list_through_getter($call1, $call2)
{
$this->getCalls()->shouldReturn(array($call1, $call2));
}
}