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