diff --git a/tests/DefinitionResolverTest.php b/tests/DefinitionResolverTest.php index ea0f481..0046ef0 100644 --- a/tests/DefinitionResolverTest.php +++ b/tests/DefinitionResolverTest.php @@ -35,7 +35,7 @@ class DefinitionResolverTest extends TestCase $this->assertInstanceOf(\phpDocumentor\Reflection\Types\Boolean::class, $type); } - public function testGetDefinedFqn() + public function testGetDefinedFqnForIncompleteDefine() { // define('XXX') (only one argument) must not introduce a new symbol $parser = new Parser; @@ -48,4 +48,17 @@ class DefinitionResolverTest extends TestCase $this->assertNull($fqn); } + + public function testGetDefinedFqnForDefine() + { + $parser = new Parser; + $stmts = $parser->parse("setAttribute('ownerDocument', new MockPhpDocument); + + $index = new Index; + $definitionResolver = new DefinitionResolver($index); + $fqn = $definitionResolver->getDefinedFqn($stmts[0]); + + $this->assertEquals('TEST_DEFINE', $fqn); + } }