public static function createFromNode(Reflector $reflector, ClassLikeNode $node, LocatedSource $locatedSource, NamespaceNode $namespace = null) { throw new \LogicException('Cannot create a ReflectionObject from node - use ReflectionObject::createFromInstance'); }
public function testCreateFromNodeThrowsException() { /** @var Reflector|\PHPUnit_Framework_MockObject_MockObject $mReflector */ $mReflector = $this->createMock(Reflector::class); /** @var ClassLike|\PHPUnit_Framework_MockObject_MockObject $mClassNode */ $mClassNode = $this->createMock(ClassLike::class); /** @var LocatedSource|\PHPUnit_Framework_MockObject_MockObject $mLocatedSource */ $mLocatedSource = $this->createMock(LocatedSource::class); $this->expectException(\LogicException::class); ReflectionObject::createFromNode($mReflector, $mClassNode, $mLocatedSource); }