BetterReflection\Reflection\ReflectionObject::createFromName PHP Method

createFromName() public static method

Cannot instantiate this way, use ReflectionObject::createFromInstance
public static createFromName ( $className )
    public static function createFromName($className)
    {
        throw new \LogicException('Cannot create a ReflectionObject from name - use ReflectionObject::createFromInstance');
    }

Usage Example

 public function testCreateFromNameThrowsException()
 {
     $this->expectException(\LogicException::class);
     ReflectionObject::createFromName('foo');
 }