Chris@0: beConstructedWith(null); Chris@0: } Chris@0: Chris@0: function it_is_prediction_exception() Chris@0: { Chris@0: $this->shouldBeAnInstanceOf('RuntimeException'); Chris@0: $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\PredictionException'); Chris@0: } Chris@0: Chris@0: function it_can_store_objectProphecy_link(ObjectProphecy $object) Chris@0: { Chris@0: $this->setObjectProphecy($object); Chris@0: $this->getObjectProphecy()->shouldReturn($object); Chris@0: } Chris@0: Chris@0: function it_should_not_have_exceptions_at_the_beginning() Chris@0: { Chris@0: $this->getExceptions()->shouldHaveCount(0); Chris@0: } Chris@0: Chris@0: function it_should_append_exception_through_append_method(PredictionException $exception) Chris@0: { Chris@0: $exception->getMessage()->willReturn('Exception #1'); Chris@0: Chris@0: $this->append($exception); Chris@0: Chris@0: $this->getExceptions()->shouldReturn(array($exception)); Chris@0: } Chris@0: Chris@0: function it_should_update_message_during_append(PredictionException $exception) Chris@0: { Chris@0: $exception->getMessage()->willReturn('Exception #1'); Chris@0: Chris@0: $this->append($exception); Chris@0: Chris@0: $this->getMessage()->shouldReturn(" Exception #1"); Chris@0: } Chris@0: }