From e200b91fd5f124bcbbbcf83e0be43d0fa28603c2 Mon Sep 17 00:00:00 2001 From: Willem Stuursma Date: Thu, 1 Jun 2017 15:16:15 +0200 Subject: [PATCH 1/2] Dont use array_unique but use array_flip with array_keys() when merging covered lines --- src/Util/Test.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Util/Test.php b/src/Util/Test.php index 9df9b301e96..6bf1786ce18 100644 --- a/src/Util/Test.php +++ b/src/Util/Test.php @@ -1044,14 +1044,16 @@ private static function resolveReflectionObjectsToLines(array $reflectors) $result[$filename] = []; } - $result[$filename] = array_unique( - array_merge( - $result[$filename], - range($reflector->getStartLine(), $reflector->getEndLine()) - ) + $result[$filename] = array_merge( + $result[$filename], + range($reflector->getStartLine(), $reflector->getEndLine()) ); } + foreach ($result as $filename => $lineNumbers) { + $result[$filename] = array_keys(array_flip($lineNumbers)); + } + return $result; } From 3395d759df4603b2a93e05f201c09eeb3f899eb9 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Sun, 4 Jun 2017 07:23:38 +0200 Subject: [PATCH 2/2] State the (maybe not so) obvious --- .github/CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6dcb604438a..93086d8aa8c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -51,6 +51,14 @@ The `phpunit` script can be used to invoke the PHPUnit test runner: $ ./phpunit --version ``` +## Running PHPUnit's own test suite + +After following the steps shown above, PHPUnit's own test suite is run like this: + +```bash +$ ./phpunit +``` + ## Reporting issues Please use the most specific issue tracker to search for existing tickets and to open new tickets: