BetterReflectionTest\TypesFinder\FindPropertyTypeTest::testFindPropertyTypeReturnsEmptyArrayWhenNoCommentsNodesFound PHP Method

testFindPropertyTypeReturnsEmptyArrayWhenNoCommentsNodesFound() public method

    public function testFindPropertyTypeReturnsEmptyArrayWhenNoCommentsNodesFound()
    {
        $class = $this->createMock(ReflectionClass::class);
        $class->expects($this->any())->method('getNamespaceName')->will($this->returnValue(''));
        $class->expects($this->any())->method('getLocatedSource')->will($this->returnValue(new LocatedSource('<?php', null)));
        $property = $this->createMock(ReflectionProperty::class);
        $property->expects($this->any())->method('getDeclaringClass')->will($this->returnValue($class));
        $property->expects($this->any())->method('getDocComment')->will($this->returnValue('Nothing here...'));
        /* @var ReflectionProperty $property */
        $foundTypes = (new FindPropertyType())->__invoke($property);
        $this->assertSame([], $foundTypes);
    }