function its_string_representation_includes_the_collection_class_and_the_generic_type(ClassType $collection, Type $generic)
 {
     $collection->__toString()->willReturn('Collection');
     $generic->__toString()->willReturn('string');
     $this->__toString()->shouldBe('Collection|string[]');
 }
Example #2
0
 function it_prepends_the_string_representation_of_its_decorated_type_with_a_question_mark(Type $decorated)
 {
     $decorated->__toString()->willReturn('string');
     $this->__toString()->shouldBe('?string');
 }