Skip to content

Commit c5d0506

Browse files
Add test
1 parent 0c1e904 commit c5d0506

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/tests/Target/MapperTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,14 @@ public function testIssue1066(): void
328328
);
329329
}
330330

331+
public function testLineOfCodeInGlobalScopeDoesNotBelongToCodeUnit(): void
332+
{
333+
$file = realpath(__DIR__ . '/../../_files/source_without_ignore.php');
334+
$mapper = $this->mapper([$file]);
335+
336+
$this->assertSame($file . ':2', $mapper->lookup($file, 2));
337+
}
338+
331339
/**
332340
* @param list<non-empty-string> $files
333341
*/

0 commit comments

Comments
 (0)