summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-03 16:02:23 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-03 16:02:23 +0200
commit6459e3d7b9479167f071db1895082686fc2b8f66 (patch)
treede19a444c5bfbaff45900f7cae209141819fd945
php-zetacomponents-unit-test: 1.0.2 - New Package
-rw-r--r--Makefile4
-rw-r--r--php-zetacomponents-unit-test-pr5.patch55
-rw-r--r--php-zetacomponents-unit-test.spec98
3 files changed, 157 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..13af741
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../../common/Makefile
+
diff --git a/php-zetacomponents-unit-test-pr5.patch b/php-zetacomponents-unit-test-pr5.patch
new file mode 100644
index 0000000..b3a211f
--- /dev/null
+++ b/php-zetacomponents-unit-test-pr5.patch
@@ -0,0 +1,55 @@
+From e310f21a220f8e52d5ef86d2474bd2fbeeb82e25 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Wed, 3 Jun 2015 15:00:36 +0200
+Subject: [PATCH] fix ezcTestConstraintSimilarImage for recent phpunit
+
+---
+ src/constraint/image.php | 24 +++++-------------------
+ 1 file changed, 5 insertions(+), 19 deletions(-)
+
+diff --git a/src/constraint/image.php b/src/constraint/image.php
+index be037c5..7c837ab 100644
+--- a/src/constraint/image.php
++++ b/src/constraint/image.php
+@@ -154,36 +154,22 @@ public function evaluate( $other, $description = '', $returnResult = false )
+ * @param boolean $not Flag to indicate negation.
+ * @throws PHPUnit_Framework_ExpectationFailedException
+ */
+- public function fail( $other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL )
++ public function fail( $other, $description, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = NULL )
+ {
+ $failureDescription = sprintf(
+ 'Failed asserting that image "%s" is similar to image "%s".',
+-
+ $other,
+ $this->filename
+ );
+
+- if ($not) {
+- $failureDescription = self::negate($failureDescription);
+- }
+-
+ if (!empty($description)) {
+ $failureDescription = $description . "\n" . $failureDescription;
+ }
+
+- if (!$not) {
+- throw new PHPUnit_Framework_ExpectationFailedException(
+- $failureDescription,
+- PHPUnit_Framework_ComparisonFailure::diffEqual(
+- $this->delta,
+- $this->difference
+- )
+- );
+- } else {
+- throw new PHPUnit_Framework_ExpectationFailedException(
+- $failureDescription
+- );
+- }
++ throw new PHPUnit_Framework_ExpectationFailedException(
++ $failureDescription,
++ $comparisonFailure
++ );
+ }
+
+ /**
diff --git a/php-zetacomponents-unit-test.spec b/php-zetacomponents-unit-test.spec
new file mode 100644
index 0000000..7da0f76
--- /dev/null
+++ b/php-zetacomponents-unit-test.spec
@@ -0,0 +1,98 @@
+# remirepo/fedora spec file for php-zetacomponents-unit-test
+#
+# Copyright (c) 2015 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+
+%global gh_commit 075742e2ad692c58da4dc593518a4d110f7eb822
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner zetacomponents
+%global gh_project UnitTest
+%global cname unit-test
+%global ezcdir %{_datadir}/php/ezc
+
+Name: php-%{gh_owner}-%{cname}
+Version: 1.0.2
+Release: 1%{?dist}
+Summary: Zeta UnitTest Component
+
+Group: Development/Libraries
+License: ASL 2.0
+URL: http://zetacomponents.org/
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
+
+# https://github.com/zetacomponents/UnitTest/pull/5
+Patch0: %{name}-pr5.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+BuildRequires: %{_bindir}/phpab
+
+# From phpcompatinfo report for 1.0.2
+Requires: php(language) > 5.3
+Requires: php-pcre
+Requires: php-reflection
+Requires: php-spl
+
+Provides: php-composer(%{gh_owner}/%{cname}) = %{version}
+
+
+%description
+UnitTest is an internal component which extends PhpUnit to facilitate test
+running and reports of the components themselves.
+
+For this reason, there is no tutorial for this component. If you really want
+to use it for some reason it's sane to expect some community support on IRC or
+the mailing list.
+
+
+%prep
+%setup -q -n %{gh_project}-%{gh_commit}
+
+%patch0 -p1
+
+
+%build
+: Generate a simple autoloader
+%{_bindir}/phpab \
+ --output src/autoloader.php \
+ src
+
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{ezcdir}/autoload
+
+: The library
+cp -pr src \
+ %{buildroot}%{ezcdir}/%{gh_project}
+: For ezcBase autoloader
+cp -pr src/*_autoload.php \
+ %{buildroot}%{ezcdir}/autoload
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%{!?_licensedir:%global license %%doc}
+%license NOTICE CREDITS
+%doc ChangeLog
+%doc composer.json
+%doc docs design
+%dir %{ezcdir}
+%dir %{ezcdir}/autoload
+ %{ezcdir}/autoload/*_autoload.php
+ %{ezcdir}/%{gh_project}
+
+
+%changelog
+* Wed Jun 3 2015 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
+- initial package
+- open https://github.com/zetacomponents/UnitTest/issues/4 License
+- open https://github.com/zetacomponents/UnitTest/pull/5 phpunit 4 \ No newline at end of file