Skip to content

Commit

Permalink
test #139
Browse files Browse the repository at this point in the history
  • Loading branch information
calbrecht authored and sebastianbergmann committed Mar 6, 2016
1 parent 8d6fe26 commit 1c925e6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/AnalyzerTest.php
Expand Up @@ -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']);
}
}
17 changes: 17 additions & 0 deletions tests/_files/issue_139.php
@@ -0,0 +1,17 @@
<?php

class SomeClass
{
public function someFunction($in)
{
function () use ($in) {
return '';
};
}

public function someOtherFunction()
{
//trigger Undefined index: ccn
return false || true;
}
}

0 comments on commit 1c925e6

Please sign in to comment.