summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-08-07 07:20:09 +0200
committerRemi Collet <fedora@famillecollet.com>2015-08-07 07:20:09 +0200
commitcc495643137d61cc9272284b292ae729af785763 (patch)
treeb5ce1e9b9ecdf7fbfa4611db8c4a8b746ba71624
parentfc2279f289a4f5080bf36f3d54a52865602b965d (diff)
php-phpunit-PHPUnit: 4.8.0
-rw-r--r--Autoload.php.in27
-rw-r--r--php-phpunit-PHPUnit.spec28
2 files changed, 27 insertions, 28 deletions
diff --git a/Autoload.php.in b/Autoload.php.in
index 141aa8c..c3698b7 100644
--- a/Autoload.php.in
+++ b/Autoload.php.in
@@ -17,7 +17,8 @@ require_once 'SebastianBergmann/GlobalState/autoload.php';
require_once 'Doctrine/Instantiator/autoload.php';
require_once 'Prophecy/autoload.php';
-$vendorDir = '/usr/share/php';
+$vendorDir = stream_resolve_include_path('Symfony/Component/ClassLoader/ClassLoader.php');
+$vendorDir = dirname(dirname(dirname(dirname($vendorDir))));
// Use Symfony autoloader
if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
@@ -54,19 +55,13 @@ spl_autoload_register(
);
/* Optional */
-
-if (stream_resolve_include_path('PHPUnit/Extensions/Database/Autoload.php')) {
- require_once 'PHPUnit/Extensions/Database/Autoload.php';
-}
-
-if (stream_resolve_include_path('PHPUnit/Extensions/SeleniumCommon/Autoload.php')) {
- require_once 'PHPUnit/Extensions/SeleniumCommon/Autoload.php';
-}
-
-else if (stream_resolve_include_path('PHPUnit/Extensions/SeleniumTestCase/Autoload.php')) {
- require_once 'PHPUnit/Extensions/SeleniumTestCase/Autoload.php';
-}
-
-if (stream_resolve_include_path('PHPUnit/Extensions/Story/Autoload.php')) {
- require_once 'PHPUnit/Extensions/Story/Autoload.php';
+foreach(array(
+ 'PHPUnit/Extensions/Database/Autoload.php',
+ 'PHPUnit/Extensions/SeleniumCommon/Autoload.php',
+ 'PHPUnit/Extensions/SeleniumTestCase/Autoload.php',
+ 'PHPUnit/Extensions/Story/Autoload.php'
+ ) as $opt) {
+ if ($fic = stream_resolve_include_path($opt)) {
+ require_once $fic;
+ }
}
diff --git a/php-phpunit-PHPUnit.spec b/php-phpunit-PHPUnit.spec
index ff7e06a..5ee738e 100644
--- a/php-phpunit-PHPUnit.spec
+++ b/php-phpunit-PHPUnit.spec
@@ -8,16 +8,18 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 9b97f9d807b862c2de2a36e86690000801c85724
+%global gh_commit 283111a903eb9225aedb95e846bef876e006a688
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project phpunit
%global php_home %{_datadir}/php
%global pear_name PHPUnit
%global pear_channel pear.phpunit.de
+%global major 4.8
+%global minor 0
Name: php-phpunit-PHPUnit
-Version: 4.7.7
+Version: %{major}.%{minor}
Release: 1%{?dist}
Summary: The PHP Unit Testing framework
@@ -44,7 +46,7 @@ BuildRequires: php-composer(phpunit/phpunit-mock-objects) >= 2.3
BuildRequires: php-composer(phpspec/prophecy) >= 1.3.1
BuildRequires: php-composer(sebastian/comparator) >= 1.1
BuildRequires: php-composer(sebastian/diff) >= 1.1
-BuildRequires: php-composer(sebastian/environment) >= 1.2
+BuildRequires: php-composer(sebastian/environment) >= 1.3
BuildRequires: php-composer(sebastian/exporter) >= 1.2
BuildRequires: php-composer(sebastian/recursion-context) >= 1.0
BuildRequires: php-composer(sebastian/global-state) >= 1.0
@@ -60,11 +62,11 @@ BuildRequires: php-composer(phpunit/php-invoker) >= 1.1.0
# "phpunit/php-code-coverage": "~2.1",
# "phpunit/php-timer": ">=1.0.6",
# "phpunit/phpunit-mock-objects": "~2.2",
-# "phpspec/prophecy": "~1.3,>=1.3.1",
+# "phpspec/prophecy": "^1.3.1",
# "symfony/yaml": "~2.1|~3.0",
# "sebastian/comparator": "~1.0",
# "sebastian/diff": "~1.2",
-# "sebastian/environment": "~1.1",
+# "sebastian/environment": "~1.3",
# "sebastian/exporter": "~1.1",
# "sebastian/recursion-context": "~1.0",
# "sebastian/global-state": "~1.0",
@@ -92,7 +94,7 @@ Requires: php-composer(sebastian/comparator) >= 1.1
Requires: php-composer(sebastian/comparator) < 2
Requires: php-composer(sebastian/diff) >= 1.2
Requires: php-composer(sebastian/diff) < 2
-Requires: php-composer(sebastian/environment) >= 1.2
+Requires: php-composer(sebastian/environment) >= 1.3
Requires: php-composer(sebastian/environment) < 2
Requires: php-composer(sebastian/exporter) >= 1.2
Requires: php-composer(sebastian/exporter) < 2
@@ -175,11 +177,7 @@ install -D -p -m 755 phpunit %{buildroot}%{_bindir}/phpunit
%check
-sed -e '/logging/d' \
- -e '/<log/d' \
- phpunit.xml.dist > phpunit.xml
-
-./phpunit --testsuite=small --verbose
+./phpunit --testsuite=small --no-coverage --verbose
%clean
@@ -195,7 +193,7 @@ fi
%files
%defattr(-,root,root,-)
-%doc CONTRIBUTING.md README.md composer.json
+%doc CONTRIBUTING.md README.md composer.json ChangeLog-%{major}.md
%{!?_licensedir:%global license %%doc}
%license LICENSE
@@ -204,6 +202,12 @@ fi
%changelog
+* Fri Aug 7 2015 Remi Collet <remi@fedoraproject.org> - 4.8.0-1
+- Update to 4.8.0
+- raise dependency on sebastian/environment 1.3
+- rely on include_path for all dependencies
+- add Changelog in documentation
+
* Mon Jul 13 2015 Remi Collet <remi@fedoraproject.org> - 4.7.7-1
- Update to 4.7.7 (no change)