Browse files

Merge branch '1.2'

  • Loading branch information...
2 parents 3b66957 + 8e09ff9 commit 9531aa4f6d2840223e739f4a090681e90c5767b5 @sebastianbergmann committed Sep 24, 2012
Showing with 9 additions and 6 deletions.
  1. +1 −1 PHP/CodeCoverage.php
  2. +8 −5 Tests/PHP/CodeCoverageTest.php
View
2 PHP/CodeCoverage.php
@@ -632,7 +632,7 @@ protected function getLinesToBeCovered($className, $methodName)
}
$match = preg_match_all(
- '(@covers\s+(?P<coveredElement>.*?)\s*$)m',
+ '(@covers\s+(?P<coveredElement>.*?)\s*(\(\s*\))?\s*$)m',
$docComment,
$matches
);
View
13 Tests/PHP/CodeCoverageTest.php
@@ -81,7 +81,7 @@ protected function setUp()
$this->getLinesToBeCovered = new ReflectionMethod(
'PHP_CodeCoverage', 'getLinesToBeCovered'
);
-
+
$this->getLinesToBeCovered->setAccessible(TRUE);
}
@@ -234,10 +234,13 @@ public function testClear()
}
/**
- * @covers PHP_CodeCoverage::start
- * @covers PHP_CodeCoverage::stop
- * @covers PHP_CodeCoverage::append
- * @covers PHP_CodeCoverage::applyListsFilter
+ * Add parenthesis to the covers annotation below in a couple of different ways to make sure it
+ * works as expected
+ *
+ * @covers PHP_CodeCoverage::start()
+ * @covers PHP_CodeCoverage::stop( )
+ * @covers PHP_CodeCoverage::append ()
+ * @covers PHP_CodeCoverage::applyListsFilter ( )
* @covers PHP_CodeCoverage::initializeFilesThatAreSeenTheFirstTime
* @covers PHP_CodeCoverage::applyCoversAnnotationFilter
* @covers PHP_CodeCoverage::getTests

0 comments on commit 9531aa4

Please sign in to comment.