[php-jsonlint] - fix FTBFS, include path during test - upstream patch for latest PHPUnit - provides php-composer(se

Remi Collet remi at fedoraproject.org
Mon Jun 9 07:01:20 UTC 2014


commit d2413f8b98d2130054aeff36217801ada497b20a
Author: Remi Collet <remi at fedoraproject.org>
Date:   Mon Jun 9 09:01:08 2014 +0200

    - fix FTBFS, include path during test
    - upstream patch for latest PHPUnit
    - provides php-composer(seld/jsonlint)

 jsonlint-phpunit.patch |   40 ++++++++++++++++++++++++++++++++++++++++
 php-jsonlint.spec      |   17 +++++++++++++++--
 2 files changed, 55 insertions(+), 2 deletions(-)
---
diff --git a/jsonlint-phpunit.patch b/jsonlint-phpunit.patch
new file mode 100644
index 0000000..53a7c68
--- /dev/null
+++ b/jsonlint-phpunit.patch
@@ -0,0 +1,40 @@
+From 7e7fb819c82c0d3a484c2aebad839495689ec0a3 Mon Sep 17 00:00:00 2001
+From: Jordi Boggiano <j.boggiano at seld.be>
+Date: Tue, 11 Mar 2014 09:51:02 +0100
+Subject: [PATCH] Use proper test to verify attributes
+
+---
+ tests/JsonParserTest.php | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tests/JsonParserTest.php b/tests/JsonParserTest.php
+index 4289f07..8067622 100644
+--- a/tests/JsonParserTest.php
++++ b/tests/JsonParserTest.php
+@@ -153,9 +153,9 @@ public function testDuplicateKeys()
+         $result = $parser->parse('{"a":"b", "a":"c", "a":"d"}', JsonParser::ALLOW_DUPLICATE_KEYS);
+         $this->assertThat($result,
+             $this->logicalAnd(
+-                $this->arrayHasKey('a'),
+-                $this->arrayHasKey('a.1'),
+-                $this->arrayHasKey('a.2')
++                $this->objectHasAttribute('a'),
++                $this->objectHasAttribute('a.1'),
++                $this->objectHasAttribute('a.2')
+             )
+         );
+     }
+@@ -167,8 +167,8 @@ public function testDuplicateKeysWithEmpty()
+         $result = $parser->parse('{"":"a", "_empty_":"b"}', JsonParser::ALLOW_DUPLICATE_KEYS);
+         $this->assertThat($result,
+             $this->logicalAnd(
+-                $this->arrayHasKey('_empty_'),
+-                $this->arrayHasKey('_empty_.1')
++                $this->objectHasAttribute('_empty_'),
++                $this->objectHasAttribute('_empty_.1')
+             )
+         );
+     }
+-- 
+1.9.3
+
diff --git a/php-jsonlint.spec b/php-jsonlint.spec
index 8af530f..824b75d 100644
--- a/php-jsonlint.spec
+++ b/php-jsonlint.spec
@@ -15,10 +15,13 @@ License:       MIT
 URL:           https://github.com/%{github_owner}/%{github_name}
 Source0:       %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
 
+# Upstream
+Patch0:        %{github_name}-phpunit.patch
+
 BuildArch:     noarch
 # For tests
 BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
+BuildRequires: php-phpunit-PHPUnit
 # For tests: phpcompatinfo
 BuildRequires: php-pcre
 
@@ -26,6 +29,9 @@ Requires:      php(language) >= %{php_min_ver}
 # phpcompatinfo
 Requires:      php-pcre
 
+Provides:      php-composer(seld/jsonlint) = %{version}
+
+
 %description
 %{summary}.
 
@@ -36,6 +42,8 @@ This library is a port of the JavaScript jsonlint
 %prep
 %setup -q -n %{github_name}-%{github_commit}
 
+%patch0 -p1
+
 # Create PSR-0 autoloader for tests
 ( cat <<'AUTOLOAD'
 <?php
@@ -58,7 +66,7 @@ cp -rp src/Seld/JsonLint %{buildroot}%{_datadir}/php/Seld/
 
 %check
 %{_bindir}/phpunit --bootstrap=./autoload.php \
-    -d include_path="./src:./tests:.:%{pear_phpdir}" .
+    --include-path=./src:./tests .
 
 
 %files
@@ -68,6 +76,11 @@ cp -rp src/Seld/JsonLint %{buildroot}%{_datadir}/php/Seld/
 
 
 %changelog
+* Mon Jun  9 2014 Remi Collet <remi at fedoraproject.org> - 1.1.2-2
+- fix FTBFS, include path during test
+- upstream patch for latest PHPUnit
+- provides php-composer(seld/jsonlint)
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.2-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list