diff --git a/tests/AnalyzerTest.php b/tests/AnalyzerTest.php index 299aba9..a1c2e41 100644 --- a/tests/AnalyzerTest.php +++ b/tests/AnalyzerTest.php @@ -264,4 +264,21 @@ public function issue126Provider() array(7, 3), ); } + + /** + * @ticket 139 + */ + public function testIssue139IsFixed() + { + error_reporting(E_ALL); + + $result = $this->analyser->countFiles( + array( + __DIR__ . '/_files/issue_139.php' + ), + false + ); + + $this->assertEquals(1, $result['anonymousFunctions']); + } } diff --git a/tests/_files/issue_139.php b/tests/_files/issue_139.php new file mode 100644 index 0000000..cb098ed --- /dev/null +++ b/tests/_files/issue_139.php @@ -0,0 +1,17 @@ +