Exemplo n.º 1
0
 public function __toString() : string
 {
     return $this->reflection->name();
 }
Exemplo n.º 2
0
 function let(ClassReflection $reflection)
 {
     $reflection->name()->willReturn('MyClass');
     $this->beConstructedWith($reflection);
 }
Exemplo n.º 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();
 }