示例#1
0
 public function __toString() : string
 {
     return $this->reflection->name();
 }
示例#2
0
 function let(ClassReflection $reflection)
 {
     $reflection->name()->willReturn('MyClass');
     $this->beConstructedWith($reflection);
 }
示例#3
0
 function its_class_must_be_traversable(ClassReflection $reflection)
 {
     $reflection->name()->willReturn('stdClass');
     $reflection->implementsInterface(Traversable::class)->willReturn(false);
     $this->shouldThrow(new InvalidArgumentException('Class stdClass is not traversable'))->duringInstantiation();
 }