aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-10-28 01:22:59 +0200
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-10-29 22:00:55 +0100
commit1be98d7b7fea30a929d27e7aa0b1412da3276b2c (patch)
tree7d7d5bbfbed65f89e6232235bf4b5534fe0fa03f
parent66832c41e9fff481c20ca219b3cc0a4e53b8b551 (diff)
downloadvolse-hubzilla-1be98d7b7fea30a929d27e7aa0b1412da3276b2c.tar.gz
volse-hubzilla-1be98d7b7fea30a929d27e7aa0b1412da3276b2c.tar.bz2
volse-hubzilla-1be98d7b7fea30a929d27e7aa0b1412da3276b2c.zip
:white_check_mark: Some more work on unit tests.
Some small improvements for coverage report. Add more functions from include/text.php Update composer dev libraries for phpunit.
-rw-r--r--composer.lock331
-rw-r--r--include/feedutils.php30
-rw-r--r--tests/unit/Access/AccessListTest.php4
-rw-r--r--tests/unit/Access/PermissionsTest.php4
-rw-r--r--tests/unit/includes/FeedutilsTest.php29
-rw-r--r--tests/unit/includes/TextTest.php40
6 files changed, 261 insertions, 177 deletions
diff --git a/composer.lock b/composer.lock
index dde88fb2c..f48a9b5ef 100644
--- a/composer.lock
+++ b/composer.lock
@@ -833,24 +833,25 @@
"packages-dev": [
{
"name": "behat/behat",
- "version": "v3.3.1",
+ "version": "v3.4.1",
"source": {
"type": "git",
"url": "https://github.com/Behat/Behat.git",
- "reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d"
+ "reference": "cb51d4b0b11ea6d3897f3589a871a63a33632692"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Behat/Behat/zipball/44a58c1480d6144b2dc2c2bf02b9cef73c83840d",
- "reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d",
+ "url": "https://api.github.com/repos/Behat/Behat/zipball/cb51d4b0b11ea6d3897f3589a871a63a33632692",
+ "reference": "cb51d4b0b11ea6d3897f3589a871a63a33632692",
"shasum": ""
},
"require": {
- "behat/gherkin": "^4.4.4",
+ "behat/gherkin": "^4.5.1",
"behat/transliterator": "^1.2",
- "container-interop/container-interop": "^1.1",
+ "container-interop/container-interop": "^1.2",
"ext-mbstring": "*",
"php": ">=5.3.3",
+ "psr/container": "^1.0",
"symfony/class-loader": "~2.1||~3.0",
"symfony/config": "~2.3||~3.0",
"symfony/console": "~2.5||~3.0",
@@ -911,20 +912,20 @@
"symfony",
"testing"
],
- "time": "2017-05-15T16:49:16+00:00"
+ "time": "2017-09-18T11:10:28+00:00"
},
{
"name": "behat/gherkin",
- "version": "v4.4.5",
+ "version": "v4.5.1",
"source": {
"type": "git",
"url": "https://github.com/Behat/Gherkin.git",
- "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74"
+ "reference": "74ac03d52c5e23ad8abd5c5cce4ab0e8dc1b530a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c14cff4f955b17d20d088dec1bde61c0539ec74",
- "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74",
+ "url": "https://api.github.com/repos/Behat/Gherkin/zipball/74ac03d52c5e23ad8abd5c5cce4ab0e8dc1b530a",
+ "reference": "74ac03d52c5e23ad8abd5c5cce4ab0e8dc1b530a",
"shasum": ""
},
"require": {
@@ -970,7 +971,7 @@
"gherkin",
"parser"
],
- "time": "2016-10-30T11:50:56+00:00"
+ "time": "2017-08-30T11:04:43+00:00"
},
{
"name": "behat/mink",
@@ -1561,37 +1562,40 @@
},
{
"name": "myclabs/deep-copy",
- "version": "1.6.1",
+ "version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102"
+ "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102",
- "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
+ "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"shasum": ""
},
"require": {
- "php": ">=5.4.0"
+ "php": "^5.6 || ^7.0"
},
"require-dev": {
- "doctrine/collections": "1.*",
- "phpunit/phpunit": "~4.1"
+ "doctrine/collections": "^1.0",
+ "doctrine/common": "^2.6",
+ "phpunit/phpunit": "^4.1"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
- }
+ },
+ "files": [
+ "src/DeepCopy/deep_copy.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
- "homepage": "https://github.com/myclabs/DeepCopy",
"keywords": [
"clone",
"copy",
@@ -1599,7 +1603,7 @@
"object",
"object graph"
],
- "time": "2017-04-12T18:52:22+00:00"
+ "time": "2017-10-19T19:58:43+00:00"
},
{
"name": "phar-io/manifest",
@@ -2079,28 +2083,28 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "5.2.1",
+ "version": "5.2.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b"
+ "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/dc421f9ca5082a0c0cb04afb171c765f79add85b",
- "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8ed1902a57849e117b5651fc1a5c48110946c06b",
+ "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
"php": "^7.0",
- "phpunit/php-file-iterator": "^1.3",
- "phpunit/php-text-template": "^1.2",
+ "phpunit/php-file-iterator": "^1.4.2",
+ "phpunit/php-text-template": "^1.2.1",
"phpunit/php-token-stream": "^1.4.11 || ^2.0",
- "sebastian/code-unit-reverse-lookup": "^1.0",
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
"sebastian/environment": "^3.0",
- "sebastian/version": "^2.0",
+ "sebastian/version": "^2.0.1",
"theseer/tokenizer": "^1.1"
},
"require-dev": {
@@ -2108,7 +2112,7 @@
"phpunit/phpunit": "^6.0"
},
"suggest": {
- "ext-xdebug": "^2.5.3"
+ "ext-xdebug": "^2.5.5"
},
"type": "library",
"extra": {
@@ -2139,7 +2143,7 @@
"testing",
"xunit"
],
- "time": "2017-04-21T08:03:57+00:00"
+ "time": "2017-08-03T12:40:43+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -2280,29 +2284,29 @@
},
{
"name": "phpunit/php-token-stream",
- "version": "1.4.11",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7"
+ "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7",
- "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9a02332089ac48e704c70f6cefed30c224e3c0b0",
+ "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^6.2.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -2325,20 +2329,20 @@
"keywords": [
"tokenizer"
],
- "time": "2017-02-27T10:12:30+00:00"
+ "time": "2017-08-20T05:47:52+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "6.2.3",
+ "version": "6.4.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "fa5711d0559fc4b64deba0702be52d41434cbcb7"
+ "reference": "06b28548fd2b4a20c3cd6e247dc86331a7d4db13"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fa5711d0559fc4b64deba0702be52d41434cbcb7",
- "reference": "fa5711d0559fc4b64deba0702be52d41434cbcb7",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/06b28548fd2b4a20c3cd6e247dc86331a7d4db13",
+ "reference": "06b28548fd2b4a20c3cd6e247dc86331a7d4db13",
"shasum": ""
},
"require": {
@@ -2347,24 +2351,24 @@
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "^1.3",
+ "myclabs/deep-copy": "^1.6.1",
"phar-io/manifest": "^1.0.1",
"phar-io/version": "^1.0",
"php": "^7.0",
"phpspec/prophecy": "^1.7",
- "phpunit/php-code-coverage": "^5.2",
- "phpunit/php-file-iterator": "^1.4",
- "phpunit/php-text-template": "^1.2",
- "phpunit/php-timer": "^1.0.6",
- "phpunit/phpunit-mock-objects": "^4.0",
- "sebastian/comparator": "^2.0",
- "sebastian/diff": "^1.4.3 || ^2.0",
- "sebastian/environment": "^3.0.2",
+ "phpunit/php-code-coverage": "^5.2.2",
+ "phpunit/php-file-iterator": "^1.4.2",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-timer": "^1.0.9",
+ "phpunit/phpunit-mock-objects": "^4.0.3",
+ "sebastian/comparator": "^2.0.2",
+ "sebastian/diff": "^2.0",
+ "sebastian/environment": "^3.1",
"sebastian/exporter": "^3.1",
- "sebastian/global-state": "^1.1 || ^2.0",
- "sebastian/object-enumerator": "^3.0.2",
+ "sebastian/global-state": "^2.0",
+ "sebastian/object-enumerator": "^3.0.3",
"sebastian/resource-operations": "^1.0",
- "sebastian/version": "^2.0"
+ "sebastian/version": "^2.0.1"
},
"conflict": {
"phpdocumentor/reflection-docblock": "3.0.2",
@@ -2383,7 +2387,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.2.x-dev"
+ "dev-master": "6.4.x-dev"
}
},
"autoload": {
@@ -2409,26 +2413,26 @@
"testing",
"xunit"
],
- "time": "2017-07-03T15:54:24+00:00"
+ "time": "2017-10-16T13:18:59+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "4.0.2",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "d8833b396dce9162bb2eb5d59aee5a3ab3cfa5b4"
+ "reference": "2f789b59ab89669015ad984afa350c4ec577ade0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/d8833b396dce9162bb2eb5d59aee5a3ab3cfa5b4",
- "reference": "d8833b396dce9162bb2eb5d59aee5a3ab3cfa5b4",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0",
+ "reference": "2f789b59ab89669015ad984afa350c4ec577ade0",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.0.2",
+ "doctrine/instantiator": "^1.0.5",
"php": "^7.0",
- "phpunit/php-text-template": "^1.2",
+ "phpunit/php-text-template": "^1.2.1",
"sebastian/exporter": "^3.0"
},
"conflict": {
@@ -2468,7 +2472,7 @@
"mock",
"xunit"
],
- "time": "2017-06-30T08:15:21+00:00"
+ "time": "2017-08-03T14:08:16+00:00"
},
{
"name": "psr/container",
@@ -2616,21 +2620,21 @@
},
{
"name": "sebastian/comparator",
- "version": "2.0.0",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "20f84f468cb67efee293246e6a09619b891f55f0"
+ "reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/20f84f468cb67efee293246e6a09619b891f55f0",
- "reference": "20f84f468cb67efee293246e6a09619b891f55f0",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ae068fede81d06e7bb9bb46a367210a3d3e1fe6a",
+ "reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a",
"shasum": ""
},
"require": {
"php": "^7.0",
- "sebastian/diff": "^1.2",
+ "sebastian/diff": "^2.0",
"sebastian/exporter": "^3.0"
},
"require-dev": {
@@ -2676,32 +2680,32 @@
"compare",
"equality"
],
- "time": "2017-03-03T06:26:08+00:00"
+ "time": "2017-08-03T07:14:59+00:00"
},
{
"name": "sebastian/diff",
- "version": "1.4.3",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ "phpunit/phpunit": "^6.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -2728,7 +2732,7 @@
"keywords": [
"diff"
],
- "time": "2017-05-22T07:24:03+00:00"
+ "time": "2017-08-03T08:09:46+00:00"
},
{
"name": "sebastian/environment",
@@ -2900,21 +2904,21 @@
},
{
"name": "sebastian/object-enumerator",
- "version": "3.0.2",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8"
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/31dd3379d16446c5d86dec32ab1ad1f378581ad8",
- "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
"shasum": ""
},
"require": {
"php": "^7.0",
- "sebastian/object-reflector": "^1.0",
+ "sebastian/object-reflector": "^1.1.1",
"sebastian/recursion-context": "^3.0"
},
"require-dev": {
@@ -2943,7 +2947,7 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2017-03-12T15:17:29+00:00"
+ "time": "2017-08-03T12:35:26+00:00"
},
{
"name": "sebastian/object-reflector",
@@ -3130,20 +3134,20 @@
},
{
"name": "symfony/browser-kit",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "3a4435e79a8401746e8525e98039199d0924b4e5"
+ "reference": "317d5bdf0127f06db7ea294186132b4f5b036839"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/3a4435e79a8401746e8525e98039199d0924b4e5",
- "reference": "3a4435e79a8401746e8525e98039199d0924b4e5",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/317d5bdf0127f06db7ea294186132b4f5b036839",
+ "reference": "317d5bdf0127f06db7ea294186132b4f5b036839",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/dom-crawler": "~2.8|~3.0"
},
"require-dev": {
@@ -3183,24 +3187,24 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2017-06-24T09:29:48+00:00"
+ "time": "2017-10-02T06:42:24+00:00"
},
{
"name": "symfony/class-loader",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/class-loader.git",
- "reference": "386a294d621576302e7cc36965d6ed53b8c73c4f"
+ "reference": "7572c904b209fa9907c69a6a9a68243c265a4d01"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/class-loader/zipball/386a294d621576302e7cc36965d6ed53b8c73c4f",
- "reference": "386a294d621576302e7cc36965d6ed53b8c73c4f",
+ "url": "https://api.github.com/repos/symfony/class-loader/zipball/7572c904b209fa9907c69a6a9a68243c265a4d01",
+ "reference": "7572c904b209fa9907c69a6a9a68243c265a4d01",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"require-dev": {
"symfony/finder": "~2.8|~3.0",
@@ -3239,24 +3243,24 @@
],
"description": "Symfony ClassLoader Component",
"homepage": "https://symfony.com",
- "time": "2017-06-02T09:51:43+00:00"
+ "time": "2017-10-02T06:42:24+00:00"
},
{
"name": "symfony/config",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274"
+ "reference": "4ab62407bff9cd97c410a7feaef04c375aaa5cfd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/a094618deb9a3fe1c3cf500a796e167d0495a274",
- "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274",
+ "url": "https://api.github.com/repos/symfony/config/zipball/4ab62407bff9cd97c410a7feaef04c375aaa5cfd",
+ "reference": "4ab62407bff9cd97c410a7feaef04c375aaa5cfd",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/filesystem": "~2.8|~3.0"
},
"conflict": {
@@ -3301,24 +3305,24 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2017-06-16T12:40:34+00:00"
+ "time": "2017-10-04T18:56:58+00:00"
},
{
"name": "symfony/console",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546"
+ "reference": "116bc56e45a8e5572e51eb43ab58c769a352366c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/a97e45d98c59510f085fa05225a1acb74dfe0546",
- "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546",
+ "url": "https://api.github.com/repos/symfony/console/zipball/116bc56e45a8e5572e51eb43ab58c769a352366c",
+ "reference": "116bc56e45a8e5572e51eb43ab58c769a352366c",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/debug": "~2.8|~3.0",
"symfony/polyfill-mbstring": "~1.0"
},
@@ -3331,7 +3335,6 @@
"symfony/dependency-injection": "~3.3",
"symfony/event-dispatcher": "~2.8|~3.0",
"symfony/filesystem": "~2.8|~3.0",
- "symfony/http-kernel": "~2.8|~3.0",
"symfony/process": "~2.8|~3.0"
},
"suggest": {
@@ -3370,24 +3373,24 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2017-07-03T13:19:36+00:00"
+ "time": "2017-10-02T06:42:24+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "4d882dced7b995d5274293039370148e291808f2"
+ "reference": "07447650225ca9223bd5c97180fe7c8267f7d332"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/4d882dced7b995d5274293039370148e291808f2",
- "reference": "4d882dced7b995d5274293039370148e291808f2",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/07447650225ca9223bd5c97180fe7c8267f7d332",
+ "reference": "07447650225ca9223bd5c97180fe7c8267f7d332",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"type": "library",
"extra": {
@@ -3423,24 +3426,24 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2017-05-01T15:01:29+00:00"
+ "time": "2017-10-02T06:42:24+00:00"
},
{
"name": "symfony/debug",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "63b85a968486d95ff9542228dc2e4247f16f9743"
+ "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/63b85a968486d95ff9542228dc2e4247f16f9743",
- "reference": "63b85a968486d95ff9542228dc2e4247f16f9743",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd",
+ "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"psr/log": "~1.0"
},
"conflict": {
@@ -3479,24 +3482,24 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2017-07-05T13:02:37+00:00"
+ "time": "2017-10-02T06:42:24+00:00"
},
{
"name": "symfony/dependency-injection",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "986a633c92220ecb22ad06820a1df126c7a4f9eb"
+ "reference": "8ebad929aee3ca185b05f55d9cc5521670821ad1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/986a633c92220ecb22ad06820a1df126c7a4f9eb",
- "reference": "986a633c92220ecb22ad06820a1df126c7a4f9eb",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/8ebad929aee3ca185b05f55d9cc5521670821ad1",
+ "reference": "8ebad929aee3ca185b05f55d9cc5521670821ad1",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"psr/container": "^1.0"
},
"conflict": {
@@ -3549,24 +3552,24 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2017-06-20T14:01:46+00:00"
+ "time": "2017-10-04T17:15:30+00:00"
},
{
"name": "symfony/dom-crawler",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1"
+ "reference": "40dafd42d5dad7fe5ad4e958413d92a207522ac1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1",
- "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/40dafd42d5dad7fe5ad4e958413d92a207522ac1",
+ "reference": "40dafd42d5dad7fe5ad4e958413d92a207522ac1",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
@@ -3605,24 +3608,24 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2017-05-25T23:10:31+00:00"
+ "time": "2017-10-02T06:42:24+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e"
+ "reference": "d7ba037e4b8221956ab1e221c73c9e27e05dd423"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67535f1e3fd662bdc68d7ba317c93eecd973617e",
- "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d7ba037e4b8221956ab1e221c73c9e27e05dd423",
+ "reference": "d7ba037e4b8221956ab1e221c73c9e27e05dd423",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"conflict": {
"symfony/dependency-injection": "<3.3"
@@ -3668,24 +3671,24 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2017-06-09T14:53:08+00:00"
+ "time": "2017-10-02T06:42:24+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "311fa718389efbd8b627c272b9324a62437018cc"
+ "reference": "90bc45abf02ae6b7deb43895c1052cb0038506f1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/311fa718389efbd8b627c272b9324a62437018cc",
- "reference": "311fa718389efbd8b627c272b9324a62437018cc",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/90bc45abf02ae6b7deb43895c1052cb0038506f1",
+ "reference": "90bc45abf02ae6b7deb43895c1052cb0038506f1",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"type": "library",
"extra": {
@@ -3717,20 +3720,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2017-06-24T09:29:48+00:00"
+ "time": "2017-10-03T13:33:10+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.4.0",
+ "version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "f29dca382a6485c3cbe6379f0c61230167681937"
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937",
- "reference": "f29dca382a6485c3cbe6379f0c61230167681937",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"shasum": ""
},
"require": {
@@ -3742,7 +3745,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
@@ -3776,24 +3779,24 @@
"portable",
"shim"
],
- "time": "2017-06-09T14:24:12+00:00"
+ "time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/translation",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3"
+ "reference": "409bf229cd552bf7e3faa8ab7e3980b07672073f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3",
- "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/409bf229cd552bf7e3faa8ab7e3980b07672073f",
+ "reference": "409bf229cd552bf7e3faa8ab7e3980b07672073f",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
@@ -3841,24 +3844,24 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2017-06-24T16:45:30+00:00"
+ "time": "2017-10-02T06:42:24+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.3.4",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "1f93a8d19b8241617f5074a123e282575b821df8"
+ "reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/1f93a8d19b8241617f5074a123e282575b821df8",
- "reference": "1f93a8d19b8241617f5074a123e282575b821df8",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46",
+ "reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"require-dev": {
"symfony/console": "~2.8|~3.0"
@@ -3896,7 +3899,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2017-06-15T12:58:50+00:00"
+ "time": "2017-10-05T14:43:42+00:00"
},
{
"name": "theseer/tokenizer",
diff --git a/include/feedutils.php b/include/feedutils.php
index 217da8188..62fa4849a 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -1662,8 +1662,6 @@ function handle_feed($uid, $abook_id, $url) {
/**
* @brief Return a XML tag with author information.
*
- * @hooks \b atom_author Possibility to add further tags to returned XML string
- * * \e string The created XML tag as a string without closing tag
* @param string $tag The XML tag to create
* @param string $nick preferred username
* @param string $name displayed name of the author
@@ -1672,7 +1670,7 @@ function handle_feed($uid, $abook_id, $url) {
* @param int $w image width
* @param string $type profile photo mime type
* @param string $photo Fully qualified URL to a profile/avator photo
- * @return string
+ * @return string XML tag
*/
function atom_author($tag, $nick, $name, $uri, $h, $w, $type, $photo) {
$o = '';
@@ -1695,6 +1693,11 @@ function atom_author($tag, $nick, $name, $uri, $h, $w, $type, $photo) {
$o .= ' <poco:preferredUsername>' . $nick . '</poco:preferredUsername>' . "\r\n";
$o .= ' <poco:displayName>' . $name . '</poco:displayName>' . "\r\n";
+ /**
+ * @hooks atom_author
+ * Possibility to add further tags to returned XML string.
+ * * \e string The created XML tag as a string without closing tag
+ */
call_hooks('atom_author', $o);
$o .= "</$tag>\r\n";
@@ -1703,17 +1706,23 @@ function atom_author($tag, $nick, $name, $uri, $h, $w, $type, $photo) {
}
-function atom_render_author($tag,$xchan) {
+/**
+ * @brief Return an atom tag with author information from an xchan.
+ *
+ * @param string $tag
+ * @param array $xchan
+ * @return string
+ */
+function atom_render_author($tag, $xchan) {
-
- $nick = xmlify(substr($xchan['xchan_addr'],0,strpos($xchan['xchan_addr'],'@')));
+ $nick = xmlify(substr($xchan['xchan_addr'], 0, strpos($xchan['xchan_addr'], '@')));
$id = xmlify($xchan['xchan_url']);
$name = xmlify($xchan['xchan_name']);
$photo = xmlify($xchan['xchan_photo_l']);
$type = xmlify($xchan['xchan_photo_mimetype']);
$w = $h = 300;
- $o .= "<$tag>\r\n";
+ $o = "<$tag>\r\n";
$o .= " <as:object-type>http://activitystrea.ms/schema/1.0/person</as:object-type>\r\n";
$o .= " <id>$id</id>\r\n";
$o .= " <name>$nick</name>\r\n";
@@ -1724,13 +1733,16 @@ function atom_render_author($tag,$xchan) {
$o .= ' <poco:preferredUsername>' . $nick . '</poco:preferredUsername>' . "\r\n";
$o .= ' <poco:displayName>' . $name . '</poco:displayName>' . "\r\n";
+ /**
+ * @hooks atom_render_author
+ * Possibility to add further tags to returned XML string.
+ * * \e string The created XML tag as a string without closing tag
+ */
call_hooks('atom_render_author', $o);
$o .= "</$tag>\r\n";
return $o;
-
-
}
function compat_photos_list($s) {
diff --git a/tests/unit/Access/AccessListTest.php b/tests/unit/Access/AccessListTest.php
index 3dbe5cd65..dbc19fabb 100644
--- a/tests/unit/Access/AccessListTest.php
+++ b/tests/unit/Access/AccessListTest.php
@@ -121,7 +121,9 @@ class AccessListTest extends UnitTestCase {
/**
* set_from_array() calls some other functions, too which are not yet unit tested.
- * @uses ::perms2str()
+ * @uses ::perms2str
+ * @uses ::sanitise_acl
+ * @uses ::notags
*/
public function testSetFromArray() {
// array
diff --git a/tests/unit/Access/PermissionsTest.php b/tests/unit/Access/PermissionsTest.php
index 93c641fb1..73d0e7827 100644
--- a/tests/unit/Access/PermissionsTest.php
+++ b/tests/unit/Access/PermissionsTest.php
@@ -57,7 +57,7 @@ class PermissionsTest extends UnitTestCase {
[],
['perm1' => 0, 'perm2' => 0]
],
- 'valild' => [
+ 'valid' => [
[['perm1' => 1]],
['perm1' => 1, 'perm2' => 0]
]
@@ -145,4 +145,4 @@ class PermissionsTest extends UnitTestCase {
]
];
}
-} \ No newline at end of file
+}
diff --git a/tests/unit/includes/FeedutilsTest.php b/tests/unit/includes/FeedutilsTest.php
index d27df4939..e9826a73d 100644
--- a/tests/unit/includes/FeedutilsTest.php
+++ b/tests/unit/includes/FeedutilsTest.php
@@ -57,4 +57,33 @@ class FeedutilsTest extends UnitTestCase {
$this->assertXmlStringEqualsXmlString($a, atom_author('tag', 'nick', 'name', 'uri', 72, 72, 'png', 'http://photourl'));
}
+
+ /**
+ * @uses ::xmlify
+ */
+ public function test_atom_render_author() {
+ $xchan = [
+ 'xchan_addr' => 'chan@hub',
+ 'xchan_url' => 'http://hub',
+ 'xchan_name' => 'Chan',
+ 'xchan_photo_l' => 'http://hub/img',
+ 'xchan_photo_mimetype' => 'mimetype'
+ ];
+ // There is no input validation in atom_render_author
+ //$this->assertEquals('', atom_render_author('', $xchan));
+
+ $a = '<tag>
+ <as:object-type>http://activitystrea.ms/schema/1.0/person</as:object-type>
+ <id>http://hub</id>
+ <name>chan</name>
+ <uri>http://hub</uri>
+ <link rel="alternate" type="text/html" href="http://hub" />
+ <link rel="photo" type="mimetype" media:width="300" media:height="300" href="http://hub/img" />
+ <link rel="avatar" type="mimetype" media:width="300" media:height="300" href="http://hub/img" />
+ <poco:preferredUsername>chan</poco:preferredUsername>
+ <poco:displayName>Chan</poco:displayName>
+</tag>';
+
+ $this->assertXmlStringEqualsXmlString($a, atom_render_author('tag', $xchan));
+ }
}
diff --git a/tests/unit/includes/TextTest.php b/tests/unit/includes/TextTest.php
index acc490001..97fa64895 100644
--- a/tests/unit/includes/TextTest.php
+++ b/tests/unit/includes/TextTest.php
@@ -5,7 +5,7 @@ namespace Zotlabs\Tests\Unit\includes;
use Zotlabs\Tests\Unit\UnitTestCase;
/**
- * @brief Unit Test case for include/texter.php file.
+ * @brief Unit Test case for include/text.php file.
*
* @author ken restivo
*/
@@ -79,4 +79,42 @@ empty line above';
$this->assertEquals('<div>invalid position removed</div>', purify_html('<div style="top:10p">invalid position removed</div>', true));
}
+ /**
+ * @dataProvider notagsProvider
+ */
+ public function testNotags($string, $expected) {
+ $this->assertEquals($expected, notags($string));
+ }
+ public function notagsProvider() {
+ return [
+ 'empty string' => ['', ''],
+ 'simple tag' => ['<value>', '[value]'],
+ 'tag pair' => ['<b>text</b>', '[b]text[/b]'],
+ 'double angle bracket' => ['<<value', '[[value'],
+ 'HTML entity &gt;' => ['&gt;', '&gt;']
+ ];
+ }
+
+ /**
+ * @dataProvider sanitise_aclProvider
+ */
+ public function testSanitise_acl($string, $expected) {
+ sanitise_acl($string);
+ $this->assertEquals($expected, $string);
+ }
+ public function sanitise_aclProvider() {
+ return [
+ 'text' => ['value', '<value>'],
+ 'text with angle bracket' => ['<value>', '<[value]>'],
+ 'comma separated acls' => ['value1,value2', '<value1,value2>']
+ ];
+ }
+
+ public function testUnsetSanitise_acl() {
+ $empty = '';
+ sanitise_acl($empty);
+ $this->assertTrue(isset($empty)); // unset() not working? Would expect false
+ $this->assertEmpty($empty);
+ }
+
}