aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--composer.json7
-rw-r--r--composer.lock424
-rw-r--r--tests/phpunit-mysql.xml12
-rw-r--r--tests/phpunit-pgsql.xml12
-rw-r--r--tests/unit/Lib/PermissionDescriptionTest.php129
-rw-r--r--vendor/composer/autoload_classmap.php3
-rw-r--r--vendor/composer/autoload_static.php3
8 files changed, 372 insertions, 224 deletions
diff --git a/.travis.yml b/.travis.yml
index 323c48f7f..2d1771c1b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,11 +33,11 @@ addons:
# - mariadb
# - postgresql
-# any PHP version we want to test against, our unit tests require PHP>=5.6
+# any PHP version we want to test against, current stable phpunit requires PHP >= 7.0
php:
- - '5.6'
- '7.0'
- '7.1'
+ # HHVM does not fulfil PHPUnit platform requirements as being compatible with PHP7 yet
#- 'hhvm'
# list of environments to test
@@ -108,8 +108,6 @@ install:
before_script:
# Use code coverage config for phpunit
- if [[ ! -z $CODECOV ]]; then export PHPUCOV=""; fi
- # HHVM needs xdebug for code coverage, but extremely slow
- #- if [[ $TRAVIS_PHP_VERSION =~ ^hhvm ]]; then echo 'xdebug.enable = On' >> /etc/hhvm/php.ini; fi
# Some preparation tasks of environment
- ./tests/travis/prepare.sh
# DB specific prepare scripts
diff --git a/composer.json b/composer.json
index f355566f2..868a89d19 100644
--- a/composer.json
+++ b/composer.json
@@ -33,11 +33,12 @@
"pixel418/markdownify": "^2.2"
},
"require-dev" : {
- "php" : ">=5.6",
- "phpunit/phpunit" : "^5.7",
+ "php" : ">=7.0",
+ "phpunit/phpunit" : "^6.0",
"behat/behat" : "@stable",
"behat/mink-extension": "@stable",
- "behat/mink-goutte-driver": "@stable"
+ "behat/mink-goutte-driver": "@stable",
+ "php-mock/php-mock-phpunit": "^2.0"
},
"autoload" : {
"psr-4" : {
diff --git a/composer.lock b/composer.lock
index 06fb17410..7541448f2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "c0cafbf9fd702be588f6b392b9742cb6",
+ "content-hash": "0b382a501597bf5f59a5f22e85954cbe",
"packages": [
{
"name": "michelf/php-markdown",
@@ -1113,21 +1113,21 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "6.2.2",
+ "version": "6.2.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60"
+ "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
- "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006",
+ "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006",
"shasum": ""
},
"require": {
"guzzlehttp/promises": "^1.0",
- "guzzlehttp/psr7": "^1.3.1",
+ "guzzlehttp/psr7": "^1.4",
"php": ">=5.5"
},
"require-dev": {
@@ -1171,7 +1171,7 @@
"rest",
"web service"
],
- "time": "2016-10-08T15:01:37+00:00"
+ "time": "2017-02-28T22:50:30+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -1226,16 +1226,16 @@
},
{
"name": "guzzlehttp/psr7",
- "version": "1.4.0",
+ "version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "04a6d1a00ea5da0727ee94309a9f0d3dbaecb569"
+ "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/04a6d1a00ea5da0727ee94309a9f0d3dbaecb569",
- "reference": "04a6d1a00ea5da0727ee94309a9f0d3dbaecb569",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/0d6c7ca039329247e4f0f8f8f6506810e8248855",
+ "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855",
"shasum": ""
},
"require": {
@@ -1287,7 +1287,7 @@
"uri",
"url"
],
- "time": "2017-02-21T01:20:32+00:00"
+ "time": "2017-02-27T10:51:17+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -1332,6 +1332,171 @@
"time": "2017-01-26T22:05:40+00:00"
},
{
+ "name": "php-mock/php-mock",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-mock/php-mock.git",
+ "reference": "22d297231118e6fd5b9db087fbe1ef866c2b95d2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-mock/php-mock/zipball/22d297231118e6fd5b9db087fbe1ef866c2b95d2",
+ "reference": "22d297231118e6fd5b9db087fbe1ef866c2b95d2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6",
+ "phpunit/php-text-template": "^1"
+ },
+ "replace": {
+ "malkusch/php-mock": "*"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7"
+ },
+ "suggest": {
+ "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock."
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "phpmock\\": [
+ "classes/",
+ "tests/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "WTFPL"
+ ],
+ "authors": [
+ {
+ "name": "Markus Malkusch",
+ "email": "markus@malkusch.de",
+ "homepage": "http://markus.malkusch.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.",
+ "homepage": "https://github.com/php-mock/php-mock",
+ "keywords": [
+ "BDD",
+ "TDD",
+ "function",
+ "mock",
+ "stub",
+ "test",
+ "test double"
+ ],
+ "time": "2017-02-17T20:52:52+00:00"
+ },
+ {
+ "name": "php-mock/php-mock-integration",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-mock/php-mock-integration.git",
+ "reference": "5a0d7d7755f823bc2a230cfa45058b40f9013bc4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/5a0d7d7755f823bc2a230cfa45058b40f9013bc4",
+ "reference": "5a0d7d7755f823bc2a230cfa45058b40f9013bc4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6",
+ "php-mock/php-mock": "^2",
+ "phpunit/php-text-template": "^1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4|^5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "phpmock\\integration\\": "classes/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "WTFPL"
+ ],
+ "authors": [
+ {
+ "name": "Markus Malkusch",
+ "email": "markus@malkusch.de",
+ "homepage": "http://markus.malkusch.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Integration package for PHP-Mock",
+ "homepage": "https://github.com/php-mock/php-mock-integration",
+ "keywords": [
+ "BDD",
+ "TDD",
+ "function",
+ "mock",
+ "stub",
+ "test",
+ "test double"
+ ],
+ "time": "2017-02-17T21:31:34+00:00"
+ },
+ {
+ "name": "php-mock/php-mock-phpunit",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-mock/php-mock-phpunit.git",
+ "reference": "173781abdc632c59200253e12e2b991ae6a4574f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/173781abdc632c59200253e12e2b991ae6a4574f",
+ "reference": "173781abdc632c59200253e12e2b991ae6a4574f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7",
+ "php-mock/php-mock-integration": "^2",
+ "phpunit/phpunit": "^6"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "phpmock\\phpunit\\": "classes/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "WTFPL"
+ ],
+ "authors": [
+ {
+ "name": "Markus Malkusch",
+ "email": "markus@malkusch.de",
+ "homepage": "http://markus.malkusch.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.",
+ "homepage": "https://github.com/php-mock/php-mock-phpunit",
+ "keywords": [
+ "BDD",
+ "TDD",
+ "function",
+ "mock",
+ "phpunit",
+ "stub",
+ "test",
+ "test double"
+ ],
+ "time": "2017-02-17T22:44:38+00:00"
+ },
+ {
"name": "phpdocumentor/reflection-common",
"version": "1.0",
"source": {
@@ -1479,27 +1644,27 @@
},
{
"name": "phpspec/prophecy",
- "version": "v1.6.2",
+ "version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
+ "reference": "93d39f1f7f9326d746203c7c056f300f7f126073"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
- "reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073",
+ "reference": "93d39f1f7f9326d746203c7c056f300f7f126073",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
- "sebastian/comparator": "^1.1",
- "sebastian/recursion-context": "^1.0|^2.0"
+ "sebastian/comparator": "^1.1|^2.0",
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
"require-dev": {
- "phpspec/phpspec": "^2.0",
+ "phpspec/phpspec": "^2.5|^3.2",
"phpunit/phpunit": "^4.8 || ^5.6.5"
},
"type": "library",
@@ -1538,44 +1703,44 @@
"spy",
"stub"
],
- "time": "2016-11-21T14:58:47+00:00"
+ "time": "2017-03-02T20:05:34+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "4.0.6",
+ "version": "5.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "ca060f645beeddebedb1885c97bf163e93264c35"
+ "reference": "531553c4795a1df54114342d68ca337d5d81c8a0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca060f645beeddebedb1885c97bf163e93264c35",
- "reference": "ca060f645beeddebedb1885c97bf163e93264c35",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/531553c4795a1df54114342d68ca337d5d81c8a0",
+ "reference": "531553c4795a1df54114342d68ca337d5d81c8a0",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0",
- "phpunit/php-file-iterator": "~1.3",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-token-stream": "^1.4.2 || ^2.0",
- "sebastian/code-unit-reverse-lookup": "~1.0",
- "sebastian/environment": "^1.3.2 || ^2.0",
- "sebastian/version": "~1.0|~2.0"
+ "ext-dom": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.0",
+ "phpunit/php-file-iterator": "^1.3",
+ "phpunit/php-text-template": "^1.2",
+ "phpunit/php-token-stream": "^1.4.11 || ^2.0",
+ "sebastian/code-unit-reverse-lookup": "^1.0",
+ "sebastian/environment": "^2.0",
+ "sebastian/version": "^2.0"
},
"require-dev": {
- "ext-xdebug": ">=2.1.4",
- "phpunit/phpunit": "^5.4"
+ "ext-xdebug": "^2.5",
+ "phpunit/phpunit": "^6.0"
},
"suggest": {
- "ext-dom": "*",
- "ext-xdebug": ">=2.4.0",
- "ext-xmlwriter": "*"
+ "ext-xdebug": "^2.5.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0.x-dev"
+ "dev-master": "5.0.x-dev"
}
},
"autoload": {
@@ -1601,7 +1766,7 @@
"testing",
"xunit"
],
- "time": "2017-02-23T07:38:02+00:00"
+ "time": "2017-03-01T09:14:18+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -1693,25 +1858,30 @@
},
{
"name": "phpunit/php-timer",
- "version": "1.0.8",
+ "version": "1.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
- "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^5.3.3 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4|~5"
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
"autoload": {
"classmap": [
"src/"
@@ -1733,20 +1903,20 @@
"keywords": [
"timer"
],
- "time": "2016-05-12T18:03:57+00:00"
+ "time": "2017-02-26T11:10:40+00:00"
},
{
"name": "phpunit/php-token-stream",
- "version": "1.4.10",
+ "version": "1.4.11",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "284fb0679dd25fb5ffb56dad92c72860c0a22f1b"
+ "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/284fb0679dd25fb5ffb56dad92c72860c0a22f1b",
- "reference": "284fb0679dd25fb5ffb56dad92c72860c0a22f1b",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7",
+ "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7",
"shasum": ""
},
"require": {
@@ -1782,20 +1952,20 @@
"keywords": [
"tokenizer"
],
- "time": "2017-02-23T06:14:45+00:00"
+ "time": "2017-02-27T10:12:30+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "5.7.14",
+ "version": "6.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "4906b8faf23e42612182fd212eb6f4c0f2954b57"
+ "reference": "47ee3fa1bca5c50f1d25105201eb20df777bd7b6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4906b8faf23e42612182fd212eb6f4c0f2954b57",
- "reference": "4906b8faf23e42612182fd212eb6f4c0f2954b57",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/47ee3fa1bca5c50f1d25105201eb20df777bd7b6",
+ "reference": "47ee3fa1bca5c50f1d25105201eb20df777bd7b6",
"shasum": ""
},
"require": {
@@ -1804,33 +1974,33 @@
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "~1.3",
- "php": "^5.6 || ^7.0",
+ "myclabs/deep-copy": "^1.3",
+ "php": "^7.0",
"phpspec/prophecy": "^1.6.2",
- "phpunit/php-code-coverage": "^4.0.4",
- "phpunit/php-file-iterator": "~1.4",
- "phpunit/php-text-template": "~1.2",
+ "phpunit/php-code-coverage": "^5.0",
+ "phpunit/php-file-iterator": "^1.4",
+ "phpunit/php-text-template": "^1.2",
"phpunit/php-timer": "^1.0.6",
- "phpunit/phpunit-mock-objects": "^3.2",
- "sebastian/comparator": "^1.2.4",
- "sebastian/diff": "~1.2",
- "sebastian/environment": "^1.3.4 || ^2.0",
- "sebastian/exporter": "~2.0",
- "sebastian/global-state": "^1.1",
- "sebastian/object-enumerator": "~2.0",
- "sebastian/resource-operations": "~1.0",
- "sebastian/version": "~1.0.3|~2.0",
- "symfony/yaml": "~2.1|~3.0"
+ "phpunit/phpunit-mock-objects": "^4.0",
+ "sebastian/comparator": "^1.2.4 || ^2.0",
+ "sebastian/diff": "^1.2",
+ "sebastian/environment": "^2.0",
+ "sebastian/exporter": "^2.0 || ^3.0",
+ "sebastian/global-state": "^1.1 || ^2.0",
+ "sebastian/object-enumerator": "^2.0 || ^3.0",
+ "sebastian/resource-operations": "^1.0",
+ "sebastian/version": "^2.0"
},
"conflict": {
- "phpdocumentor/reflection-docblock": "3.0.2"
+ "phpdocumentor/reflection-docblock": "3.0.2",
+ "phpunit/dbunit": "<3.0"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
"ext-xdebug": "*",
- "phpunit/php-invoker": "~1.1"
+ "phpunit/php-invoker": "^1.1"
},
"bin": [
"phpunit"
@@ -1838,7 +2008,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.7.x-dev"
+ "dev-master": "6.0.x-dev"
}
},
"autoload": {
@@ -1864,33 +2034,33 @@
"testing",
"xunit"
],
- "time": "2017-02-19T07:22:16+00:00"
+ "time": "2017-03-02T15:24:03+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "3.4.3",
+ "version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24"
+ "reference": "eabce450df194817a7d7e27e19013569a903a2bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/eabce450df194817a7d7e27e19013569a903a2bf",
+ "reference": "eabce450df194817a7d7e27e19013569a903a2bf",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
- "php": "^5.6 || ^7.0",
+ "php": "^7.0",
"phpunit/php-text-template": "^1.2",
- "sebastian/exporter": "^1.2 || ^2.0"
+ "sebastian/exporter": "^3.0"
},
"conflict": {
- "phpunit/phpunit": "<5.4.0"
+ "phpunit/phpunit": "<6.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.4"
+ "phpunit/phpunit": "^6.0"
},
"suggest": {
"ext-soap": "*"
@@ -1898,7 +2068,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2.x-dev"
+ "dev-master": "4.0.x-dev"
}
},
"autoload": {
@@ -1923,7 +2093,7 @@
"mock",
"xunit"
],
- "time": "2016-12-08T20:27:08+00:00"
+ "time": "2017-03-03T06:30:20+00:00"
},
{
"name": "psr/container",
@@ -2026,23 +2196,23 @@
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.0",
+ "version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe"
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
- "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
"shasum": ""
},
"require": {
- "php": ">=5.6"
+ "php": "^5.6 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~5"
+ "phpunit/phpunit": "^5.7 || ^6.0"
},
"type": "library",
"extra": {
@@ -2067,34 +2237,34 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2016-02-13T06:45:14+00:00"
+ "time": "2017-03-04T06:30:41+00:00"
},
{
"name": "sebastian/comparator",
- "version": "1.2.4",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
+ "reference": "20f84f468cb67efee293246e6a09619b891f55f0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/20f84f468cb67efee293246e6a09619b891f55f0",
+ "reference": "20f84f468cb67efee293246e6a09619b891f55f0",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2 || ~2.0"
+ "php": "^7.0",
+ "sebastian/diff": "^1.2",
+ "sebastian/exporter": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -2131,7 +2301,7 @@
"compare",
"equality"
],
- "time": "2017-01-29T09:50:25+00:00"
+ "time": "2017-03-03T06:26:08+00:00"
},
{
"name": "sebastian/diff",
@@ -2237,30 +2407,30 @@
},
{
"name": "sebastian/exporter",
- "version": "2.0.0",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
+ "reference": "b82d077cb3459e393abcf4867ae8f7230dcb51f6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/b82d077cb3459e393abcf4867ae8f7230dcb51f6",
+ "reference": "b82d077cb3459e393abcf4867ae8f7230dcb51f6",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/recursion-context": "~2.0"
+ "php": "^7.0",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0.x-dev"
}
},
"autoload": {
@@ -2300,7 +2470,7 @@
"export",
"exporter"
],
- "time": "2016-11-19T08:54:04+00:00"
+ "time": "2017-03-03T06:25:06+00:00"
},
{
"name": "sebastian/global-state",
@@ -2355,29 +2525,29 @@
},
{
"name": "sebastian/object-enumerator",
- "version": "2.0.1",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
+ "reference": "de6e32f7192dfea2e4bedc892434f4830b5c5794"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
- "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/de6e32f7192dfea2e4bedc892434f4830b5c5794",
+ "reference": "de6e32f7192dfea2e4bedc892434f4830b5c5794",
"shasum": ""
},
"require": {
- "php": ">=5.6",
- "sebastian/recursion-context": "~2.0"
+ "php": "^7.0",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "~5"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0.x-dev"
}
},
"autoload": {
@@ -2397,32 +2567,32 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2017-02-18T15:18:39+00:00"
+ "time": "2017-03-03T06:21:01+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "2.0.0",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0.x-dev"
}
},
"autoload": {
@@ -2450,7 +2620,7 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2016-11-19T07:33:16+00:00"
+ "time": "2017-03-03T06:23:57+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -3354,6 +3524,6 @@
"ext-openssl": "*"
},
"platform-dev": {
- "php": ">=5.6"
+ "php": ">=7.0"
}
}
diff --git a/tests/phpunit-mysql.xml b/tests/phpunit-mysql.xml
index 9ba40f087..171211094 100644
--- a/tests/phpunit-mysql.xml
+++ b/tests/phpunit-mysql.xml
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
- backupGlobals="false"
+ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
+ bootstrap="../boot.php"
+ forceCoversAnnotation="false"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
- beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"
- processIsolation="false"
verbose="true">
<testsuite name="Hubzilla default Test Suite">
<directory suffix="Test.php">./unit/</directory>
@@ -31,7 +30,8 @@
</filter>
<logging>
<log type="junit" target="./results/junit.xml" logIncompleteSkipped="false"/>
- <log type="coverage-html" target="./results/report/" lowUpperBound="35"
- highLowerBound="70"/>
+ <log type="coverage-clover" target="./results/coverage-clover.xml"/>
+ <log type="coverage-html" target="./results/coverage-report/" lowUpperBound="35"
+ highLowerBound="70"/>
</logging>
</phpunit>
diff --git a/tests/phpunit-pgsql.xml b/tests/phpunit-pgsql.xml
index f59dd05ad..ace14e196 100644
--- a/tests/phpunit-pgsql.xml
+++ b/tests/phpunit-pgsql.xml
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
- backupGlobals="false"
+ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
+ bootstrap="../boot.php"
+ forceCoversAnnotation="false"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
- beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"
- processIsolation="true"
verbose="true">
<testsuite name="Hubzilla default Test Suite">
<directory suffix="Test.php">./unit/</directory>
@@ -28,7 +27,8 @@
</filter>
<logging>
<log type="junit" target="./results/junit.xml" logIncompleteSkipped="false"/>
- <log type="coverage-html" target="./results/report/" lowUpperBound="35"
- highLowerBound="70"/>
+ <log type="coverage-clover" target="./results/coverage-clover.xml"/>
+ <log type="coverage-html" target="./results/coverage-report/" lowUpperBound="35"
+ highLowerBound="70"/>
</logging>
</phpunit>
diff --git a/tests/unit/Lib/PermissionDescriptionTest.php b/tests/unit/Lib/PermissionDescriptionTest.php
index b1da5a0fd..97a39a2c8 100644
--- a/tests/unit/Lib/PermissionDescriptionTest.php
+++ b/tests/unit/Lib/PermissionDescriptionTest.php
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright (c) 2016 Hubzilla
+ * Copyright (c) 2016-2017 Hubzilla
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -21,90 +21,75 @@
* SOFTWARE.
*/
-// Global namespace for fully qualified \App class.
-namespace {
- // General channel permissions in boot.php
- // 0 = Only you
- define ( 'PERMS_PUBLIC' , 0x0001 ); // anybody
- define ( 'PERMS_NETWORK' , 0x0002 ); // anybody in this network
- define ( 'PERMS_SITE' , 0x0004 ); // anybody on this site
- define ( 'PERMS_CONTACTS' , 0x0008 ); // any of my connections
- define ( 'PERMS_SPECIFIC' , 0x0080 ); // only specific connections
- define ( 'PERMS_AUTHED' , 0x0100 ); // anybody authenticated (could include visitors from other networks)
- define ( 'PERMS_PENDING' , 0x0200 ); // any connections including those who haven't yet been approved
- // log levels in boot.php
- define ( 'LOGGER_DEBUG', 2 );
+namespace Zotlabs\Tests\Unit\Lib;
- // Stub global fully qualified \App class for static function calls
- class App {
- // Stub get_hostname()
- public static function get_hostname() {
- return 'phpunit';
- }
- }
-}
+use phpmock\phpunit\PHPMock;
+use Zotlabs\Tests\Unit\UnitTestCase;
+use Zotlabs\Lib\PermissionDescription;
-// Stub global functions used in PermissionDescription with the help of
-// PHP's namespace resolution rules.
-namespace Zotlabs\Lib {
- // Stub global translate function t()
- function t($s) {
- return $s;
- }
- // Stub global log function logger()
- function logger($msg, $level = LOGGER_NORMAL, $priority = LOG_INFO) {
- // doesn't matter
- }
-}
+/**
+ * @brief Unit Test case for PermissionDescription class.
+ */
+class PermissionDescriptionTest extends UnitTestCase {
-// regular namespace for this unit test
-namespace Zotlabs\Tests\Unit\Lib {
+ use PHPMock;
- use Zotlabs\Tests\Unit\UnitTestCase;
- use Zotlabs\Lib\PermissionDescription;
+ public function testFromDescription() {
+ $permDesc = PermissionDescription::fromDescription('test');
+ $permDesc2 = PermissionDescription::fromDescription('test');
+ $permDesc3 = PermissionDescription::fromDescription('test2');
- /**
- * @brief Unit Test case for ConnectionPool class.
- */
- class PermissionDescriptionTest extends UnitTestCase {
+ $this->assertEquals($permDesc, $permDesc2);
+ $this->assertNotEquals($permDesc, $permDesc3);
+ }
- public function testFromDescription() {
- $permDesc = PermissionDescription::fromDescription('test');
- $permDesc2 = PermissionDescription::fromDescription('test');
- $permDesc3 = PermissionDescription::fromDescription('test2');
+ public function testFromStandalonePermission() {
+ // Create a stub for global function t()
+ $t = $this->getFunctionMock('Zotlabs\Lib', 't');
+ $t->expects($this->atLeastOnce())->willReturnCallback(
+ function ($string) {
+ return $string;
+ }
+ );
+ // Create a mock for global function logger()
+ $this->getFunctionMock('Zotlabs\Lib', 'logger');
- $this->assertEquals($permDesc, $permDesc2);
- $this->assertNotEquals($permDesc, $permDesc3);
- }
+ $permDescUnknown = PermissionDescription::fromStandalonePermission(-1);
+ $permDescSelf = PermissionDescription::fromStandalonePermission(0);
- public function testFromStandalonePermission() {
- $permDescUnknown = PermissionDescription::fromStandalonePermission(-1);
- $permDescSelf = PermissionDescription::fromStandalonePermission(0);
+ $this->assertNull($permDescUnknown);
+ $this->assertNotNull($permDescSelf);
+ }
- $this->assertNull($permDescUnknown);
- $this->assertNotNull($permDescSelf);
- }
+ public function testFromGlobalPermission() {
+ //$permDesc = PermissionDescription::fromGlobalPermission('view_profile');
- public function testFromGlobalPermission() {
- //$permDesc = PermissionDescription::fromGlobalPermission('view_profile');
+ $this->markTestIncomplete(
+ 'The method fromGlobalPermission() is not yet testable ...'
+ );
+ }
- $this->markTestIncomplete(
- 'For this test we need more stubs...'
- );
- }
+ public function testGetPermissionDescription() {
+ // Create a stub for global function t()
+ $t = $this->getFunctionMock('Zotlabs\Lib', 't');
+ $t->expects($this->atLeastOnce())->willReturnCallback(
+ function ($string) {
+ return $string;
+ }
+ );
+ // Create a mock for global function logger()
+ $this->getFunctionMock('Zotlabs\Lib', 'logger');
- public function testGetPermissionDescription() {
+ // Create a stub for the PermissionDescription class
+ $stub = $this->createMock(PermissionDescription::class);
+ $stub->method('get_permission_description')
+ ->will($this->returnArgument(0));
- // fromStandalonePermission uses get_permission_description(), so that will not help
- //$permDescSelf = PermissionDescription::fromStandalonePermission(0);
- //$permDescPublic = PermissionDescription::fromStandalonePermission(PERMS_PUBLIC);
+ $permDescSelf = PermissionDescription::fromStandalonePermission(0);
+ $this->assertInstanceOf(PermissionDescription::class, $permDescSelf);
+ $this->assertEquals($permDescSelf->get_permission_description(), 'Only me');
- $this->markTestIncomplete(
- 'For this test we need a mock of PermissionDescription...'
- );
- //$permDescSelf =
- //$this->assertEquals($permDescSelf->, 'Only me');
- //$this->assertEquals($permDescPublic, 'Public');
- }
+ $permDescPublic = PermissionDescription::fromStandalonePermission(PERMS_PUBLIC);
+ $this->assertEquals($permDescPublic->get_permission_description(), 'Public');
}
}
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 2adb2fe53..28ef0d2bf 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -361,9 +361,6 @@ return array(
'Sabre\\Xml\\Writer' => $vendorDir . '/sabre/xml/lib/Writer.php',
'Sabre\\Xml\\XmlDeserializable' => $vendorDir . '/sabre/xml/lib/XmlDeserializable.php',
'Sabre\\Xml\\XmlSerializable' => $vendorDir . '/sabre/xml/lib/XmlSerializable.php',
- 'Test\\Markdownify\\ConverterExtraTest' => $vendorDir . '/pixel418/markdownify/test/ConverterExtraTest.php',
- 'Test\\Markdownify\\ConverterTest' => $vendorDir . '/pixel418/markdownify/test/ConverterTest.php',
- 'Test\\Markdownify\\ConverterTestCase' => $vendorDir . '/pixel418/markdownify/test/ConverterTestCase.php',
'Zotlabs\\Access\\AccessList' => $baseDir . '/Zotlabs/Access/AccessList.php',
'Zotlabs\\Access\\PermissionLimits' => $baseDir . '/Zotlabs/Access/PermissionLimits.php',
'Zotlabs\\Access\\PermissionRoles' => $baseDir . '/Zotlabs/Access/PermissionRoles.php',
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index a7c84b7f1..eb4311159 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -476,9 +476,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'Sabre\\Xml\\Writer' => __DIR__ . '/..' . '/sabre/xml/lib/Writer.php',
'Sabre\\Xml\\XmlDeserializable' => __DIR__ . '/..' . '/sabre/xml/lib/XmlDeserializable.php',
'Sabre\\Xml\\XmlSerializable' => __DIR__ . '/..' . '/sabre/xml/lib/XmlSerializable.php',
- 'Test\\Markdownify\\ConverterExtraTest' => __DIR__ . '/..' . '/pixel418/markdownify/test/ConverterExtraTest.php',
- 'Test\\Markdownify\\ConverterTest' => __DIR__ . '/..' . '/pixel418/markdownify/test/ConverterTest.php',
- 'Test\\Markdownify\\ConverterTestCase' => __DIR__ . '/..' . '/pixel418/markdownify/test/ConverterTestCase.php',
'Zotlabs\\Access\\AccessList' => __DIR__ . '/../..' . '/Zotlabs/Access/AccessList.php',
'Zotlabs\\Access\\PermissionLimits' => __DIR__ . '/../..' . '/Zotlabs/Access/PermissionLimits.php',
'Zotlabs\\Access\\PermissionRoles' => __DIR__ . '/../..' . '/Zotlabs/Access/PermissionRoles.php',