Skip to content

Commit

Permalink
migrate regression test on issue GH-119 and clean-up dupplicate case …
Browse files Browse the repository at this point in the history
…with GH-129
  • Loading branch information
llaville committed Jan 6, 2015
1 parent 0eaf0b8 commit 09a6618
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions tests/ClassIssueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
*/
class ClassIssueTest extends \PHPUnit_Framework_TestCase
{
const GH119 = 'gh119.php';
const GH129 = 'gh129.php';
const GH131 = 'gh131.php';

Expand All @@ -57,20 +58,19 @@ public static function setUpBeforeClass()
}

/**
* Regression test for bug GH#129
* Regression test for bug GH#119
*
* @link https://github.com/llaville/php-compat-info/issues/129
* "Non-empty classes are reported to require PHP 5.0.0"
* @link https://github.com/llaville/php-compat-info/issues/119
* "private" keyword reports as "Required PHP 4.0.0 (min)"
* @group regression
* @return void
*/
public function testBugGH129()
public function testBugGH119()
{
$dataSource = self::$fixtures . self::GH129;
$dataSource = self::$fixtures . self::GH119;
$analysers = array('compatibility');
$metrics = self::$api->run($dataSource, $analysers);
$classes = $metrics['CompatibilityAnalyser']['classes'];
$methods = $metrics['CompatibilityAnalyser']['methods'];

$this->assertEquals(
array(
Expand All @@ -83,6 +83,23 @@ public function testBugGH129()
),
$classes['Foo']
);
}

/**
* Regression test for bug GH#129
*
* @link https://github.com/llaville/php-compat-info/issues/129
* "Non-empty classes are reported to require PHP 5.0.0"
* @group regression
* @return void
* @see testBugGH119()
*/
public function testBugGH129()
{
$dataSource = self::$fixtures . self::GH129;
$analysers = array('compatibility');
$metrics = self::$api->run($dataSource, $analysers);
$methods = $metrics['CompatibilityAnalyser']['methods'];

// implicitly public visibility
$this->assertEquals(
Expand Down

0 comments on commit 09a6618

Please sign in to comment.