示例#1
0
 function its_string_representation_puts_also_brackets_around_composed_decorated_types(ComposedType $type)
 {
     $type->__toString()->willReturn('string|int');
     $this->beConstructedWith($type);
     $this->__toString()->shouldBe('(string|int)[]');
 }
示例#2
0
 function its_string_representation_surrounds_the_decorated_type_with_brackets_if_its_a_composed_type(ComposedType $type)
 {
     $type->__toString()->willReturn('string|int');
     $this->beConstructedWith($type);
     $this->__toString()->shouldBe('?(string|int)');
 }