public static function createFromName($className) { throw new \LogicException('Cannot create a ReflectionObject from name - use ReflectionObject::createFromInstance'); }
public function testCreateFromNameThrowsException() { $this->expectException(\LogicException::class); ReflectionObject::createFromName('foo'); }