summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-02-12 11:03:06 +0100
committerRemi Collet <fedora@famillecollet.com>2016-02-12 11:03:06 +0100
commitd494e2e19a4d2bc021ef649f36d92f08a3886302 (patch)
tree7de297c3ec4d78b88984fffeb912b2e86c80bbdd
parentde2ca0feacde59db88136626f139c339fb1caa11 (diff)
php-mock: includes the tests in the package
-rw-r--r--php-mock/php-mock.spec18
1 files changed, 14 insertions, 4 deletions
diff --git a/php-mock/php-mock.spec b/php-mock/php-mock.spec
index 235d633..32b3420 100644
--- a/php-mock/php-mock.spec
+++ b/php-mock/php-mock.spec
@@ -38,7 +38,7 @@ BuildRequires: php-composer(symfony/class-loader)
# from composer.json, "require": {
# "php": ">=5.5",
# "phpunit/php-text-template": "^1"
-Requires: php(language) >= 5.3.3
+Requires: php(language) >= 5.5
Requires: php-composer(phpunit/php-text-template) >= 1
Requires: php-composer(phpunit/php-text-template) < 2
# From phpcompatinfo report from version 1.0.1
@@ -77,9 +77,18 @@ cp %{SOURCE1} classes/autoload.php
%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{_datadir}/php/
-cp -pr classes %{buildroot}%{_datadir}/php/phpmock
+rm -rf %{buildroot}
+# Library
+mkdir -p %{buildroot}%{_datadir}/php/
+cp -pr classes %{buildroot}%{_datadir}/php/phpmock
+# Unit tests
+mkdir -p %{buildroot}%{_datadir}/tests
+cp -pr tests/unit %{buildroot}%{_datadir}/tests/phpmock
+cat <<'EOF' | tee %{buildroot}%{_datadir}/tests/phpmock/autoload.php
+<?php
+require_once '%{_datadir}/php/phpmock/autoload.php';
+$fedoraClassLoader->addPrefix('phpmock\\', '%{_datadir}/tests');
+EOF
%check
@@ -105,6 +114,7 @@ rm -rf %{buildroot}
%doc composer.json
%doc *.md
%{_datadir}/php/phpmock
+%{_datadir}/tests/phpmock
%changelog