summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json15
-rw-r--r--mockery-tests.patch10
-rw-r--r--php-mockery.spec16
3 files changed, 29 insertions, 12 deletions
diff --git a/composer.json b/composer.json
index 5961925..12f23f6 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,9 @@
{
"name": "mockery/mockery",
- "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.",
+ "description": "Mockery is a simple yet flexible PHP mock object framework",
+ "scripts": {
+ "docs": "phpdoc -d library -t docs/api"
+ },
"keywords": [
"bdd",
"library",
@@ -13,7 +16,7 @@
"test double",
"testing"
],
- "homepage": "http://github.com/mockery/mockery",
+ "homepage": "https://github.com/mockery/mockery",
"license": "BSD-3-Clause",
"authors": [
{
@@ -33,13 +36,19 @@
"hamcrest/hamcrest-php": "~2.0"
},
"require-dev": {
- "phpunit/phpunit": "~5.7|~6.1"
+ "phpunit/phpunit": "~5.7.10|~6.5",
+ "phpdocumentor/phpdocumentor": "^2.9"
},
"autoload": {
"psr-0": {
"Mockery": "library/"
}
},
+ "autoload-dev": {
+ "psr-4": {
+ "test\\": "tests/"
+ }
+ },
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
diff --git a/mockery-tests.patch b/mockery-tests.patch
index 4955127..3019204 100644
--- a/mockery-tests.patch
+++ b/mockery-tests.patch
@@ -1,7 +1,7 @@
-diff -up tests/Bootstrap.php.rpm tests/Bootstrap.php
---- tests/Bootstrap.php.rpm 2018-01-22 10:30:27.396051495 +0100
-+++ tests/Bootstrap.php 2018-01-22 10:36:43.834985419 +0100
-@@ -50,11 +50,7 @@ if (!file_exists($autoloadPath)) {
+diff -up ./tests/Bootstrap.php.rpm ./tests/Bootstrap.php
+--- ./tests/Bootstrap.php.rpm 2018-05-08 10:54:48.000000000 +0200
++++ ./tests/Bootstrap.php 2018-05-13 10:39:38.471383840 +0200
+@@ -50,11 +50,9 @@ if (!file_exists($autoloadPath)) {
require_once $autoloadPath;
@@ -10,6 +10,8 @@ diff -up tests/Bootstrap.php.rpm tests/Bootstrap.php
- $hamcrestRelativePath = str_replace('/', DIRECTORY_SEPARATOR, $hamcrestRelativePath);
-}
-$hamcrestPath = $composerVendorDirectory . DIRECTORY_SEPARATOR . $hamcrestRelativePath;
++require_once __DIR__ . '/classmap.php';
++
+$hamcrestPath = '/usr/share/php/Hamcrest2/Hamcrest.php';
require_once $hamcrestPath;
diff --git a/php-mockery.spec b/php-mockery.spec
index f8159b2..5f5b29f 100644
--- a/php-mockery.spec
+++ b/php-mockery.spec
@@ -7,7 +7,7 @@
#
# Please preserve changelog entries
#
-%global gh_commit 1bac8c362b12f522fdd1f1fa3556284c91affa38
+%global gh_commit 99e29d3596b16dabe4982548527d5ddf90232e99
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner padraic
%global gh_project mockery
@@ -16,7 +16,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-mockery
-Version: 1.0
+Version: 1.1.0
Release: 1%{?dist}
Summary: Mockery is a simple but flexible PHP mock object framework
@@ -34,13 +34,14 @@ Patch2: 798.patch
BuildArch: noarch
%if %{with_tests}
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "~5.7|~6.1"
+# "phpunit/phpunit": "~5.7.10|~6.5",
+# "phpdocumentor/phpdocumentor": "^2.9"
%if 0%{?fedora} >= 26
%global phpunit %{_bindir}/phpunit6
-BuildRequires: phpunit6
+BuildRequires: phpunit6 >= 6.5
%else
%global phpunit %{_bindir}/phpunit
-BuildRequires: php-phpunit-PHPUnit >= 5.7
+BuildRequires: php-phpunit-PHPUnit >= 5.7.10
%endif
BuildRequires: php(language) >= 5.6.0
%if 0%{?fedora} >= 27
@@ -113,6 +114,8 @@ cp -rp library/%{ns_project} %{buildroot}/%{_datadir}/php/%{ns_project}%{major}
: Use installed tree and our autoloader
export COMPOSER_VENDOR_DIR=%{buildroot}%{_datadir}/php/%{ns_project}%{major}
+phpab --output tests/classmap.php tests/Mockery/Stubs/
+
: Run upstream test suite
ret=0
for cmd in "php %{phpunit}" php70 php71 php72; do
@@ -137,6 +140,9 @@ exit $ret
%changelog
+* Sun May 13 2018 Remi Collet <remi@remirepo.net> - 1.1.0-1
+- update to 1.1.0
+
* Mon Jan 22 2018 Remi Collet <remi@remirepo.net> - 1.0-1
- Update to 1.0
- rename to php-mockery and move to /usr/share/php/Mockery1