Skip to content

Commit 1962718

Browse files
authored
Merge pull request #4 from open-source-contributions/test_improvement
Add scan on empty code test
2 parents 151ad71 + de8ae0b commit 1962718

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/PhpFunctionsScannerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77

88
class PhpFunctionsScannerTest extends TestCase
99
{
10+
public function testScanOnEmptyCode()
11+
{
12+
$scanner = new PhpFunctionsScanner();
13+
$file = __DIR__.'/assets/functions.php';
14+
$functions = $scanner->scan('', $file);
15+
16+
$this->assertSame([], $functions);
17+
}
18+
1019
public function testPhpFunctionsExtractor()
1120
{
1221
$scanner = new PhpFunctionsScanner();

0 commit comments

Comments
 (0)