From 8839cb7c937ac6a252412b65c650865220bfd48e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 23 Jan 2017 06:32:48 +0100 Subject: php-phpunit-PHP-CodeCoverage: PR merged --- php-phpunit-PHP-CodeCoverage-dev.spec | 5 +- php-phpunit-PHP-CodeCoverage-upstream.patch | 367 ++++++++++++++++++++++++++++ 2 files changed, 369 insertions(+), 3 deletions(-) create mode 100644 php-phpunit-PHP-CodeCoverage-upstream.patch diff --git a/php-phpunit-PHP-CodeCoverage-dev.spec b/php-phpunit-PHP-CodeCoverage-dev.spec index 1e4ea45..6770582 100644 --- a/php-phpunit-PHP-CodeCoverage-dev.spec +++ b/php-phpunit-PHP-CodeCoverage-dev.spec @@ -36,7 +36,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz Patch0: %{name}-upstream.patch -Patch1: %{name}-pr503.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -102,7 +101,6 @@ for PHP code coverage information. %prep %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -%patch1 -p1 %build @@ -190,9 +188,10 @@ fi %changelog * Sun Jan 22 2017 Remi Collet - 4.0.5-2 +- Update to 4.0.5 - add upstream patch for test suite to fix https://github.com/sebastianbergmann/php-code-coverage/issues/495 -- open https://github.com/sebastianbergmann/php-code-coverage/pull/503 +- open https://github.com/sebastianbergmann/php-code-coverage/pull/504 * Fri Jan 20 2017 Remi Collet - 4.0.5-1 - Update to 4.0.5 diff --git a/php-phpunit-PHP-CodeCoverage-upstream.patch b/php-phpunit-PHP-CodeCoverage-upstream.patch new file mode 100644 index 0000000..e35dc30 --- /dev/null +++ b/php-phpunit-PHP-CodeCoverage-upstream.patch @@ -0,0 +1,367 @@ +From 9b8320af4f14eb187a4bde8d2652bc4a7a034a02 Mon Sep 17 00:00:00 2001 +From: Sebastian Bergmann +Date: Sun, 22 Jan 2017 09:35:22 +0100 +Subject: [PATCH] Closes #495 + +--- + .../dashboard.html | 2 +- + .../CoverageForFileWithIgnoredLines/index.html | 44 +++------ + .../source_with_ignore.php.html | 109 ++++++--------------- + .../XML/CoverageForFileWithIgnoredLines/index.xml | 4 +- + .../source_with_ignore.php.xml | 2 +- + tests/_files/ignored-lines-clover.xml | 4 +- + tests/_files/ignored-lines-text.txt | 12 +-- + 7 files changed, 56 insertions(+), 121 deletions(-) + +diff --git a/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html b/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html +index a0b1d94..2db00c7 100644 +--- a/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html ++++ b/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html +@@ -251,7 +251,7 @@ + chart.yAxis.axisLabel('Method Complexity'); + + d3.select('#methodComplexity svg') +- .datum(getComplexityData([[66.666666666667,1,"CoveredClassWithAnonymousFunctionInStaticMethod::runAnonymous<\/a>"],[100,1,"CoveredClassWithAnonymousFunctionInStaticMethod::anonymous function<\/a>"]], 'Method Complexity')) ++ .datum(getComplexityData([[66.666666666666657,1,"CoveredClassWithAnonymousFunctionInStaticMethod::runAnonymous<\/a>"],[100,1,"CoveredClassWithAnonymousFunctionInStaticMethod::anonymous function<\/a>"]], 'Method Complexity')) + .transition() + .duration(500) + .call(chart); +diff --git a/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/index.html b/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/index.html +index 247ee0c..a9be55d 100644 +--- a/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/index.html ++++ b/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/index.html +@@ -50,22 +50,12 @@ + +
50.00%
+
1 / 2
+-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
0 / 0
+-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
2 / 2
++ ++
n/a
++
0 / 0
++ ++
n/a
++
0 / 0
+ + + +@@ -78,22 +68,12 @@ + +
50.00%
+
1 / 2
+-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
0 / 0
+-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
2 / 2
++ ++
n/a
++
0 / 0
++ ++
n/a
++
0 / 0
+ + + +diff --git a/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html b/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html +index be814c1..dafd7fa 100644 +--- a/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html ++++ b/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html +@@ -2,7 +2,7 @@ + + + +- Code Coverage for %s/source_with_ignore.php ++ Code Coverage for %s + + + +@@ -41,24 +41,14 @@ + + + +- Total +-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
2 / 2
+-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
0 / 0
+- CRAP ++ Total ++ ++
n/a
++
0 / 0
++ ++
n/a
++
0 / 0
++ CRAP +
+
+ 50.00% covered (danger) +@@ -80,26 +70,16 @@ +
100.00%
+
1 / 1
+ 0 +-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
0 / 0
++ ++
n/a
++
0 / 0
+ + + +- Foo +-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
1 / 1
++ Foo ++ ++
n/a
++
0 / 0
+
+
+ 100.00% covered (success) +@@ -109,14 +89,9 @@ +
100.00%
+
1 / 1
+ 1 +-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
0 / 0
++ ++
n/a
++
0 / 0
+ + + +@@ -130,26 +105,16 @@ +
100.00%
+
1 / 1
+ 1 +-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
0 / 0
++ ++
n/a
++
0 / 0
+ + + +- Bar +-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
1 / 1
++ Bar ++ ++
n/a
++
0 / 0
+
+
+ 100.00% covered (success) +@@ -159,14 +124,9 @@ +
100.00%
+
1 / 1
+ 1 +-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
0 / 0
++ ++
n/a
++
0 / 0
+ + + +@@ -180,14 +140,9 @@ +
100.00%
+
1 / 1
+ 1 +-
+-
+- 100.00% covered (success) +-
+-
+- +-
100.00%
+-
0 / 0
++ ++
n/a
++
0 / 0
+ + + +diff --git a/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/index.xml b/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/index.xml +index 35c0745..436081a 100644 +--- a/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/index.xml ++++ b/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/index.xml +@@ -9,7 +9,7 @@ + + + +- ++ + + + +@@ -17,7 +17,7 @@ + + + +- ++ + + + +diff --git a/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/source_with_ignore.php.xml b/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/source_with_ignore.php.xml +index 509990f..f5eec7d 100644 +--- a/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/source_with_ignore.php.xml ++++ b/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/source_with_ignore.php.xml +@@ -5,7 +5,7 @@ + + + +- ++ + + + +diff --git a/tests/_files/ignored-lines-clover.xml b/tests/_files/ignored-lines-clover.xml +index 81a9aaa..a35cc4b 100644 +--- a/tests/_files/ignored-lines-clover.xml ++++ b/tests/_files/ignored-lines-clover.xml +@@ -10,8 +10,8 @@ + + + +- ++ + +- ++ + + +diff --git a/tests/_files/ignored-lines-text.txt b/tests/_files/ignored-lines-text.txt +index 4283038..6e8e149 100644 +--- a/tests/_files/ignored-lines-text.txt ++++ b/tests/_files/ignored-lines-text.txt +@@ -1,10 +1,10 @@ + + +-Code Coverage Report: ++Code Coverage Report:%w + %s +- +- Summary: +- Classes: 100.00% (2/2) +- Methods: (0/0) +- Lines: 50.00% (1/2) ++%w ++ Summary:%w ++ Classes: (0/0) ++ Methods: (0/0) ++ Lines: 50.00% (1/2) + +From f12ad0185b5f06ef9871af867f14d936278e1ce0 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Sun, 22 Jan 2017 10:07:33 +0100 +Subject: [PATCH] force serialize_precision to ensure test pass with 5.6, 7.0 + and 7.1 + +--- + phpunit.xml | 4 ++++ + .../Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/phpunit.xml b/phpunit.xml +index c8f28de..55822f0 100644 +--- a/phpunit.xml ++++ b/phpunit.xml +@@ -13,5 +13,9 @@ + src + + ++ ++ ++ ++ + + +diff --git a/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html b/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html +index 2db00c7..a0b1d94 100644 +--- a/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html ++++ b/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html +@@ -251,7 +251,7 @@ + chart.yAxis.axisLabel('Method Complexity'); + + d3.select('#methodComplexity svg') +- .datum(getComplexityData([[66.666666666666657,1,"
CoveredClassWithAnonymousFunctionInStaticMethod::runAnonymous<\/a>"],[100,1,"CoveredClassWithAnonymousFunctionInStaticMethod::anonymous function<\/a>"]], 'Method Complexity')) ++ .datum(getComplexityData([[66.666666666667,1,"CoveredClassWithAnonymousFunctionInStaticMethod::runAnonymous<\/a>"],[100,1,"CoveredClassWithAnonymousFunctionInStaticMethod::anonymous function<\/a>"]], 'Method Complexity')) + .transition() + .duration(500) + .call(chart); -- cgit