diff --git a/core/composer.json b/core/composer.json index c975dc9..6fd5005 100644 --- a/core/composer.json +++ b/core/composer.json @@ -23,7 +23,7 @@ "guzzlehttp/guzzle": "~5.0", "symfony-cmf/routing": "1.3.*", "easyrdf/easyrdf": "0.9.*", - "phpunit/phpunit": "4.4.*", + "phpunit/phpunit": "4.6.*", "zendframework/zend-feed": "2.3.*", "mikey179/vfsStream": "1.*", "stack/builder": "1.0.*", diff --git a/core/composer.lock b/core/composer.lock index b031a3c..30022e8 100644 --- a/core/composer.lock +++ b/core/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "377cea36943eae1762c885ef742bc320", + "hash": "da33d878912ba37f5a06f917d3b1a1f2", "packages": [ { "name": "behat/mink", @@ -1044,6 +1044,115 @@ "time": "2014-09-14 10:18:53" }, { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" + }, + { + "name": "phpspec/prophecy", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", + "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2015-03-27 19:31:25" + }, + { "name": "phpunit/php-code-coverage", "version": "2.0.11", "source": { @@ -1110,31 +1219,33 @@ }, { "name": "phpunit/php-file-iterator", - "version": "1.3.4", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb", + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, "autoload": { "classmap": [ - "File/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -1151,7 +1262,7 @@ "filesystem", "iterator" ], - "time": "2013-10-10 15:34:57" + "time": "2015-04-02 05:19:05" }, { "name": "phpunit/php-text-template", @@ -1243,16 +1354,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" + "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74", + "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74", "shasum": "" }, "require": { @@ -1265,7 +1376,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1288,20 +1399,20 @@ "keywords": [ "tokenizer" ], - "time": "2014-08-31 06:12:13" + "time": "2015-01-17 09:51:32" }, { "name": "phpunit/phpunit", - "version": "4.4.2", + "version": "4.6.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e90575c2bb86290d57a262862dab1da125431576" + "reference": "08b2aacdd8433abbba468f995d6d64b76a7a62ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e90575c2bb86290d57a262862dab1da125431576", - "reference": "e90575c2bb86290d57a262862dab1da125431576", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/08b2aacdd8433abbba468f995d6d64b76a7a62ec", + "reference": "08b2aacdd8433abbba468f995d6d64b76a7a62ec", "shasum": "" }, "require": { @@ -1311,18 +1422,19 @@ "ext-reflection": "*", "ext-spl": "*", "php": ">=5.3.3", - "phpunit/php-code-coverage": "~2.0", - "phpunit/php-file-iterator": "~1.3.2", + "phpspec/prophecy": "~1.3,>=1.3.1", + "phpunit/php-code-coverage": "~2.0,>=2.0.11", + "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", + "phpunit/php-timer": "~1.0", "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.0", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.1", - "sebastian/exporter": "~1.0", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.2", + "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" + "symfony/yaml": "~2.1|~3.0" }, "suggest": { "phpunit/php-invoker": "~1.1" @@ -1333,12 +1445,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4.x-dev" + "dev-master": "4.6.x-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1359,29 +1474,29 @@ "testing", "xunit" ], - "time": "2015-01-17 11:24:41" + "time": "2015-04-03 13:46:59" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.0", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "c63d2367247365f688544f0d500af90a11a44c65" + "reference": "74ffb87f527f24616f72460e54b595f508dccb5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c63d2367247365f688544f0d500af90a11a44c65", - "reference": "c63d2367247365f688544f0d500af90a11a44c65", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c", + "reference": "74ffb87f527f24616f72460e54b595f508dccb5c", "shasum": "" }, "require": { - "doctrine/instantiator": "~1.0,>=1.0.1", + "doctrine/instantiator": "~1.0,>=1.0.2", "php": ">=5.3.3", "phpunit/php-text-template": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": "~4.4" }, "suggest": { "ext-soap": "*" @@ -1414,7 +1529,7 @@ "mock", "xunit" ], - "time": "2014-10-03 05:12:11" + "time": "2015-04-02 05:36:41" }, { "name": "psr/log", @@ -1548,30 +1663,30 @@ }, { "name": "sebastian/comparator", - "version": "1.0.1", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef" + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", - "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", "shasum": "" }, "require": { "php": ">=5.3.3", - "sebastian/diff": "~1.1", - "sebastian/exporter": "~1.0" + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.1" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -1608,20 +1723,20 @@ "compare", "equality" ], - "time": "2014-05-11 23:00:21" + "time": "2015-01-29 16:28:08" }, { "name": "sebastian/diff", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "5843509fed39dee4b356a306401e9dd1a931fec7" + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5843509fed39dee4b356a306401e9dd1a931fec7", - "reference": "5843509fed39dee4b356a306401e9dd1a931fec7", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", "shasum": "" }, "require": { @@ -1633,7 +1748,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1660,32 +1775,32 @@ "keywords": [ "diff" ], - "time": "2014-08-15 10:29:00" + "time": "2015-02-22 15:13:53" }, { "name": "sebastian/environment", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d" + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0d9bf79554d2a999da194a60416c15cf461eb67d", - "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -1710,32 +1825,33 @@ "environment", "hhvm" ], - "time": "2014-10-22 06:38:05" + "time": "2015-01-01 10:01:08" }, { "name": "sebastian/exporter", - "version": "1.0.2", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0" + "reference": "84839970d05254c73cde183a721c7af13aede943" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", + "reference": "84839970d05254c73cde183a721c7af13aede943", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -1775,7 +1891,7 @@ "export", "exporter" ], - "time": "2014-09-10 00:51:36" + "time": "2015-01-27 07:23:06" }, { "name": "sebastian/global-state", @@ -1829,17 +1945,70 @@ "time": "2014-10-06 09:23:50" }, { + "name": "sebastian/recursion-context", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-01-24 09:48:32" + }, + { "name": "sebastian/version", - "version": "1.0.3", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" + "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", + "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", "shasum": "" }, "type": "library", @@ -1861,7 +2030,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2014-03-07 15:35:33" + "time": "2015-02-24 06:35:25" }, { "name": "stack/builder", diff --git a/core/vendor/composer/autoload_classmap.php b/core/vendor/composer/autoload_classmap.php index 1d32818..65e24f5 100644 --- a/core/vendor/composer/autoload_classmap.php +++ b/core/vendor/composer/autoload_classmap.php @@ -12,9 +12,9 @@ 'Drupal\\Core\\DrupalKernel' => $baseDir . '/lib/Drupal/Core/DrupalKernel.php', 'Drupal\\Core\\DrupalKernelInterface' => $baseDir . '/lib/Drupal/Core/DrupalKernelInterface.php', 'Drupal\\Core\\Site\\Settings' => $baseDir . '/lib/Drupal/Core/Site/Settings.php', - 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/File/Iterator.php', - 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/File/Iterator/Facade.php', - 'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/File/Iterator/Factory.php', + 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', + 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php', + 'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php', 'PHPUnit_Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', 'PHPUnit_Extensions_GroupTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', 'PHPUnit_Extensions_PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', @@ -313,6 +313,9 @@ 'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_CP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_OP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', @@ -355,6 +358,7 @@ 'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SHAPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', @@ -372,6 +376,9 @@ 'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', @@ -406,14 +413,15 @@ 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php', 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php', 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php', - 'SebastianBergmann\\Exporter\\Context' => $vendorDir . '/sebastian/exporter/src/Context.php', - 'SebastianBergmann\\Exporter\\Exception' => $vendorDir . '/sebastian/exporter/src/Exception.php', 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php', 'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php', 'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/Exception.php', 'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php', 'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/RuntimeException.php', 'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php', + 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php', + 'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php', + 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php', 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', 'SessionHandlerInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php', 'Symfony\\Component\\HttpFoundation\\FileBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php', diff --git a/core/vendor/composer/autoload_files.php b/core/vendor/composer/autoload_files.php index 853f9a0..2f4d193 100644 --- a/core/vendor/composer/autoload_files.php +++ b/core/vendor/composer/autoload_files.php @@ -6,6 +6,7 @@ $baseDir = dirname($vendorDir); return array( + $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php', $vendorDir . '/react/promise/src/functions_include.php', $baseDir . '/lib/Drupal.php', ); diff --git a/core/vendor/composer/autoload_namespaces.php b/core/vendor/composer/autoload_namespaces.php index 136a6c1..f19117e 100644 --- a/core/vendor/composer/autoload_namespaces.php +++ b/core/vendor/composer/autoload_namespaces.php @@ -6,6 +6,7 @@ $baseDir = dirname($vendorDir); return array( + 'phpDocumentor' => array($vendorDir . '/phpdocumentor/reflection-docblock/src'), 'org\\bovigo\\vfs\\' => array($vendorDir . '/mikey179/vfsStream/src/main/php'), 'Zend\\Stdlib\\' => array($vendorDir . '/zendframework/zend-stdlib'), 'Zend\\Feed\\' => array($vendorDir . '/zendframework/zend-feed'), @@ -28,6 +29,7 @@ 'Symfony\\Component\\BrowserKit\\' => array($vendorDir . '/symfony/browser-kit'), 'Stack' => array($vendorDir . '/stack/builder/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log'), + 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'), 'Gliph' => array($vendorDir . '/sdboyer/gliph/src'), 'Egulias\\' => array($vendorDir . '/egulias/email-validator/src'), 'EasyRdf_' => array($vendorDir . '/easyrdf/easyrdf/lib'), diff --git a/core/vendor/composer/include_paths.php b/core/vendor/composer/include_paths.php index 2cc5bcc..7da94df 100644 --- a/core/vendor/composer/include_paths.php +++ b/core/vendor/composer/include_paths.php @@ -8,6 +8,5 @@ return array( $vendorDir . '/phpunit/php-text-template', $vendorDir . '/phpunit/php-timer', - $vendorDir . '/phpunit/php-file-iterator', $vendorDir . '/phpunit/php-code-coverage', ); diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json index 1ef65fc..cdc1e00 100644 --- a/core/vendor/composer/installed.json +++ b/core/vendor/composer/installed.json @@ -422,281 +422,6 @@ "homepage": "http://vfs.bovigo.org/" }, { - "name": "phpunit/php-token-stream", - "version": "1.3.0", - "version_normalized": "1.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2014-08-31 06:12:13", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ] - }, - { - "name": "sebastian/version", - "version": "1.0.3", - "version_normalized": "1.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "shasum": "" - }, - "time": "2014-03-07 15:35:33", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version" - }, - { - "name": "sebastian/exporter", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2014-09-10 00:51:36", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ] - }, - { - "name": "sebastian/diff", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "5843509fed39dee4b356a306401e9dd1a931fec7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5843509fed39dee4b356a306401e9dd1a931fec7", - "reference": "5843509fed39dee4b356a306401e9dd1a931fec7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2014-08-15 10:29:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ] - }, - { - "name": "sebastian/comparator", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", - "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.1", - "sebastian/exporter": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.1" - }, - "time": "2014-05-11 23:00:21", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ] - }, - { "name": "phpunit/php-text-template", "version": "1.2.0", "version_normalized": "1.2.0.0", @@ -845,65 +570,18 @@ ] }, { - "name": "phpunit/php-file-iterator", - "version": "1.3.4", - "version_normalized": "1.3.4.0", + "name": "phpunit/php-code-coverage", + "version": "2.0.11", + "version_normalized": "2.0.11.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-10-10 15:34:57", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "File/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ] - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.0.11", - "version_normalized": "2.0.11.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53603b3c995f5aab6b59c8e08c3a663d2cc810b7", - "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53603b3c995f5aab6b59c8e08c3a663d2cc810b7", + "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7", "shasum": "" }, "require": { @@ -1271,58 +949,6 @@ ] }, { - "name": "sebastian/environment", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0d9bf79554d2a999da194a60416c15cf461eb67d", - "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.3" - }, - "time": "2014-10-22 06:38:05", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ] - }, - { "name": "easyrdf/easyrdf", "version": "0.9.0", "version_normalized": "0.9.0.0", @@ -1596,79 +1222,6 @@ ] }, { - "name": "phpunit/phpunit", - "version": "4.4.2", - "version_normalized": "4.4.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e90575c2bb86290d57a262862dab1da125431576" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e90575c2bb86290d57a262862dab1da125431576", - "reference": "e90575c2bb86290d57a262862dab1da125431576", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpunit/php-code-coverage": "~2.0", - "phpunit/php-file-iterator": "~1.3.2", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.0", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.1", - "sebastian/exporter": "~1.0", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "time": "2015-01-17 11:24:41", - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ] - }, - { "name": "doctrine/common", "version": "v2.4.2", "version_normalized": "2.4.2.0", @@ -1749,63 +1302,6 @@ ] }, { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.0", - "version_normalized": "2.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "c63d2367247365f688544f0d500af90a11a44c65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c63d2367247365f688544f0d500af90a11a44c65", - "reference": "c63d2367247365f688544f0d500af90a11a44c65", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "~1.0,>=1.0.1", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.3" - }, - "suggest": { - "ext-soap": "*" - }, - "time": "2014-10-03 05:12:11", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ] - }, - { "name": "behat/mink", "version": "v1.6.1", "version_normalized": "1.6.1.0", @@ -2832,21 +2328,702 @@ "symfony/yaml": "~2.2" }, "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "time": "2015-03-30 15:54:10", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Symfony\\Component\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Translation Component", + "homepage": "http://symfony.com" + }, + { + "name": "symfony/validator", + "version": "v2.6.6", + "version_normalized": "2.6.6.0", + "target-dir": "Symfony/Component/Validator", + "source": { + "type": "git", + "url": "https://github.com/symfony/Validator.git", + "reference": "85d9b42fe71bf88e7a1e5dec2094605dc9fbff28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Validator/zipball/85d9b42fe71bf88e7a1e5dec2094605dc9fbff28", + "reference": "85d9b42fe71bf88e7a1e5dec2094605dc9fbff28", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/translation": "~2.0,>=2.0.5" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "doctrine/common": "~2.3", + "egulias/email-validator": "~1.2,>=1.2.1", + "symfony/config": "~2.2", + "symfony/expression-language": "~2.4", + "symfony/http-foundation": "~2.1", + "symfony/intl": "~2.3", + "symfony/phpunit-bridge": "~2.7", + "symfony/property-access": "~2.3", + "symfony/yaml": "~2.0,>=2.0.5" + }, + "suggest": { + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "egulias/email-validator": "Strict (RFC compliant) email validation", + "symfony/config": "", + "symfony/expression-language": "For using the 2.4 Expression validator", + "symfony/http-foundation": "", + "symfony/intl": "", + "symfony/property-access": "For using the 2.4 Validator API", + "symfony/yaml": "" + }, + "time": "2015-03-30 15:54:10", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Symfony\\Component\\Validator\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Validator Component", + "homepage": "http://symfony.com" + }, + { + "name": "symfony/process", + "version": "v2.6.6", + "version_normalized": "2.6.6.0", + "target-dir": "Symfony/Component/Process", + "source": { + "type": "git", + "url": "https://github.com/symfony/Process.git", + "reference": "a8bebaec1a9dc6cde53e0250e32917579b0be552" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Process/zipball/a8bebaec1a9dc6cde53e0250e32917579b0be552", + "reference": "a8bebaec1a9dc6cde53e0250e32917579b0be552", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "time": "2015-03-30 15:54:10", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Symfony\\Component\\Process\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Process Component", + "homepage": "http://symfony.com" + }, + { + "name": "symfony/yaml", + "version": "v2.6.6", + "version_normalized": "2.6.6.0", + "target-dir": "Symfony/Component/Yaml", + "source": { + "type": "git", + "url": "https://github.com/symfony/Yaml.git", + "reference": "174f009ed36379a801109955fc5a71a49fe62dd4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/174f009ed36379a801109955fc5a71a49fe62dd4", + "reference": "174f009ed36379a801109955fc5a71a49fe62dd4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "time": "2015-03-30 15:54:10", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Symfony\\Component\\Yaml\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Yaml Component", + "homepage": "http://symfony.com" + }, + { + "name": "symfony/dom-crawler", + "version": "v2.6.6", + "version_normalized": "2.6.6.0", + "target-dir": "Symfony/Component/DomCrawler", + "source": { + "type": "git", + "url": "https://github.com/symfony/DomCrawler.git", + "reference": "8897ebf39c7dfb752a5494fa301845a3fbb9e53d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/8897ebf39c7dfb752a5494fa301845a3fbb9e53d", + "reference": "8897ebf39c7dfb752a5494fa301845a3fbb9e53d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/css-selector": "~2.3", + "symfony/phpunit-bridge": "~2.7" + }, + "suggest": { + "symfony/css-selector": "" + }, + "time": "2015-03-30 15:54:10", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Symfony\\Component\\DomCrawler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "http://symfony.com" + }, + { + "name": "symfony/browser-kit", + "version": "v2.6.6", + "version_normalized": "2.6.6.0", + "target-dir": "Symfony/Component/BrowserKit", + "source": { + "type": "git", + "url": "https://github.com/symfony/BrowserKit.git", + "reference": "f21189b0eccbe56528515858ca1d5089a741692f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/f21189b0eccbe56528515858ca1d5089a741692f", + "reference": "f21189b0eccbe56528515858ca1d5089a741692f", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/dom-crawler": "~2.0,>=2.0.5" + }, + "require-dev": { + "symfony/css-selector": "~2.0,>=2.0.5", + "symfony/phpunit-bridge": "~2.7", + "symfony/process": "~2.0,>=2.0.5" + }, + "suggest": { + "symfony/process": "" + }, + "time": "2015-03-30 15:54:10", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Symfony\\Component\\BrowserKit\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony BrowserKit Component", + "homepage": "http://symfony.com" + }, + { + "name": "sebastian/version", + "version": "1.0.5", + "version_normalized": "1.0.5.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", + "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", + "shasum": "" + }, + "time": "2015-02-24 06:35:25", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "time": "2015-01-24 09:48:32", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context" + }, + { + "name": "sebastian/exporter", + "version": "1.2.0", + "version_normalized": "1.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "84839970d05254c73cde183a721c7af13aede943" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", + "reference": "84839970d05254c73cde183a721c7af13aede943", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "time": "2015-01-27 07:23:06", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ] + }, + { + "name": "sebastian/environment", + "version": "1.2.2", + "version_normalized": "1.2.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "time": "2015-01-01 10:01:08", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ] + }, + { + "name": "sebastian/diff", + "version": "1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "time": "2015-02-22 15:13:53", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "http://www.github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ] + }, + { + "name": "sebastian/comparator", + "version": "1.1.1", + "version_normalized": "1.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "time": "2015-01-29 16:28:08", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ] + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "version_normalized": "2.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" }, - "time": "2015-03-30 15:54:10", + "time": "2015-02-03 12:10:50", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.0.x-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Translation\\": "" + "phpDocumentor": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -2855,72 +3032,45 @@ ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" } - ], - "description": "Symfony Translation Component", - "homepage": "http://symfony.com" + ] }, { - "name": "symfony/validator", - "version": "v2.6.6", - "version_normalized": "2.6.6.0", - "target-dir": "Symfony/Component/Validator", + "name": "phpspec/prophecy", + "version": "1.4.0", + "version_normalized": "1.4.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/Validator.git", - "reference": "85d9b42fe71bf88e7a1e5dec2094605dc9fbff28" + "url": "https://github.com/phpspec/prophecy.git", + "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Validator/zipball/85d9b42fe71bf88e7a1e5dec2094605dc9fbff28", - "reference": "85d9b42fe71bf88e7a1e5dec2094605dc9fbff28", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", + "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/translation": "~2.0,>=2.0.5" + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" }, "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.0", - "doctrine/common": "~2.3", - "egulias/email-validator": "~1.2,>=1.2.1", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/http-foundation": "~2.1", - "symfony/intl": "~2.3", - "symfony/phpunit-bridge": "~2.7", - "symfony/property-access": "~2.3", - "symfony/yaml": "~2.0,>=2.0.5" - }, - "suggest": { - "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", - "doctrine/cache": "For using the default cached annotation reader and metadata cache.", - "egulias/email-validator": "Strict (RFC compliant) email validation", - "symfony/config": "", - "symfony/expression-language": "For using the 2.4 Expression validator", - "symfony/http-foundation": "", - "symfony/intl": "", - "symfony/property-access": "For using the 2.4 Validator API", - "symfony/yaml": "" + "phpspec/phpspec": "~2.0" }, - "time": "2015-03-30 15:54:10", + "time": "2015-03-27 19:31:25", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "1.4.x-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Validator\\": "" + "Prophecy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2929,233 +3079,258 @@ ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" }, { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" } ], - "description": "Symfony Validator Component", - "homepage": "http://symfony.com" + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ] }, { - "name": "symfony/process", - "version": "v2.6.6", - "version_normalized": "2.6.6.0", - "target-dir": "Symfony/Component/Process", + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.1", + "version_normalized": "2.3.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "a8bebaec1a9dc6cde53e0250e32917579b0be552" + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "74ffb87f527f24616f72460e54b595f508dccb5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/a8bebaec1a9dc6cde53e0250e32917579b0be552", - "reference": "a8bebaec1a9dc6cde53e0250e32917579b0be552", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c", + "reference": "74ffb87f527f24616f72460e54b595f508dccb5c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "doctrine/instantiator": "~1.0,>=1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "phpunit/phpunit": "~4.4" }, - "time": "2015-03-30 15:54:10", + "suggest": { + "ext-soap": "*" + }, + "time": "2015-04-02 05:36:41", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.3.x-dev" } }, "installation-source": "dist", "autoload": { - "psr-0": { - "Symfony\\Component\\Process\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" } ], - "description": "Symfony Process Component", - "homepage": "http://symfony.com" + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ] }, { - "name": "symfony/yaml", - "version": "v2.6.6", - "version_normalized": "2.6.6.0", - "target-dir": "Symfony/Component/Yaml", + "name": "phpunit/php-token-stream", + "version": "1.4.0", + "version_normalized": "1.4.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "174f009ed36379a801109955fc5a71a49fe62dd4" + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/174f009ed36379a801109955fc5a71a49fe62dd4", - "reference": "174f009ed36379a801109955fc5a71a49fe62dd4", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74", + "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74", "shasum": "" }, "require": { + "ext-tokenizer": "*", "php": ">=5.3.3" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "phpunit/phpunit": "~4.2" }, - "time": "2015-03-30 15:54:10", + "time": "2015-01-17 09:51:32", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "1.4-dev" } }, "installation-source": "dist", "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony Yaml Component", - "homepage": "http://symfony.com" + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ] }, { - "name": "symfony/dom-crawler", - "version": "v2.6.6", - "version_normalized": "2.6.6.0", - "target-dir": "Symfony/Component/DomCrawler", + "name": "phpunit/php-file-iterator", + "version": "1.4.0", + "version_normalized": "1.4.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/DomCrawler.git", - "reference": "8897ebf39c7dfb752a5494fa301845a3fbb9e53d" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/8897ebf39c7dfb752a5494fa301845a3fbb9e53d", - "reference": "8897ebf39c7dfb752a5494fa301845a3fbb9e53d", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb", + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/css-selector": "~2.3", - "symfony/phpunit-bridge": "~2.7" - }, - "suggest": { - "symfony/css-selector": "" - }, - "time": "2015-03-30 15:54:10", + "time": "2015-04-02 05:19:05", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "1.4.x-dev" } }, "installation-source": "dist", "autoload": { - "psr-0": { - "Symfony\\Component\\DomCrawler\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" } ], - "description": "Symfony DomCrawler Component", - "homepage": "http://symfony.com" + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ] }, { - "name": "symfony/browser-kit", - "version": "v2.6.6", - "version_normalized": "2.6.6.0", - "target-dir": "Symfony/Component/BrowserKit", + "name": "phpunit/phpunit", + "version": "4.6.1", + "version_normalized": "4.6.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/BrowserKit.git", - "reference": "f21189b0eccbe56528515858ca1d5089a741692f" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "08b2aacdd8433abbba468f995d6d64b76a7a62ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/f21189b0eccbe56528515858ca1d5089a741692f", - "reference": "f21189b0eccbe56528515858ca1d5089a741692f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/08b2aacdd8433abbba468f995d6d64b76a7a62ec", + "reference": "08b2aacdd8433abbba468f995d6d64b76a7a62ec", "shasum": "" }, "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", "php": ">=5.3.3", - "symfony/dom-crawler": "~2.0,>=2.0.5" - }, - "require-dev": { - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.0,>=2.0.5" + "phpspec/prophecy": "~1.3,>=1.3.1", + "phpunit/php-code-coverage": "~2.0,>=2.0.11", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "~1.0", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.2", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" }, "suggest": { - "symfony/process": "" + "phpunit/php-invoker": "~1.1" }, - "time": "2015-03-30 15:54:10", + "time": "2015-04-03 13:46:59", + "bin": [ + "phpunit" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "4.6.x-dev" } }, "installation-source": "dist", "autoload": { - "psr-0": { - "Symfony\\Component\\BrowserKit\\": "" - } + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony BrowserKit Component", - "homepage": "http://symfony.com" + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ] } ] diff --git a/core/vendor/phpdocumentor/reflection-docblock/.gitignore b/core/vendor/phpdocumentor/reflection-docblock/.gitignore new file mode 100644 index 0000000..3ce5adb --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/.gitignore @@ -0,0 +1,2 @@ +.idea +vendor diff --git a/core/vendor/phpdocumentor/reflection-docblock/.travis.yml b/core/vendor/phpdocumentor/reflection-docblock/.travis.yml new file mode 100644 index 0000000..eef782c --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/.travis.yml @@ -0,0 +1,32 @@ +language: php +php: + - 5.3.3 + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + - hhvm-nightly + +matrix: + allow_failures: + - php: hhvm + - php: hhvm-nightly + +script: + - vendor/bin/phpunit + +before_script: + - sudo apt-get -qq update > /dev/null + - phpenv rehash > /dev/null + - composer selfupdate --quiet + - composer install --no-interaction --prefer-source --dev + - vendor/bin/phpunit + - composer update --no-interaction --prefer-source --dev + +notifications: + irc: "irc.freenode.org#phpdocumentor" + email: + - mike.vanriel@naenius.com + - ashnazg@php.net + - boen.robot@gmail.com diff --git a/core/vendor/phpdocumentor/reflection-docblock/LICENSE b/core/vendor/phpdocumentor/reflection-docblock/LICENSE new file mode 100644 index 0000000..792e404 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010 Mike van Riel + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/core/vendor/phpdocumentor/reflection-docblock/README.md b/core/vendor/phpdocumentor/reflection-docblock/README.md new file mode 100644 index 0000000..6405d1a --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/README.md @@ -0,0 +1,57 @@ +The ReflectionDocBlock Component [![Build Status](https://secure.travis-ci.org/phpDocumentor/ReflectionDocBlock.png)](https://travis-ci.org/phpDocumentor/ReflectionDocBlock) +================================ + +Introduction +------------ + +The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser +that is 100% compatible with the [PHPDoc standard](http://phpdoc.org/docs/latest). + +With this component, a library can provide support for annotations via DocBlocks +or otherwise retrieve information that is embedded in a DocBlock. + +> **Note**: *this is a core component of phpDocumentor and is constantly being +> optimized for performance.* + +Installation +------------ + +You can install the component in the following ways: + +* Use the official Github repository (https://github.com/phpDocumentor/ReflectionDocBlock) +* Via Composer (http://packagist.org/packages/phpdocumentor/reflection-docblock) + +Usage +----- + +The ReflectionDocBlock component is designed to work in an identical fashion to +PHP's own Reflection extension (http://php.net/manual/en/book.reflection.php). + +Parsing can be initiated by instantiating the +`\phpDocumentor\Reflection\DocBlock()` class and passing it a string containing +a DocBlock (including asterisks) or by passing an object supporting the +`getDocComment()` method. + +> *Examples of objects having the `getDocComment()` method are the +> `ReflectionClass` and the `ReflectionMethod` classes of the PHP +> Reflection extension* + +Example: + + $class = new ReflectionClass('MyClass'); + $phpdoc = new \phpDocumentor\Reflection\DocBlock($class); + +or + + $docblock = <<=5.3.3" + }, + "autoload": { + "psr-0": {"phpDocumentor": ["src/"]} + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/composer.lock b/core/vendor/phpdocumentor/reflection-docblock/composer.lock new file mode 100644 index 0000000..4c6a8bb --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/composer.lock @@ -0,0 +1,827 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "ea1734d11b8c878445c2c6e58de8b85f", + "packages": [], + "packages-dev": [ + { + "name": "ocramius/instantiator", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/Instantiator.git", + "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/Instantiator/zipball/a7abbb5fc9df6e7126af741dd6c140d1a7369435", + "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435", + "shasum": "" + }, + "require": { + "ocramius/lazy-map": "1.0.*", + "php": "~5.3" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "2.0.*@ALPHA" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Instantiator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/Ocramius/Instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2014-08-14 15:10:55" + }, + { + "name": "ocramius/lazy-map", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/LazyMap.git", + "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/LazyMap/zipball/7fe3d347f5e618bcea7d39345ff83f3651d8b752", + "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "athletic/athletic": "~0.1.6", + "phpmd/phpmd": "1.5.*", + "phpunit/phpunit": ">=3.7", + "satooshi/php-coveralls": "~0.6", + "squizlabs/php_codesniffer": "1.4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "LazyMap\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/", + "role": "Developer" + } + ], + "description": "A library that provides lazy instantiation logic for a map of objects", + "homepage": "https://github.com/Ocramius/LazyMap", + "keywords": [ + "lazy", + "lazy instantiation", + "lazy loading", + "map", + "service location" + ], + "time": "2013-11-09 22:30:54" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.0.10", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "6d196af48e8c100a3ae881940123e693da5a9217" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6d196af48e8c100a3ae881940123e693da5a9217", + "reference": "6d196af48e8c100a3ae881940123e693da5a9217", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3.1", + "phpunit/php-text-template": "~1.2.0", + "phpunit/php-token-stream": "~1.2.2", + "sebastian/environment": "~1.0.0", + "sebastian/version": "~1.0.3" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4.0.14" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2014-08-06 06:39:42" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", + "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "File/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2013-10-10 15:34:57" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "Text/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2014-01-30 17:20:04" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", + "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2013-08-02 07:42:54" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", + "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2014-03-03 05:10:30" + }, + { + "name": "phpunit/phpunit", + "version": "4.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a33fa68ece9f8c68589bfc2da8d2794e27b820bc", + "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpunit/php-code-coverage": "~2.0", + "phpunit/php-file-iterator": "~1.3.1", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "~1.0.2", + "phpunit/phpunit-mock-objects": "~2.2", + "sebastian/comparator": "~1.0", + "sebastian/diff": "~1.1", + "sebastian/environment": "~1.0", + "sebastian/exporter": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "", + "../../symfony/yaml/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2014-08-18 05:12:30" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "42e589e08bc86e3e9bdf20d385e948347788505b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/42e589e08bc86e3e9bdf20d385e948347788505b", + "reference": "42e589e08bc86e3e9bdf20d385e948347788505b", + "shasum": "" + }, + "require": { + "ocramius/instantiator": "~1.0", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "4.2.*@dev" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2014-08-02 13:50:58" + }, + { + "name": "sebastian/comparator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2", + "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.1", + "sebastian/exporter": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2014-05-02 07:05:58" + }, + { + "name": "sebastian/diff", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d", + "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "http://www.github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2013-08-03 16:46:33" + }, + { + "name": "sebastian/environment", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/79517609ec01139cd7e9fded0dd7ce08c952ef6a", + "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2014-02-18 16:17:19" + }, + { + "name": "sebastian/exporter", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529", + "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net", + "role": "Lead" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2014-02-16 08:26:31" + }, + { + "name": "sebastian/version", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", + "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2014-03-07 15:35:33" + }, + { + "name": "symfony/yaml", + "version": "v2.5.3", + "target-dir": "Symfony/Component/Yaml", + "source": { + "type": "git", + "url": "https://github.com/symfony/Yaml.git", + "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", + "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Yaml\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Yaml Component", + "homepage": "http://symfony.com", + "time": "2014-08-05 09:00:40" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "platform": { + "php": ">=5.3.3" + }, + "platform-dev": [] +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist b/core/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist new file mode 100644 index 0000000..f67ad2a --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist @@ -0,0 +1,14 @@ + + + + + + ./tests/ + + + + + ./src/ + + + diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php new file mode 100644 index 0000000..02968b1 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php @@ -0,0 +1,468 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +use phpDocumentor\Reflection\DocBlock\Tag; +use phpDocumentor\Reflection\DocBlock\Context; +use phpDocumentor\Reflection\DocBlock\Location; + +/** + * Parses the DocBlock for any structure. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class DocBlock implements \Reflector +{ + /** @var string The opening line for this docblock. */ + protected $short_description = ''; + + /** + * @var DocBlock\Description The actual + * description for this docblock. + */ + protected $long_description = null; + + /** + * @var Tag[] An array containing all + * the tags in this docblock; except inline. + */ + protected $tags = array(); + + /** @var Context Information about the context of this DocBlock. */ + protected $context = null; + + /** @var Location Information about the location of this DocBlock. */ + protected $location = null; + + /** @var bool Is this DocBlock (the start of) a template? */ + protected $isTemplateStart = false; + + /** @var bool Does this DocBlock signify the end of a DocBlock template? */ + protected $isTemplateEnd = false; + + /** + * Parses the given docblock and populates the member fields. + * + * The constructor may also receive namespace information such as the + * current namespace and aliases. This information is used by some tags + * (e.g. @return, @param, etc.) to turn a relative Type into a FQCN. + * + * @param \Reflector|string $docblock A docblock comment (including + * asterisks) or reflector supporting the getDocComment method. + * @param Context $context The context in which the DocBlock + * occurs. + * @param Location $location The location within the file that this + * DocBlock occurs in. + * + * @throws \InvalidArgumentException if the given argument does not have the + * getDocComment method. + */ + public function __construct( + $docblock, + Context $context = null, + Location $location = null + ) { + if (is_object($docblock)) { + if (!method_exists($docblock, 'getDocComment')) { + throw new \InvalidArgumentException( + 'Invalid object passed; the given reflector must support ' + . 'the getDocComment method' + ); + } + + $docblock = $docblock->getDocComment(); + } + + $docblock = $this->cleanInput($docblock); + + list($templateMarker, $short, $long, $tags) = $this->splitDocBlock($docblock); + $this->isTemplateStart = $templateMarker === '#@+'; + $this->isTemplateEnd = $templateMarker === '#@-'; + $this->short_description = $short; + $this->long_description = new DocBlock\Description($long, $this); + $this->parseTags($tags); + + $this->context = $context; + $this->location = $location; + } + + /** + * Strips the asterisks from the DocBlock comment. + * + * @param string $comment String containing the comment text. + * + * @return string + */ + protected function cleanInput($comment) + { + $comment = trim( + preg_replace( + '#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u', + '$1', + $comment + ) + ); + + // reg ex above is not able to remove */ from a single line docblock + if (substr($comment, -2) == '*/') { + $comment = trim(substr($comment, 0, -2)); + } + + // normalize strings + $comment = str_replace(array("\r\n", "\r"), "\n", $comment); + + return $comment; + } + + /** + * Splits the DocBlock into a template marker, summary, description and block of tags. + * + * @param string $comment Comment to split into the sub-parts. + * + * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split. + * @author Mike van Riel for extending the regex with template marker support. + * + * @return string[] containing the template marker (if any), summary, description and a string containing the tags. + */ + protected function splitDocBlock($comment) + { + // Performance improvement cheat: if the first character is an @ then only tags are in this DocBlock. This + // method does not split tags so we return this verbatim as the fourth result (tags). This saves us the + // performance impact of running a regular expression + if (strpos($comment, '@') === 0) { + return array('', '', '', $comment); + } + + // clears all extra horizontal whitespace from the line endings to prevent parsing issues + $comment = preg_replace('/\h*$/Sum', '', $comment); + + /* + * Splits the docblock into a template marker, short description, long description and tags section + * + * - The template marker is empty, #@+ or #@- if the DocBlock starts with either of those (a newline may + * occur after it and will be stripped). + * - The short description is started from the first character until a dot is encountered followed by a + * newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing + * errors). This is optional. + * - The long description, any character until a new line is encountered followed by an @ and word + * characters (a tag). This is optional. + * - Tags; the remaining characters + * + * Big thanks to RichardJ for contributing this Regular Expression + */ + preg_match( + '/ + \A + # 1. Extract the template marker + (?:(\#\@\+|\#\@\-)\n?)? + + # 2. Extract the summary + (?: + (?! @\pL ) # The summary may not start with an @ + ( + [^\n.]+ + (?: + (?! \. \n | \n{2} ) # End summary upon a dot followed by newline or two newlines + [\n.] (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line + [^\n.]+ # Include anything else + )* + \.? + )? + ) + + # 3. Extract the description + (?: + \s* # Some form of whitespace _must_ precede a description because a summary must be there + (?! @\pL ) # The description may not start with an @ + ( + [^\n]+ + (?: \n+ + (?! [ \t]* @\pL ) # End description when an @ is found as first character on a new line + [^\n]+ # Include anything else + )* + ) + )? + + # 4. Extract the tags (anything that follows) + (\s+ [\s\S]*)? # everything that follows + /ux', + $comment, + $matches + ); + array_shift($matches); + + while (count($matches) < 4) { + $matches[] = ''; + } + + return $matches; + } + + /** + * Creates the tag objects. + * + * @param string $tags Tag block to parse. + * + * @return void + */ + protected function parseTags($tags) + { + $result = array(); + $tags = trim($tags); + if ('' !== $tags) { + if ('@' !== $tags[0]) { + throw new \LogicException( + 'A tag block started with text instead of an actual tag,' + . ' this makes the tag block invalid: ' . $tags + ); + } + foreach (explode("\n", $tags) as $tag_line) { + if (isset($tag_line[0]) && ($tag_line[0] === '@')) { + $result[] = $tag_line; + } else { + $result[count($result) - 1] .= "\n" . $tag_line; + } + } + + // create proper Tag objects + foreach ($result as $key => $tag_line) { + $result[$key] = Tag::createInstance(trim($tag_line), $this); + } + } + + $this->tags = $result; + } + + /** + * Gets the text portion of the doc block. + * + * Gets the text portion (short and long description combined) of the doc + * block. + * + * @return string The text portion of the doc block. + */ + public function getText() + { + $short = $this->getShortDescription(); + $long = $this->getLongDescription()->getContents(); + + if ($long) { + return "{$short}\n\n{$long}"; + } else { + return $short; + } + } + + /** + * Set the text portion of the doc block. + * + * Sets the text portion (short and long description combined) of the doc + * block. + * + * @param string $docblock The new text portion of the doc block. + * + * @return $this This doc block. + */ + public function setText($comment) + { + list(,$short, $long) = $this->splitDocBlock($comment); + $this->short_description = $short; + $this->long_description = new DocBlock\Description($long, $this); + return $this; + } + /** + * Returns the opening line or also known as short description. + * + * @return string + */ + public function getShortDescription() + { + return $this->short_description; + } + + /** + * Returns the full description or also known as long description. + * + * @return DocBlock\Description + */ + public function getLongDescription() + { + return $this->long_description; + } + + /** + * Returns whether this DocBlock is the start of a Template section. + * + * A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker + * (`#@+`) that is appended directly after the opening `/**` of a DocBlock. + * + * An example of such an opening is: + * + * ``` + * /**#@+ + * * My DocBlock + * * / + * ``` + * + * The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all + * elements that follow until another DocBlock is found that contains the closing marker (`#@-`). + * + * @see self::isTemplateEnd() for the check whether a closing marker was provided. + * + * @return boolean + */ + public function isTemplateStart() + { + return $this->isTemplateStart; + } + + /** + * Returns whether this DocBlock is the end of a Template section. + * + * @see self::isTemplateStart() for a more complete description of the Docblock Template functionality. + * + * @return boolean + */ + public function isTemplateEnd() + { + return $this->isTemplateEnd; + } + + /** + * Returns the current context. + * + * @return Context + */ + public function getContext() + { + return $this->context; + } + + /** + * Returns the current location. + * + * @return Location + */ + public function getLocation() + { + return $this->location; + } + + /** + * Returns the tags for this DocBlock. + * + * @return Tag[] + */ + public function getTags() + { + return $this->tags; + } + + /** + * Returns an array of tags matching the given name. If no tags are found + * an empty array is returned. + * + * @param string $name String to search by. + * + * @return Tag[] + */ + public function getTagsByName($name) + { + $result = array(); + + /** @var Tag $tag */ + foreach ($this->getTags() as $tag) { + if ($tag->getName() != $name) { + continue; + } + + $result[] = $tag; + } + + return $result; + } + + /** + * Checks if a tag of a certain type is present in this DocBlock. + * + * @param string $name Tag name to check for. + * + * @return bool + */ + public function hasTag($name) + { + /** @var Tag $tag */ + foreach ($this->getTags() as $tag) { + if ($tag->getName() == $name) { + return true; + } + } + + return false; + } + + /** + * Appends a tag at the end of the list of tags. + * + * @param Tag $tag The tag to add. + * + * @return Tag The newly added tag. + * + * @throws \LogicException When the tag belongs to a different DocBlock. + */ + public function appendTag(Tag $tag) + { + if (null === $tag->getDocBlock()) { + $tag->setDocBlock($this); + } + + if ($tag->getDocBlock() === $this) { + $this->tags[] = $tag; + } else { + throw new \LogicException( + 'This tag belongs to a different DocBlock object.' + ); + } + + return $tag; + } + + + /** + * Builds a string representation of this object. + * + * @todo determine the exact format as used by PHP Reflection and + * implement it. + * + * @return string + * @codeCoverageIgnore Not yet implemented + */ + public static function export() + { + throw new \Exception('Not yet implemented'); + } + + /** + * Returns the exported information (we should use the export static method + * BUT this throws an exception at this point). + * + * @return string + * @codeCoverageIgnore Not yet implemented + */ + public function __toString() + { + return 'Not yet implemented'; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php new file mode 100644 index 0000000..81aa83c --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php @@ -0,0 +1,154 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +/** + * The context in which a DocBlock occurs. + * + * @author Vasil Rangelov + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class Context +{ + /** @var string The current namespace. */ + protected $namespace = ''; + + /** @var array List of namespace aliases => Fully Qualified Namespace. */ + protected $namespace_aliases = array(); + + /** @var string Name of the structural element, within the namespace. */ + protected $lsen = ''; + + /** + * Cteates a new context. + * @param string $namespace The namespace where this DocBlock + * resides in. + * @param array $namespace_aliases List of namespace aliases => Fully + * Qualified Namespace. + * @param string $lsen Name of the structural element, within + * the namespace. + */ + public function __construct( + $namespace = '', + array $namespace_aliases = array(), + $lsen = '' + ) { + if (!empty($namespace)) { + $this->setNamespace($namespace); + } + $this->setNamespaceAliases($namespace_aliases); + $this->setLSEN($lsen); + } + + /** + * @return string The namespace where this DocBlock resides in. + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * @return array List of namespace aliases => Fully Qualified Namespace. + */ + public function getNamespaceAliases() + { + return $this->namespace_aliases; + } + + /** + * Returns the Local Structural Element Name. + * + * @return string Name of the structural element, within the namespace. + */ + public function getLSEN() + { + return $this->lsen; + } + + /** + * Sets a new namespace. + * + * Sets a new namespace for the context. Leading and trailing slashes are + * trimmed, and the keywords "global" and "default" are treated as aliases + * to no namespace. + * + * @param string $namespace The new namespace to set. + * + * @return $this + */ + public function setNamespace($namespace) + { + if ('global' !== $namespace + && 'default' !== $namespace + ) { + // Srip leading and trailing slash + $this->namespace = trim((string)$namespace, '\\'); + } else { + $this->namespace = ''; + } + return $this; + } + + /** + * Sets the namespace aliases, replacing all previous ones. + * + * @param array $namespace_aliases List of namespace aliases => Fully + * Qualified Namespace. + * + * @return $this + */ + public function setNamespaceAliases(array $namespace_aliases) + { + $this->namespace_aliases = array(); + foreach ($namespace_aliases as $alias => $fqnn) { + $this->setNamespaceAlias($alias, $fqnn); + } + return $this; + } + + /** + * Adds a namespace alias to the context. + * + * @param string $alias The alias name (the part after "as", or the last + * part of the Fully Qualified Namespace Name) to add. + * @param string $fqnn The Fully Qualified Namespace Name for this alias. + * Any form of leading/trailing slashes are accepted, but what will be + * stored is a name, prefixed with a slash, and no trailing slash. + * + * @return $this + */ + public function setNamespaceAlias($alias, $fqnn) + { + $this->namespace_aliases[$alias] = '\\' . trim((string)$fqnn, '\\'); + return $this; + } + + /** + * Sets a new Local Structural Element Name. + * + * Sets a new Local Structural Element Name. A local name also contains + * punctuation determining the kind of structural element (e.g. trailing "(" + * and ")" for functions and methods). + * + * @param string $lsen The new local name of a structural element. + * + * @return $this + */ + public function setLSEN($lsen) + { + $this->lsen = (string)$lsen; + return $this; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php new file mode 100644 index 0000000..d41142e --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php @@ -0,0 +1,223 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +use phpDocumentor\Reflection\DocBlock; + +/** + * Parses a Description of a DocBlock or tag. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class Description implements \Reflector +{ + /** @var string */ + protected $contents = ''; + + /** @var array The contents, as an array of strings and Tag objects. */ + protected $parsedContents = null; + + /** @var DocBlock The DocBlock which this description belongs to. */ + protected $docblock = null; + + /** + * Populates the fields of a description. + * + * @param string $content The description's conetnts. + * @param DocBlock $docblock The DocBlock which this description belongs to. + */ + public function __construct($content, DocBlock $docblock = null) + { + $this->setContent($content)->setDocBlock($docblock); + } + + /** + * Gets the text of this description. + * + * @return string + */ + public function getContents() + { + return $this->contents; + } + + /** + * Sets the text of this description. + * + * @param string $content The new text of this description. + * + * @return $this + */ + public function setContent($content) + { + $this->contents = trim($content); + + $this->parsedContents = null; + return $this; + } + + /** + * Returns the parsed text of this description. + * + * @return array An array of strings and tag objects, in the order they + * occur within the description. + */ + public function getParsedContents() + { + if (null === $this->parsedContents) { + $this->parsedContents = preg_split( + '/\{ + # "{@}" is not a valid inline tag. This ensures that + # we do not treat it as one, but treat it literally. + (?!@\}) + # We want to capture the whole tag line, but without the + # inline tag delimiters. + (\@ + # Match everything up to the next delimiter. + [^{}]* + # Nested inline tag content should not be captured, or + # it will appear in the result separately. + (?: + # Match nested inline tags. + (?: + # Because we did not catch the tag delimiters + # earlier, we must be explicit with them here. + # Notice that this also matches "{}", as a way + # to later introduce it as an escape sequence. + \{(?1)?\} + | + # Make sure we match hanging "{". + \{ + ) + # Match content after the nested inline tag. + [^{}]* + )* # If there are more inline tags, match them as well. + # We use "*" since there may not be any nested inline + # tags. + ) + \}/Sux', + $this->contents, + null, + PREG_SPLIT_DELIM_CAPTURE + ); + + $count = count($this->parsedContents); + for ($i=1; $i<$count; $i += 2) { + $this->parsedContents[$i] = Tag::createInstance( + $this->parsedContents[$i], + $this->docblock + ); + } + + //In order to allow "literal" inline tags, the otherwise invalid + //sequence "{@}" is changed to "@", and "{}" is changed to "}". + //See unit tests for examples. + for ($i=0; $i<$count; $i += 2) { + $this->parsedContents[$i] = str_replace( + array('{@}', '{}'), + array('@', '}'), + $this->parsedContents[$i] + ); + } + } + return $this->parsedContents; + } + + /** + * Return a formatted variant of the Long Description using MarkDown. + * + * @todo this should become a more intelligent piece of code where the + * configuration contains a setting what format long descriptions are. + * + * @codeCoverageIgnore Will be removed soon, in favor of adapters at + * PhpDocumentor itself that will process text in various formats. + * + * @return string + */ + public function getFormattedContents() + { + $result = $this->contents; + + // if the long description contains a plain HTML element, surround + // it with a pre element. Please note that we explicitly used str_replace + // and not preg_replace to gain performance + if (strpos($result, '') !== false) { + $result = str_replace( + array('', "\r\n", "\n", "\r", ''), + array('
', '', '', '', '
'), + $result + ); + } + + if (class_exists('Parsedown')) { + $markdown = \Parsedown::instance(); + $result = $markdown->parse($result); + } elseif (class_exists('dflydev\markdown\MarkdownExtraParser')) { + $markdown = new \dflydev\markdown\MarkdownExtraParser(); + $result = $markdown->transformMarkdown($result); + } + + return trim($result); + } + + /** + * Gets the docblock this tag belongs to. + * + * @return DocBlock The docblock this description belongs to. + */ + public function getDocBlock() + { + return $this->docblock; + } + + /** + * Sets the docblock this tag belongs to. + * + * @param DocBlock $docblock The new docblock this description belongs to. + * Setting NULL removes any association. + * + * @return $this + */ + public function setDocBlock(DocBlock $docblock = null) + { + $this->docblock = $docblock; + + return $this; + } + + /** + * Builds a string representation of this object. + * + * @todo determine the exact format as used by PHP Reflection + * and implement it. + * + * @return void + * @codeCoverageIgnore Not yet implemented + */ + public static function export() + { + throw new \Exception('Not yet implemented'); + } + + /** + * Returns the long description as a string. + * + * @return string + */ + public function __toString() + { + return $this->getContents(); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php new file mode 100644 index 0000000..966ed44 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php @@ -0,0 +1,76 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +/** + * The location a DocBlock occurs within a file. + * + * @author Vasil Rangelov + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class Location +{ + /** @var int Line where the DocBlock text starts. */ + protected $lineNumber = 0; + + /** @var int Column where the DocBlock text starts. */ + protected $columnNumber = 0; + + public function __construct( + $lineNumber = 0, + $columnNumber = 0 + ) { + $this->setLineNumber($lineNumber)->setColumnNumber($columnNumber); + } + + /** + * @return int Line where the DocBlock text starts. + */ + public function getLineNumber() + { + return $this->lineNumber; + } + + /** + * + * @param type $lineNumber + * @return $this + */ + public function setLineNumber($lineNumber) + { + $this->lineNumber = (int)$lineNumber; + + return $this; + } + + /** + * @return int Column where the DocBlock text starts. + */ + public function getColumnNumber() + { + return $this->columnNumber; + } + + /** + * + * @param int $columnNumber + * @return $this + */ + public function setColumnNumber($columnNumber) + { + $this->columnNumber = (int)$columnNumber; + + return $this; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php new file mode 100644 index 0000000..c161785 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php @@ -0,0 +1,198 @@ + + * @copyright 2013 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +use phpDocumentor\Reflection\DocBlock; + +/** + * Serializes a DocBlock instance. + * + * @author Barry vd. Heuvel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class Serializer +{ + + /** @var string The string to indent the comment with. */ + protected $indentString = ' '; + + /** @var int The number of times the indent string is repeated. */ + protected $indent = 0; + + /** @var bool Whether to indent the first line. */ + protected $isFirstLineIndented = true; + + /** @var int|null The max length of a line. */ + protected $lineLength = null; + + /** + * Create a Serializer instance. + * + * @param int $indent The number of times the indent string is + * repeated. + * @param string $indentString The string to indent the comment with. + * @param bool $indentFirstLine Whether to indent the first line. + * @param int|null $lineLength The max length of a line or NULL to + * disable line wrapping. + */ + public function __construct( + $indent = 0, + $indentString = ' ', + $indentFirstLine = true, + $lineLength = null + ) { + $this->setIndentationString($indentString); + $this->setIndent($indent); + $this->setIsFirstLineIndented($indentFirstLine); + $this->setLineLength($lineLength); + } + + /** + * Sets the string to indent comments with. + * + * @param string $indentationString The string to indent comments with. + * + * @return $this This serializer object. + */ + public function setIndentationString($indentString) + { + $this->indentString = (string)$indentString; + return $this; + } + + /** + * Gets the string to indent comments with. + * + * @return string The indent string. + */ + public function getIndentationString() + { + return $this->indentString; + } + + /** + * Sets the number of indents. + * + * @param int $indent The number of times the indent string is repeated. + * + * @return $this This serializer object. + */ + public function setIndent($indent) + { + $this->indent = (int)$indent; + return $this; + } + + /** + * Gets the number of indents. + * + * @return int The number of times the indent string is repeated. + */ + public function getIndent() + { + return $this->indent; + } + + /** + * Sets whether or not the first line should be indented. + * + * Sets whether or not the first line (the one with the "/**") should be + * indented. + * + * @param bool $indentFirstLine The new value for this setting. + * + * @return $this This serializer object. + */ + public function setIsFirstLineIndented($indentFirstLine) + { + $this->isFirstLineIndented = (bool)$indentFirstLine; + return $this; + } + + /** + * Gets whether or not the first line should be indented. + * + * @return bool Whether or not the first line should be indented. + */ + public function isFirstLineIndented() + { + return $this->isFirstLineIndented; + } + + /** + * Sets the line length. + * + * Sets the length of each line in the serialization. Content will be + * wrapped within this limit. + * + * @param int|null $lineLength The length of each line. NULL to disable line + * wrapping altogether. + * + * @return $this This serializer object. + */ + public function setLineLength($lineLength) + { + $this->lineLength = null === $lineLength ? null : (int)$lineLength; + return $this; + } + + /** + * Gets the line length. + * + * @return int|null The length of each line or NULL if line wrapping is + * disabled. + */ + public function getLineLength() + { + return $this->lineLength; + } + + /** + * Generate a DocBlock comment. + * + * @param DocBlock The DocBlock to serialize. + * + * @return string The serialized doc block. + */ + public function getDocComment(DocBlock $docblock) + { + $indent = str_repeat($this->indentString, $this->indent); + $firstIndent = $this->isFirstLineIndented ? $indent : ''; + + $text = $docblock->getText(); + if ($this->lineLength) { + //3 === strlen(' * ') + $wrapLength = $this->lineLength - strlen($indent) - 3; + $text = wordwrap($text, $wrapLength); + } + $text = str_replace("\n", "\n{$indent} * ", $text); + + $comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n"; + + /** @var Tag $tag */ + foreach ($docblock->getTags() as $tag) { + $tagText = (string) $tag; + if ($this->lineLength) { + $tagText = wordwrap($tagText, $wrapLength); + } + $tagText = str_replace("\n", "\n{$indent} * ", $tagText); + + $comment .= "{$indent} * {$tagText}\n"; + } + + $comment .= $indent . ' */'; + + return $comment; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php new file mode 100644 index 0000000..a96db09 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php @@ -0,0 +1,377 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +use phpDocumentor\Reflection\DocBlock; + +/** + * Parses a tag definition for a DocBlock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class Tag implements \Reflector +{ + /** + * PCRE regular expression matching a tag name. + */ + const REGEX_TAGNAME = '[\w\-\_\\\\]+'; + + /** @var string Name of the tag */ + protected $tag = ''; + + /** + * @var string|null Content of the tag. + * When set to NULL, it means it needs to be regenerated. + */ + protected $content = ''; + + /** @var string Description of the content of this tag */ + protected $description = ''; + + /** + * @var array|null The description, as an array of strings and Tag objects. + * When set to NULL, it means it needs to be regenerated. + */ + protected $parsedDescription = null; + + /** @var Location Location of the tag. */ + protected $location = null; + + /** @var DocBlock The DocBlock which this tag belongs to. */ + protected $docblock = null; + + /** + * @var array An array with a tag as a key, and an FQCN to a class that + * handles it as an array value. The class is expected to inherit this + * class. + */ + private static $tagHandlerMappings = array( + 'author' + => '\phpDocumentor\Reflection\DocBlock\Tag\AuthorTag', + 'covers' + => '\phpDocumentor\Reflection\DocBlock\Tag\CoversTag', + 'deprecated' + => '\phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag', + 'example' + => '\phpDocumentor\Reflection\DocBlock\Tag\ExampleTag', + 'link' + => '\phpDocumentor\Reflection\DocBlock\Tag\LinkTag', + 'method' + => '\phpDocumentor\Reflection\DocBlock\Tag\MethodTag', + 'param' + => '\phpDocumentor\Reflection\DocBlock\Tag\ParamTag', + 'property-read' + => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyReadTag', + 'property' + => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyTag', + 'property-write' + => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyWriteTag', + 'return' + => '\phpDocumentor\Reflection\DocBlock\Tag\ReturnTag', + 'see' + => '\phpDocumentor\Reflection\DocBlock\Tag\SeeTag', + 'since' + => '\phpDocumentor\Reflection\DocBlock\Tag\SinceTag', + 'source' + => '\phpDocumentor\Reflection\DocBlock\Tag\SourceTag', + 'throw' + => '\phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag', + 'throws' + => '\phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag', + 'uses' + => '\phpDocumentor\Reflection\DocBlock\Tag\UsesTag', + 'var' + => '\phpDocumentor\Reflection\DocBlock\Tag\VarTag', + 'version' + => '\phpDocumentor\Reflection\DocBlock\Tag\VersionTag' + ); + + /** + * Factory method responsible for instantiating the correct sub type. + * + * @param string $tag_line The text for this tag, including description. + * @param DocBlock $docblock The DocBlock which this tag belongs to. + * @param Location $location Location of the tag. + * + * @throws \InvalidArgumentException if an invalid tag line was presented. + * + * @return static A new tag object. + */ + final public static function createInstance( + $tag_line, + DocBlock $docblock = null, + Location $location = null + ) { + if (!preg_match( + '/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)?/us', + $tag_line, + $matches + )) { + throw new \InvalidArgumentException( + 'Invalid tag_line detected: ' . $tag_line + ); + } + + $handler = __CLASS__; + if (isset(self::$tagHandlerMappings[$matches[1]])) { + $handler = self::$tagHandlerMappings[$matches[1]]; + } elseif (isset($docblock)) { + $tagName = (string)new Type\Collection( + array($matches[1]), + $docblock->getContext() + ); + + if (isset(self::$tagHandlerMappings[$tagName])) { + $handler = self::$tagHandlerMappings[$tagName]; + } + } + + return new $handler( + $matches[1], + isset($matches[2]) ? $matches[2] : '', + $docblock, + $location + ); + } + + /** + * Registers a handler for tags. + * + * Registers a handler for tags. The class specified is autoloaded if it's + * not available. It must inherit from this class. + * + * @param string $tag Name of tag to regiser a handler for. When + * registering a namespaced tag, the full name, along with a prefixing + * slash MUST be provided. + * @param string|null $handler FQCN of handler. Specifing NULL removes the + * handler for the specified tag, if any. + * + * @return bool TRUE on success, FALSE on failure. + */ + final public static function registerTagHandler($tag, $handler) + { + $tag = trim((string)$tag); + + if (null === $handler) { + unset(self::$tagHandlerMappings[$tag]); + return true; + } + + if ('' !== $tag + && class_exists($handler, true) + && is_subclass_of($handler, __CLASS__) + && !strpos($tag, '\\') //Accept no slash, and 1st slash at offset 0. + ) { + self::$tagHandlerMappings[$tag] = $handler; + return true; + } + + return false; + } + + /** + * Parses a tag and populates the member variables. + * + * @param string $name Name of the tag. + * @param string $content The contents of the given tag. + * @param DocBlock $docblock The DocBlock which this tag belongs to. + * @param Location $location Location of the tag. + */ + public function __construct( + $name, + $content, + DocBlock $docblock = null, + Location $location = null + ) { + $this + ->setName($name) + ->setContent($content) + ->setDocBlock($docblock) + ->setLocation($location); + } + + /** + * Gets the name of this tag. + * + * @return string The name of this tag. + */ + public function getName() + { + return $this->tag; + } + + /** + * Sets the name of this tag. + * + * @param string $name The new name of this tag. + * + * @return $this + * @throws \InvalidArgumentException When an invalid tag name is provided. + */ + public function setName($name) + { + if (!preg_match('/^' . self::REGEX_TAGNAME . '$/u', $name)) { + throw new \InvalidArgumentException( + 'Invalid tag name supplied: ' . $name + ); + } + + $this->tag = $name; + + return $this; + } + + /** + * Gets the content of this tag. + * + * @return string + */ + public function getContent() + { + if (null === $this->content) { + $this->content = $this->description; + } + + return $this->content; + } + + /** + * Sets the content of this tag. + * + * @param string $content The new content of this tag. + * + * @return $this + */ + public function setContent($content) + { + $this->setDescription($content); + $this->content = $content; + + return $this; + } + + /** + * Gets the description component of this tag. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Sets the description component of this tag. + * + * @param string $description The new description component of this tag. + * + * @return $this + */ + public function setDescription($description) + { + $this->content = null; + $this->parsedDescription = null; + $this->description = trim($description); + + return $this; + } + + /** + * Gets the parsed text of this description. + * + * @return array An array of strings and tag objects, in the order they + * occur within the description. + */ + public function getParsedDescription() + { + if (null === $this->parsedDescription) { + $description = new Description($this->description, $this->docblock); + $this->parsedDescription = $description->getParsedContents(); + } + return $this->parsedDescription; + } + + /** + * Gets the docblock this tag belongs to. + * + * @return DocBlock The docblock this tag belongs to. + */ + public function getDocBlock() + { + return $this->docblock; + } + + /** + * Sets the docblock this tag belongs to. + * + * @param DocBlock $docblock The new docblock this tag belongs to. Setting + * NULL removes any association. + * + * @return $this + */ + public function setDocBlock(DocBlock $docblock = null) + { + $this->docblock = $docblock; + + return $this; + } + + /** + * Gets the location of the tag. + * + * @return Location The tag's location. + */ + public function getLocation() + { + return $this->location; + } + + /** + * Sets the location of the tag. + * + * @param Location $location The new location of the tag. + * + * @return $this + */ + public function setLocation(Location $location = null) + { + $this->location = $location; + + return $this; + } + + /** + * Builds a string representation of this object. + * + * @todo determine the exact format as used by PHP Reflection and implement it. + * + * @return void + * @codeCoverageIgnore Not yet implemented + */ + public static function export() + { + throw new \Exception('Not yet implemented'); + } + + /** + * Returns the tag as a serialized string + * + * @return string + */ + public function __toString() + { + return "@{$this->getName()} {$this->getContent()}"; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php new file mode 100644 index 0000000..bacf52e --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php @@ -0,0 +1,131 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for an @author tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class AuthorTag extends Tag +{ + /** + * PCRE regular expression matching any valid value for the name component. + */ + const REGEX_AUTHOR_NAME = '[^\<]*'; + + /** + * PCRE regular expression matching any valid value for the email component. + */ + const REGEX_AUTHOR_EMAIL = '[^\>]*'; + + /** @var string The name of the author */ + protected $authorName = ''; + + /** @var string The email of the author */ + protected $authorEmail = ''; + + public function getContent() + { + if (null === $this->content) { + $this->content = $this->authorName; + if ('' != $this->authorEmail) { + $this->content .= "<{$this->authorEmail}>"; + } + } + + return $this->content; + } + + /** + * {@inheritdoc} + */ + public function setContent($content) + { + parent::setContent($content); + if (preg_match( + '/^(' . self::REGEX_AUTHOR_NAME . + ')(\<(' . self::REGEX_AUTHOR_EMAIL . + ')\>)?$/u', + $this->description, + $matches + )) { + $this->authorName = trim($matches[1]); + if (isset($matches[3])) { + $this->authorEmail = trim($matches[3]); + } + } + + return $this; + } + + /** + * Gets the author's name. + * + * @return string The author's name. + */ + public function getAuthorName() + { + return $this->authorName; + } + + /** + * Sets the author's name. + * + * @param string $authorName The new author name. + * An invalid value will set an empty string. + * + * @return $this + */ + public function setAuthorName($authorName) + { + $this->content = null; + $this->authorName + = preg_match('/^' . self::REGEX_AUTHOR_NAME . '$/u', $authorName) + ? $authorName : ''; + + return $this; + } + + /** + * Gets the author's email. + * + * @return string The author's email. + */ + public function getAuthorEmail() + { + return $this->authorEmail; + } + + /** + * Sets the author's email. + * + * @param string $authorEmail The new author email. + * An invalid value will set an empty string. + * + * @return $this + */ + public function setAuthorEmail($authorEmail) + { + $this->authorEmail + = preg_match('/^' . self::REGEX_AUTHOR_EMAIL . '$/u', $authorEmail) + ? $authorEmail : ''; + + $this->content = null; + return $this; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php new file mode 100644 index 0000000..bd31b56 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php @@ -0,0 +1,24 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @covers tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class CoversTag extends SeeTag +{ +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php new file mode 100644 index 0000000..7226316 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php @@ -0,0 +1,26 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag\VersionTag; + +/** + * Reflection class for a @deprecated tag in a Docblock. + * + * @author Vasil Rangelov + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class DeprecatedTag extends VersionTag +{ +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php new file mode 100644 index 0000000..0e163ea --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php @@ -0,0 +1,156 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @example tag in a Docblock. + * + * @author Vasil Rangelov + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class ExampleTag extends SourceTag +{ + /** + * @var string Path to a file to use as an example. + * May also be an absolute URI. + */ + protected $filePath = ''; + + /** + * @var bool Whether the file path component represents an URI. + * This determines how the file portion appears at {@link getContent()}. + */ + protected $isURI = false; + + /** + * {@inheritdoc} + */ + public function getContent() + { + if (null === $this->content) { + $filePath = ''; + if ($this->isURI) { + if (false === strpos($this->filePath, ':')) { + $filePath = str_replace( + '%2F', + '/', + rawurlencode($this->filePath) + ); + } else { + $filePath = $this->filePath; + } + } else { + $filePath = '"' . $this->filePath . '"'; + } + + $this->content = $filePath . ' ' . parent::getContent(); + } + + return $this->content; + } + /** + * {@inheritdoc} + */ + public function setContent($content) + { + Tag::setContent($content); + if (preg_match( + '/^ + # File component + (?: + # File path in quotes + \"([^\"]+)\" + | + # File URI + (\S+) + ) + # Remaining content (parsed by SourceTag) + (?:\s+(.*))? + $/sux', + $this->description, + $matches + )) { + if ('' !== $matches[1]) { + $this->setFilePath($matches[1]); + } else { + $this->setFileURI($matches[2]); + } + + if (isset($matches[3])) { + parent::setContent($matches[3]); + } else { + $this->setDescription(''); + } + $this->content = $content; + } + + return $this; + } + + /** + * Returns the file path. + * + * @return string Path to a file to use as an example. + * May also be an absolute URI. + */ + public function getFilePath() + { + return $this->filePath; + } + + /** + * Sets the file path. + * + * @param string $filePath The new file path to use for the example. + * + * @return $this + */ + public function setFilePath($filePath) + { + $this->isURI = false; + $this->filePath = trim($filePath); + + $this->content = null; + return $this; + } + + /** + * Sets the file path as an URI. + * + * This function is equivalent to {@link setFilePath()}, except that it + * convers an URI to a file path before that. + * + * There is no getFileURI(), as {@link getFilePath()} is compatible. + * + * @param type $uri The new file URI to use as an example. + */ + public function setFileURI($uri) + { + $this->isURI = true; + if (false === strpos($uri, ':')) { + //Relative URL + $this->filePath = rawurldecode( + str_replace(array('/', '\\'), '%2F', $uri) + ); + } else { + //Absolute URL or URI. + $this->filePath = $uri; + } + + $this->content = null; + return $this; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php new file mode 100644 index 0000000..f79f25d --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php @@ -0,0 +1,81 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @link tag in a Docblock. + * + * @author Ben Selby + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class LinkTag extends Tag +{ + /** @var string */ + protected $link = ''; + + /** + * {@inheritdoc} + */ + public function getContent() + { + if (null === $this->content) { + $this->content = "{$this->link} {$this->description}"; + } + + return $this->content; + } + + /** + * {@inheritdoc} + */ + public function setContent($content) + { + parent::setContent($content); + $parts = preg_split('/\s+/Su', $this->description, 2); + + $this->link = $parts[0]; + + $this->setDescription(isset($parts[1]) ? $parts[1] : $parts[0]); + + $this->content = $content; + return $this; + } + + /** + * Gets the link + * + * @return string + */ + public function getLink() + { + return $this->link; + } + + /** + * Sets the link + * + * @param string $link The link + * + * @return $this + */ + public function setLink($link) + { + $this->link = $link; + + $this->content = null; + return $this; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php new file mode 100644 index 0000000..7a5ce79 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php @@ -0,0 +1,209 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @method in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class MethodTag extends ReturnTag +{ + + /** @var string */ + protected $method_name = ''; + + /** @var string */ + protected $arguments = ''; + + /** @var bool */ + protected $isStatic = false; + + /** + * {@inheritdoc} + */ + public function getContent() + { + if (null === $this->content) { + $this->content = ''; + if ($this->isStatic) { + $this->content .= 'static '; + } + $this->content .= $this->type . + " {$this->method_name}({$this->arguments}) " . + $this->description; + } + + return $this->content; + } + + /** + * {@inheritdoc} + */ + public function setContent($content) + { + Tag::setContent($content); + // 1. none or more whitespace + // 2. optionally the keyword "static" followed by whitespace + // 3. optionally a word with underscores followed by whitespace : as + // type for the return value + // 4. then optionally a word with underscores followed by () and + // whitespace : as method name as used by phpDocumentor + // 5. then a word with underscores, followed by ( and any character + // until a ) and whitespace : as method name with signature + // 6. any remaining text : as description + if (preg_match( + '/^ + # Static keyword + # Declates a static method ONLY if type is also present + (?: + (static) + \s+ + )? + # Return type + (?: + ([\w\|_\\\\]+) + \s+ + )? + # Legacy method name (not captured) + (?: + [\w_]+\(\)\s+ + )? + # Method name + ([\w\|_\\\\]+) + # Arguments + \(([^\)]*)\) + \s* + # Description + (.*) + $/sux', + $this->description, + $matches + )) { + list( + , + $static, + $this->type, + $this->method_name, + $this->arguments, + $this->description + ) = $matches; + if ($static) { + if (!$this->type) { + $this->type = 'static'; + } else { + $this->isStatic = true; + } + } else { + if (!$this->type) { + $this->type = 'void'; + } + } + $this->parsedDescription = null; + } + + return $this; + } + + /** + * Sets the name of this method. + * + * @param string $method_name The name of the method. + * + * @return $this + */ + public function setMethodName($method_name) + { + $this->method_name = $method_name; + + $this->content = null; + return $this; + } + + /** + * Retrieves the method name. + * + * @return string + */ + public function getMethodName() + { + return $this->method_name; + } + + /** + * Sets the arguments for this method. + * + * @param string $arguments A comma-separated arguments line. + * + * @return void + */ + public function setArguments($arguments) + { + $this->arguments = $arguments; + + $this->content = null; + return $this; + } + + /** + * Returns an array containing each argument as array of type and name. + * + * Please note that the argument sub-array may only contain 1 element if no + * type was specified. + * + * @return string[] + */ + public function getArguments() + { + if (empty($this->arguments)) { + return array(); + } + + $arguments = explode(',', $this->arguments); + foreach ($arguments as $key => $value) { + $arguments[$key] = explode(' ', trim($value)); + } + + return $arguments; + } + + /** + * Checks whether the method tag describes a static method or not. + * + * @return bool TRUE if the method declaration is for a static method, FALSE + * otherwise. + */ + public function isStatic() + { + return $this->isStatic; + } + + /** + * Sets a new value for whether the method is static or not. + * + * @param bool $isStatic The new value to set. + * + * @return $this + */ + public function setIsStatic($isStatic) + { + $this->isStatic = $isStatic; + + $this->content = null; + return $this; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php new file mode 100644 index 0000000..9bc0270 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php @@ -0,0 +1,119 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @param tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class ParamTag extends ReturnTag +{ + /** @var string */ + protected $variableName = ''; + + /** @var bool determines whether this is a variadic argument */ + protected $isVariadic = false; + + /** + * {@inheritdoc} + */ + public function getContent() + { + if (null === $this->content) { + $this->content + = "{$this->type} {$this->variableName} {$this->description}"; + } + return $this->content; + } + /** + * {@inheritdoc} + */ + public function setContent($content) + { + Tag::setContent($content); + $parts = preg_split( + '/(\s+)/Su', + $this->description, + 3, + PREG_SPLIT_DELIM_CAPTURE + ); + + // if the first item that is encountered is not a variable; it is a type + if (isset($parts[0]) + && (strlen($parts[0]) > 0) + && ($parts[0][0] !== '$') + ) { + $this->type = array_shift($parts); + array_shift($parts); + } + + // if the next item starts with a $ or ...$ it must be the variable name + if (isset($parts[0]) + && (strlen($parts[0]) > 0) + && ($parts[0][0] == '$' || substr($parts[0], 0, 4) === '...$') + ) { + $this->variableName = array_shift($parts); + array_shift($parts); + + if (substr($this->variableName, 0, 3) === '...') { + $this->isVariadic = true; + $this->variableName = substr($this->variableName, 3); + } + } + + $this->setDescription(implode('', $parts)); + + $this->content = $content; + return $this; + } + + /** + * Returns the variable's name. + * + * @return string + */ + public function getVariableName() + { + return $this->variableName; + } + + /** + * Sets the variable's name. + * + * @param string $name The new name for this variable. + * + * @return $this + */ + public function setVariableName($name) + { + $this->variableName = $name; + + $this->content = null; + return $this; + } + + /** + * Returns whether this tag is variadic. + * + * @return boolean + */ + public function isVariadic() + { + return $this->isVariadic; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php new file mode 100644 index 0000000..3340602 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php @@ -0,0 +1,24 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @property-read tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class PropertyReadTag extends PropertyTag +{ +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php new file mode 100644 index 0000000..288ecff --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php @@ -0,0 +1,24 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @property tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class PropertyTag extends ParamTag +{ +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php new file mode 100644 index 0000000..ec4e866 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php @@ -0,0 +1,24 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @property-write tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class PropertyWriteTag extends PropertyTag +{ +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php new file mode 100644 index 0000000..9293db9 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php @@ -0,0 +1,99 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag; +use phpDocumentor\Reflection\DocBlock\Type\Collection; + +/** + * Reflection class for a @return tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class ReturnTag extends Tag +{ + /** @var string The raw type component. */ + protected $type = ''; + + /** @var Collection The parsed type component. */ + protected $types = null; + + /** + * {@inheritdoc} + */ + public function getContent() + { + if (null === $this->content) { + $this->content = "{$this->type} {$this->description}"; + } + + return $this->content; + } + + /** + * {@inheritdoc} + */ + public function setContent($content) + { + parent::setContent($content); + + $parts = preg_split('/\s+/Su', $this->description, 2); + + // any output is considered a type + $this->type = $parts[0]; + $this->types = null; + + $this->setDescription(isset($parts[1]) ? $parts[1] : ''); + + $this->content = $content; + return $this; + } + + /** + * Returns the unique types of the variable. + * + * @return string[] + */ + public function getTypes() + { + return $this->getTypesCollection()->getArrayCopy(); + } + + /** + * Returns the type section of the variable. + * + * @return string + */ + public function getType() + { + return (string) $this->getTypesCollection(); + } + + /** + * Returns the type collection. + * + * @return void + */ + protected function getTypesCollection() + { + if (null === $this->types) { + $this->types = new Collection( + array($this->type), + $this->docblock ? $this->docblock->getContext() : null + ); + } + return $this->types; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php new file mode 100644 index 0000000..4f5f22c --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php @@ -0,0 +1,81 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @see tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class SeeTag extends Tag +{ + /** @var string */ + protected $refers = null; + + /** + * {@inheritdoc} + */ + public function getContent() + { + if (null === $this->content) { + $this->content = "{$this->refers} {$this->description}"; + } + return $this->content; + } + + /** + * {@inheritdoc} + */ + public function setContent($content) + { + parent::setContent($content); + $parts = preg_split('/\s+/Su', $this->description, 2); + + // any output is considered a type + $this->refers = $parts[0]; + + $this->setDescription(isset($parts[1]) ? $parts[1] : ''); + + $this->content = $content; + return $this; + } + + /** + * Gets the structural element this tag refers to. + * + * @return string + */ + public function getReference() + { + return $this->refers; + } + + /** + * Sets the structural element this tag refers to. + * + * @param string $refers The new type this tag refers to. + * + * @return $this + */ + public function setReference($refers) + { + $this->refers = $refers; + + $this->content = null; + return $this; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php new file mode 100644 index 0000000..ba009c4 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php @@ -0,0 +1,26 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag\VersionTag; + +/** + * Reflection class for a @since tag in a Docblock. + * + * @author Vasil Rangelov + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class SinceTag extends VersionTag +{ +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php new file mode 100644 index 0000000..3400220 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php @@ -0,0 +1,137 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @source tag in a Docblock. + * + * @author Vasil Rangelov + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class SourceTag extends Tag +{ + /** + * @var int The starting line, relative to the structural element's + * location. + */ + protected $startingLine = 1; + + /** + * @var int|null The number of lines, relative to the starting line. NULL + * means "to the end". + */ + protected $lineCount = null; + + /** + * {@inheritdoc} + */ + public function getContent() + { + if (null === $this->content) { + $this->content + = "{$this->startingLine} {$this->lineCount} {$this->description}"; + } + + return $this->content; + } + + /** + * {@inheritdoc} + */ + public function setContent($content) + { + parent::setContent($content); + if (preg_match( + '/^ + # Starting line + ([1-9]\d*) + \s* + # Number of lines + (?: + ((?1)) + \s+ + )? + # Description + (.*) + $/sux', + $this->description, + $matches + )) { + $this->startingLine = (int)$matches[1]; + if (isset($matches[2]) && '' !== $matches[2]) { + $this->lineCount = (int)$matches[2]; + } + $this->setDescription($matches[3]); + $this->content = $content; + } + + return $this; + } + + /** + * Gets the starting line. + * + * @return int The starting line, relative to the structural element's + * location. + */ + public function getStartingLine() + { + return $this->startingLine; + } + + /** + * Sets the starting line. + * + * @param int $startingLine The new starting line, relative to the + * structural element's location. + * + * @return $this + */ + public function setStartingLine($startingLine) + { + $this->startingLine = $startingLine; + + $this->content = null; + return $this; + } + + /** + * Returns the number of lines. + * + * @return int|null The number of lines, relative to the starting line. NULL + * means "to the end". + */ + public function getLineCount() + { + return $this->lineCount; + } + + /** + * Sets the number of lines. + * + * @param int|null $lineCount The new number of lines, relative to the + * starting line. NULL means "to the end". + * + * @return $this + */ + public function setLineCount($lineCount) + { + $this->lineCount = $lineCount; + + $this->content = null; + return $this; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php new file mode 100644 index 0000000..58ee44a --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php @@ -0,0 +1,24 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @throws tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class ThrowsTag extends ReturnTag +{ +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php new file mode 100644 index 0000000..da0d663 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php @@ -0,0 +1,24 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @uses tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class UsesTag extends SeeTag +{ +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php new file mode 100644 index 0000000..236b2c8 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php @@ -0,0 +1,24 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @var tag in a Docblock. + * + * @author Mike van Riel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class VarTag extends ParamTag +{ +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php new file mode 100644 index 0000000..260f698 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php @@ -0,0 +1,108 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +use phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a @version tag in a Docblock. + * + * @author Vasil Rangelov + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class VersionTag extends Tag +{ + /** + * PCRE regular expression matching a version vector. + * Assumes the "x" modifier. + */ + const REGEX_VECTOR = '(?: + # Normal release vectors. + \d\S* + | + # VCS version vectors. Per PHPCS, they are expected to + # follow the form of the VCS name, followed by ":", followed + # by the version vector itself. + # By convention, popular VCSes like CVS, SVN and GIT use "$" + # around the actual version vector. + [^\s\:]+\:\s*\$[^\$]+\$ + )'; + + /** @var string The version vector. */ + protected $version = ''; + + public function getContent() + { + if (null === $this->content) { + $this->content = "{$this->version} {$this->description}"; + } + + return $this->content; + } + + /** + * {@inheritdoc} + */ + public function setContent($content) + { + parent::setContent($content); + + if (preg_match( + '/^ + # The version vector + (' . self::REGEX_VECTOR . ') + \s* + # The description + (.+)? + $/sux', + $this->description, + $matches + )) { + $this->version = $matches[1]; + $this->setDescription(isset($matches[2]) ? $matches[2] : ''); + $this->content = $content; + } + + return $this; + } + + /** + * Gets the version section of the tag. + * + * @return string The version section of the tag. + */ + public function getVersion() + { + return $this->version; + } + + /** + * Sets the version section of the tag. + * + * @param string $version The new version section of the tag. + * An invalid value will set an empty string. + * + * @return $this + */ + public function setVersion($version) + { + $this->version + = preg_match('/^' . self::REGEX_VECTOR . '$/ux', $version) + ? $version + : ''; + + $this->content = null; + return $this; + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php new file mode 100644 index 0000000..90ead3f --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php @@ -0,0 +1,221 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Type; + +use phpDocumentor\Reflection\DocBlock\Context; + +/** + * Collection + * + * @author Mike van Riel + * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class Collection extends \ArrayObject +{ + /** @var string Definition of the OR operator for types */ + const OPERATOR_OR = '|'; + + /** @var string Definition of the ARRAY operator for types */ + const OPERATOR_ARRAY = '[]'; + + /** @var string Definition of the NAMESPACE operator in PHP */ + const OPERATOR_NAMESPACE = '\\'; + + /** @var string[] List of recognized keywords */ + protected static $keywords = array( + 'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double', + 'object', 'mixed', 'array', 'resource', 'void', 'null', 'scalar', + 'callback', 'callable', 'false', 'true', 'self', '$this', 'static' + ); + + /** + * Current invoking location. + * + * This is used to prepend to type with a relative location. + * May also be 'default' or 'global', in which case they are ignored. + * + * @var Context + */ + protected $context = null; + + /** + * Registers the namespace and aliases; uses that to add and expand the + * given types. + * + * @param string[] $types Array containing a list of types to add to this + * container. + * @param Context $location The current invoking location. + */ + public function __construct( + array $types = array(), + Context $context = null + ) { + $this->context = null === $context ? new Context() : $context; + + foreach ($types as $type) { + $this->add($type); + } + } + + /** + * Returns the current invoking location. + * + * @return Context + */ + public function getContext() + { + return $this->context; + } + + /** + * Adds a new type to the collection and expands it if it contains a + * relative namespace. + * + * If a class in the type contains a relative namespace than this collection + * will try to expand that into a FQCN. + * + * @param string $type A 'Type' as defined in the phpDocumentor + * documentation. + * + * @throws \InvalidArgumentException if a non-string argument is passed. + * + * @see http://phpdoc.org/docs/latest/for-users/types.html for the + * definition of a type. + * + * @return void + */ + public function add($type) + { + if (!is_string($type)) { + throw new \InvalidArgumentException( + 'A type should be represented by a string, received: ' + .var_export($type, true) + ); + } + + // separate the type by the OR operator + $type_parts = explode(self::OPERATOR_OR, $type); + foreach ($type_parts as $part) { + $expanded_type = $this->expand($part); + if ($expanded_type) { + $this[] = $expanded_type; + } + } + } + + /** + * Returns a string representation of the collection. + * + * @return string The resolved types across the collection, separated with + * {@link self::OPERATOR_OR}. + */ + public function __toString() + { + return implode(self::OPERATOR_OR, $this->getArrayCopy()); + } + + /** + * Analyzes the given type and returns the FQCN variant. + * + * When a type is provided this method checks whether it is not a keyword or + * Fully Qualified Class Name. If so it will use the given namespace and + * aliases to expand the type to a FQCN representation. + * + * This method only works as expected if the namespace and aliases are set; + * no dynamic reflection is being performed here. + * + * @param string $type The relative or absolute type. + * + * @uses getNamespace to determine with what to prefix the type name. + * @uses getNamespaceAliases to check whether the first part of the relative + * type name should not be replaced with another namespace. + * + * @return string + */ + protected function expand($type) + { + $type = trim($type); + if (!$type) { + return ''; + } + + if ($this->isTypeAnArray($type)) { + return $this->expand(substr($type, 0, -2)) . self::OPERATOR_ARRAY; + } + + if ($this->isRelativeType($type) && !$this->isTypeAKeyword($type)) { + $type_parts = explode(self::OPERATOR_NAMESPACE, $type, 2); + + $namespace_aliases = $this->context->getNamespaceAliases(); + // if the first segment is not an alias; prepend namespace name and + // return + if (!isset($namespace_aliases[$type_parts[0]])) { + $namespace = $this->context->getNamespace(); + if ('' !== $namespace) { + $namespace .= self::OPERATOR_NAMESPACE; + } + return self::OPERATOR_NAMESPACE . $namespace . $type; + } + + $type_parts[0] = $namespace_aliases[$type_parts[0]]; + $type = implode(self::OPERATOR_NAMESPACE, $type_parts); + } + + return $type; + } + + /** + * Detects whether the given type represents an array. + * + * @param string $type A relative or absolute type as defined in the + * phpDocumentor documentation. + * + * @return bool + */ + protected function isTypeAnArray($type) + { + return substr($type, -2) === self::OPERATOR_ARRAY; + } + + /** + * Detects whether the given type represents a PHPDoc keyword. + * + * @param string $type A relative or absolute type as defined in the + * phpDocumentor documentation. + * + * @return bool + */ + protected function isTypeAKeyword($type) + { + return in_array(strtolower($type), static::$keywords, true); + } + + /** + * Detects whether the given type represents a relative or absolute path. + * + * This method will detect keywords as being absolute; even though they are + * not preceeded by a namespace separator. + * + * @param string $type A relative or absolute type as defined in the + * phpDocumentor documentation. + * + * @return bool + */ + protected function isRelativeType($type) + { + return ($type[0] !== self::OPERATOR_NAMESPACE) + || $this->isTypeAKeyword($type); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php new file mode 100644 index 0000000..a6ca7b3 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php @@ -0,0 +1,245 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Description + * + * @author Vasil Rangelov + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class DescriptionTest extends \PHPUnit_Framework_TestCase +{ + public function testConstruct() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(1, $parsedContents); + $this->assertSame($fixture, $parsedContents[0]); + } + + public function testInlineTagParsing() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(3, $parsedContents); + $this->assertSame('This is text for a ', $parsedContents[0]); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag\LinkTag', + $parsedContents[1] + ); + $this->assertSame( + ' that uses inline +tags.', + $parsedContents[2] + ); + } + + public function testInlineTagAtStartParsing() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(3, $parsedContents); + + $this->assertSame('', $parsedContents[0]); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag\LinkTag', + $parsedContents[1] + ); + $this->assertSame( + ' is text for a description that uses inline +tags.', + $parsedContents[2] + ); + } + + public function testNestedInlineTagParsing() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(3, $parsedContents); + + $this->assertSame( + 'This is text for a description with ', + $parsedContents[0] + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $parsedContents[1] + ); + $this->assertSame('.', $parsedContents[2]); + + $parsedDescription = $parsedContents[1]->getParsedDescription(); + $this->assertCount(3, $parsedDescription); + $this->assertSame("inline tag with\n", $parsedDescription[0]); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag\LinkTag', + $parsedDescription[1] + ); + $this->assertSame(' in it', $parsedDescription[2]); + } + + public function testLiteralOpeningDelimiter() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(1, $parsedContents); + $this->assertSame($fixture, $parsedContents[0]); + } + + public function testNestedLiteralOpeningDelimiter() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(3, $parsedContents); + $this->assertSame( + 'This is text for a description containing ', + $parsedContents[0] + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $parsedContents[1] + ); + $this->assertSame('.', $parsedContents[2]); + + $this->assertSame( + array('inline tag that has { that +is literal'), + $parsedContents[1]->getParsedDescription() + ); + } + + public function testLiteralClosingDelimiter() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(1, $parsedContents); + $this->assertSame( + 'This is text for a description with } that is not a tag.', + $parsedContents[0] + ); + } + + public function testNestedLiteralClosingDelimiter() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(3, $parsedContents); + $this->assertSame( + 'This is text for a description with ', + $parsedContents[0] + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $parsedContents[1] + ); + $this->assertSame('.', $parsedContents[2]); + + $this->assertSame( + array('inline tag with } that is not an +inline tag'), + $parsedContents[1]->getParsedDescription() + ); + } + + public function testInlineTagEscapingSequence() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(1, $parsedContents); + $this->assertSame( + 'This is text for a description with literal {@link}.', + $parsedContents[0] + ); + } + + public function testNestedInlineTagEscapingSequence() + { + $fixture = <<assertSame($fixture, $object->getContents()); + + $parsedContents = $object->getParsedContents(); + $this->assertCount(3, $parsedContents); + $this->assertSame( + 'This is text for a description with an ', + $parsedContents[0] + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $parsedContents[1] + ); + $this->assertSame('.', $parsedContents[2]); + + $this->assertSame( + array('inline tag with literal +{@link} in it'), + $parsedContents[1]->getParsedDescription() + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php new file mode 100644 index 0000000..ff257aa --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php @@ -0,0 +1,86 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\CoversTag + * + * @author Daniel O'Connor + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class CoversTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\CoversTag can create + * a link for the covers doc block. + * + * @param string $type + * @param string $content + * @param string $exContent + * @param string $exReference + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\CoversTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exContent, + $exDescription, + $exReference + ) { + $tag = new CoversTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exContent, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + $this->assertEquals($exReference, $tag->getReference()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exContent, $exDescription, $exReference + return array( + array( + 'covers', + 'Foo::bar()', + 'Foo::bar()', + '', + 'Foo::bar()' + ), + array( + 'covers', + 'Foo::bar() Testing', + 'Foo::bar() Testing', + 'Testing', + 'Foo::bar()', + ), + array( + 'covers', + 'Foo::bar() Testing comments', + 'Foo::bar() Testing comments', + 'Testing comments', + 'Foo::bar()', + ), + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php new file mode 100644 index 0000000..7a75e79 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php @@ -0,0 +1,115 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag + * + * @author Vasil Rangelov + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class DeprecatedTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create + * a link for the @deprecated doc block. + * + * @param string $type + * @param string $content + * @param string $exContent + * @param string $exDescription + * @param string $exVersion + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exContent, + $exDescription, + $exVersion + ) { + $tag = new DeprecatedTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exContent, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + $this->assertEquals($exVersion, $tag->getVersion()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exContent, $exDescription, $exVersion + return array( + array( + 'deprecated', + '1.0 First release.', + '1.0 First release.', + 'First release.', + '1.0' + ), + array( + 'deprecated', + "1.0\nFirst release.", + "1.0\nFirst release.", + 'First release.', + '1.0' + ), + array( + 'deprecated', + "1.0\nFirst\nrelease.", + "1.0\nFirst\nrelease.", + "First\nrelease.", + '1.0' + ), + array( + 'deprecated', + 'Unfinished release', + 'Unfinished release', + 'Unfinished release', + '' + ), + array( + 'deprecated', + '1.0', + '1.0', + '', + '1.0' + ), + array( + 'deprecated', + 'GIT: $Id$', + 'GIT: $Id$', + '', + 'GIT: $Id$' + ), + array( + 'deprecated', + 'GIT: $Id$ Dev build', + 'GIT: $Id$ Dev build', + 'Dev build', + 'GIT: $Id$' + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php new file mode 100644 index 0000000..519a61b --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php @@ -0,0 +1,203 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\ExampleTag + * + * @author Vasil Rangelov + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class ExampleTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\SourceTag can + * understand the @source DocBlock. + * + * @param string $type + * @param string $content + * @param string $exContent + * @param string $exStartingLine + * @param string $exLineCount + * @param string $exFilepath + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\ExampleTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exContent, + $exDescription, + $exStartingLine, + $exLineCount, + $exFilePath + ) { + $tag = new ExampleTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exContent, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + $this->assertEquals($exStartingLine, $tag->getStartingLine()); + $this->assertEquals($exLineCount, $tag->getLineCount()); + $this->assertEquals($exFilePath, $tag->getFilePath()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, + // $content, + // $exContent, + // $exDescription, + // $exStartingLine, + // $exLineCount, + // $exFilePath + return array( + array( + 'example', + 'file.php', + 'file.php', + '', + 1, + null, + 'file.php' + ), + array( + 'example', + 'Testing comments', + 'Testing comments', + 'comments', + 1, + null, + 'Testing' + ), + array( + 'example', + 'file.php 2 Testing', + 'file.php 2 Testing', + 'Testing', + 2, + null, + 'file.php' + ), + array( + 'example', + 'file.php 2 3 Testing comments', + 'file.php 2 3 Testing comments', + 'Testing comments', + 2, + 3, + 'file.php' + ), + array( + 'example', + 'file.php 2 -1 Testing comments', + 'file.php 2 -1 Testing comments', + '-1 Testing comments', + 2, + null, + 'file.php' + ), + array( + 'example', + 'file.php -1 1 Testing comments', + 'file.php -1 1 Testing comments', + '-1 1 Testing comments', + 1, + null, + 'file.php' + ), + array( + 'example', + '"file with spaces.php" Testing comments', + '"file with spaces.php" Testing comments', + 'Testing comments', + 1, + null, + 'file with spaces.php' + ), + array( + 'example', + '"file with spaces.php" 2 Testing comments', + '"file with spaces.php" 2 Testing comments', + 'Testing comments', + 2, + null, + 'file with spaces.php' + ), + array( + 'example', + '"file with spaces.php" 2 3 Testing comments', + '"file with spaces.php" 2 3 Testing comments', + 'Testing comments', + 2, + 3, + 'file with spaces.php' + ), + array( + 'example', + '"file with spaces.php" 2 -3 Testing comments', + '"file with spaces.php" 2 -3 Testing comments', + '-3 Testing comments', + 2, + null, + 'file with spaces.php' + ), + array( + 'example', + '"file with spaces.php" -2 3 Testing comments', + '"file with spaces.php" -2 3 Testing comments', + '-2 3 Testing comments', + 1, + null, + 'file with spaces.php' + ), + array( + 'example', + 'file%20with%20spaces.php Testing comments', + 'file%20with%20spaces.php Testing comments', + 'Testing comments', + 1, + null, + 'file with spaces.php' + ), + array( + 'example', + 'folder/file%20with%20spaces.php Testing comments', + 'folder/file%20with%20spaces.php Testing comments', + 'Testing comments', + 1, + null, + 'folder/file with spaces.php' + ), + array( + 'example', + 'http://example.com/file%20with%20spaces.php Testing comments', + 'http://example.com/file%20with%20spaces.php Testing comments', + 'Testing comments', + 1, + null, + 'http://example.com/file%20with%20spaces.php' + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php new file mode 100644 index 0000000..0c64ed0 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php @@ -0,0 +1,87 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\LinkTag + * + * @author Ben Selby + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class LinkTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create + * a link for the @link doc block. + * + * @param string $type + * @param string $content + * @param string $exContent + * @param string $exDescription + * @param string $exLink + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\LinkTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exContent, + $exDescription, + $exLink + ) { + $tag = new LinkTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exContent, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + $this->assertEquals($exLink, $tag->getLink()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exContent, $exDescription, $exLink + return array( + array( + 'link', + 'http://www.phpdoc.org/', + 'http://www.phpdoc.org/', + 'http://www.phpdoc.org/', + 'http://www.phpdoc.org/' + ), + array( + 'link', + 'http://www.phpdoc.org/ Testing', + 'http://www.phpdoc.org/ Testing', + 'Testing', + 'http://www.phpdoc.org/' + ), + array( + 'link', + 'http://www.phpdoc.org/ Testing comments', + 'http://www.phpdoc.org/ Testing comments', + 'Testing comments', + 'http://www.phpdoc.org/' + ), + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php new file mode 100644 index 0000000..efc3a15 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php @@ -0,0 +1,146 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\MethodTag + * + * @author Mike van Riel + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class MethodTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * @param string $signature The signature to test. + * @param bool $valid Whether the given signature is expected to + * be valid. + * @param string $expected_name The method name that is expected from this + * signature. + * @param string $expected_return The return type that is expected from this + * signature. + * @param bool $paramCount Number of parameters in the signature. + * @param string $description The short description mentioned in the + * signature. + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\MethodTag + * @dataProvider getTestSignatures + * + * @return void + */ + public function testConstruct( + $signature, + $valid, + $expected_name, + $expected_return, + $expected_isStatic, + $paramCount, + $description + ) { + ob_start(); + $tag = new MethodTag('method', $signature); + $stdout = ob_get_clean(); + + $this->assertSame( + $valid, + empty($stdout), + 'No error should have been output if the signature is valid' + ); + + if (!$valid) { + return; + } + + $this->assertEquals($expected_name, $tag->getMethodName()); + $this->assertEquals($expected_return, $tag->getType()); + $this->assertEquals($description, $tag->getDescription()); + $this->assertEquals($expected_isStatic, $tag->isStatic()); + $this->assertCount($paramCount, $tag->getArguments()); + } + + public function getTestSignatures() + { + return array( + // TODO: Verify this case +// array( +// 'foo', +// false, 'foo', '', false, 0, '' +// ), + array( + 'foo()', + true, 'foo', 'void', false, 0, '' + ), + array( + 'foo() description', + true, 'foo', 'void', false, 0, 'description' + ), + array( + 'int foo()', + true, 'foo', 'int', false, 0, '' + ), + array( + 'int foo() description', + true, 'foo', 'int', false, 0, 'description' + ), + array( + 'int foo($a, $b)', + true, 'foo', 'int', false, 2, '' + ), + array( + 'int foo() foo(int $a, int $b)', + true, 'foo', 'int', false, 2, '' + ), + array( + 'int foo(int $a, int $b)', + true, 'foo', 'int', false, 2, '' + ), + array( + 'null|int foo(int $a, int $b)', + true, 'foo', 'null|int', false, 2, '' + ), + array( + 'int foo(null|int $a, int $b)', + true, 'foo', 'int', false, 2, '' + ), + array( + '\Exception foo() foo(Exception $a, Exception $b)', + true, 'foo', '\Exception', false, 2, '' + ), + array( + 'int foo() foo(Exception $a, Exception $b) description', + true, 'foo', 'int', false, 2, 'description' + ), + array( + 'int foo() foo(\Exception $a, \Exception $b) description', + true, 'foo', 'int', false, 2, 'description' + ), + array( + 'void()', + true, 'void', 'void', false, 0, '' + ), + array( + 'static foo()', + true, 'foo', 'static', false, 0, '' + ), + array( + 'static void foo()', + true, 'foo', 'void', true, 0, '' + ), + array( + 'static static foo()', + true, 'foo', 'static', true, 0, '' + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php new file mode 100644 index 0000000..0e05382 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php @@ -0,0 +1,118 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\ParamTag + * + * @author Mike van Riel + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class ParamTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ParamTag can + * understand the @param DocBlock. + * + * @param string $type + * @param string $content + * @param string $extractedType + * @param string $extractedTypes + * @param string $extractedVarName + * @param string $extractedDescription + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\ParamTag + * @dataProvider provideDataForConstructor + * + * @return void + */ + public function testConstructorParsesInputsIntoCorrectFields( + $type, + $content, + $extractedType, + $extractedTypes, + $extractedVarName, + $extractedDescription + ) { + $tag = new ParamTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($extractedType, $tag->getType()); + $this->assertEquals($extractedTypes, $tag->getTypes()); + $this->assertEquals($extractedVarName, $tag->getVariableName()); + $this->assertEquals($extractedDescription, $tag->getDescription()); + } + + /** + * Data provider for testConstructorParsesInputsIntoCorrectFields() + * + * @return array + */ + public function provideDataForConstructor() + { + return array( + array('param', 'int', 'int', array('int'), '', ''), + array('param', '$bob', '', array(), '$bob', ''), + array( + 'param', + 'int Number of bobs', + 'int', + array('int'), + '', + 'Number of bobs' + ), + array( + 'param', + 'int $bob', + 'int', + array('int'), + '$bob', + '' + ), + array( + 'param', + 'int $bob Number of bobs', + 'int', + array('int'), + '$bob', + 'Number of bobs' + ), + array( + 'param', + "int Description \n on multiple lines", + 'int', + array('int'), + '', + "Description \n on multiple lines" + ), + array( + 'param', + "int \n\$bob Variable name on a new line", + 'int', + array('int'), + '$bob', + "Variable name on a new line" + ), + array( + 'param', + "\nint \$bob Type on a new line", + 'int', + array('int'), + '$bob', + "Type on a new line" + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php new file mode 100644 index 0000000..9e2aec0 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php @@ -0,0 +1,102 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\ReturnTag + * + * @author Mike van Riel + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class ReturnTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ReturnTag can + * understand the @return DocBlock. + * + * @param string $type + * @param string $content + * @param string $extractedType + * @param string $extractedTypes + * @param string $extractedDescription + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\ReturnTag + * @dataProvider provideDataForConstructor + * + * @return void + */ + public function testConstructorParsesInputsIntoCorrectFields( + $type, + $content, + $extractedType, + $extractedTypes, + $extractedDescription + ) { + $tag = new ReturnTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($extractedType, $tag->getType()); + $this->assertEquals($extractedTypes, $tag->getTypes()); + $this->assertEquals($extractedDescription, $tag->getDescription()); + } + + /** + * Data provider for testConstructorParsesInputsIntoCorrectFields() + * + * @return array + */ + public function provideDataForConstructor() + { + return array( + array('return', '', '', array(), ''), + array('return', 'int', 'int', array('int'), ''), + array( + 'return', + 'int Number of Bobs', + 'int', + array('int'), + 'Number of Bobs' + ), + array( + 'return', + 'int|double Number of Bobs', + 'int|double', + array('int', 'double'), + 'Number of Bobs' + ), + array( + 'return', + "int Number of \n Bobs", + 'int', + array('int'), + "Number of \n Bobs" + ), + array( + 'return', + " int Number of Bobs", + 'int', + array('int'), + "Number of Bobs" + ), + array( + 'return', + "int\nNumber of Bobs", + 'int', + array('int'), + "Number of Bobs" + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php new file mode 100644 index 0000000..6829b04 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php @@ -0,0 +1,86 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SeeTag + * + * @author Daniel O'Connor + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class SeeTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the phpDocumentor_Reflection_DocBlock_Tag_See can create a link + * for the @see doc block. + * + * @param string $type + * @param string $content + * @param string $exContent + * @param string $exReference + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\SeeTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exContent, + $exDescription, + $exReference + ) { + $tag = new SeeTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exContent, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + $this->assertEquals($exReference, $tag->getReference()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exContent, $exDescription, $exReference + return array( + array( + 'see', + 'Foo::bar()', + 'Foo::bar()', + '', + 'Foo::bar()' + ), + array( + 'see', + 'Foo::bar() Testing', + 'Foo::bar() Testing', + 'Testing', + 'Foo::bar()', + ), + array( + 'see', + 'Foo::bar() Testing comments', + 'Foo::bar() Testing comments', + 'Testing comments', + 'Foo::bar()', + ), + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php new file mode 100644 index 0000000..8caf25d --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php @@ -0,0 +1,115 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SinceTag + * + * @author Vasil Rangelov + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class SinceTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create + * a link for the @since doc block. + * + * @param string $type + * @param string $content + * @param string $exContent + * @param string $exDescription + * @param string $exVersion + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\SinceTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exContent, + $exDescription, + $exVersion + ) { + $tag = new SinceTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exContent, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + $this->assertEquals($exVersion, $tag->getVersion()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exContent, $exDescription, $exVersion + return array( + array( + 'since', + '1.0 First release.', + '1.0 First release.', + 'First release.', + '1.0' + ), + array( + 'since', + "1.0\nFirst release.", + "1.0\nFirst release.", + 'First release.', + '1.0' + ), + array( + 'since', + "1.0\nFirst\nrelease.", + "1.0\nFirst\nrelease.", + "First\nrelease.", + '1.0' + ), + array( + 'since', + 'Unfinished release', + 'Unfinished release', + 'Unfinished release', + '' + ), + array( + 'since', + '1.0', + '1.0', + '', + '1.0' + ), + array( + 'since', + 'GIT: $Id$', + 'GIT: $Id$', + '', + 'GIT: $Id$' + ), + array( + 'since', + 'GIT: $Id$ Dev build', + 'GIT: $Id$ Dev build', + 'Dev build', + 'GIT: $Id$' + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php new file mode 100644 index 0000000..2a40e0a --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php @@ -0,0 +1,116 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SourceTag + * + * @author Vasil Rangelov + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class SourceTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\SourceTag can + * understand the @source DocBlock. + * + * @param string $type + * @param string $content + * @param string $exContent + * @param string $exStartingLine + * @param string $exLineCount + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\SourceTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exContent, + $exDescription, + $exStartingLine, + $exLineCount + ) { + $tag = new SourceTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exContent, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + $this->assertEquals($exStartingLine, $tag->getStartingLine()); + $this->assertEquals($exLineCount, $tag->getLineCount()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exContent, $exDescription, $exStartingLine, $exLineCount + return array( + array( + 'source', + '2', + '2', + '', + 2, + null + ), + array( + 'source', + 'Testing', + 'Testing', + 'Testing', + 1, + null + ), + array( + 'source', + '2 Testing', + '2 Testing', + 'Testing', + 2, + null + ), + array( + 'source', + '2 3 Testing comments', + '2 3 Testing comments', + 'Testing comments', + 2, + 3 + ), + array( + 'source', + '2 -1 Testing comments', + '2 -1 Testing comments', + '-1 Testing comments', + 2, + null + ), + array( + 'source', + '-1 1 Testing comments', + '-1 1 Testing comments', + '-1 1 Testing comments', + 1, + null + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php new file mode 100644 index 0000000..3c669d5 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php @@ -0,0 +1,102 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\ThrowsTag + * + * @author Mike van Riel + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class ThrowsTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag can + * understand the @throws DocBlock. + * + * @param string $type + * @param string $content + * @param string $extractedType + * @param string $extractedTypes + * @param string $extractedDescription + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag + * @dataProvider provideDataForConstructor + * + * @return void + */ + public function testConstructorParsesInputsIntoCorrectFields( + $type, + $content, + $extractedType, + $extractedTypes, + $extractedDescription + ) { + $tag = new ThrowsTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($extractedType, $tag->getType()); + $this->assertEquals($extractedTypes, $tag->getTypes()); + $this->assertEquals($extractedDescription, $tag->getDescription()); + } + + /** + * Data provider for testConstructorParsesInputsIntoCorrectFields() + * + * @return array + */ + public function provideDataForConstructor() + { + return array( + array('throws', '', '', array(), ''), + array('throws', 'int', 'int', array('int'), ''), + array( + 'throws', + 'int Number of Bobs', + 'int', + array('int'), + 'Number of Bobs' + ), + array( + 'throws', + 'int|double Number of Bobs', + 'int|double', + array('int', 'double'), + 'Number of Bobs' + ), + array( + 'throws', + "int Number of \n Bobs", + 'int', + array('int'), + "Number of \n Bobs" + ), + array( + 'throws', + " int Number of Bobs", + 'int', + array('int'), + "Number of Bobs" + ), + array( + 'throws', + "int\nNumber of Bobs", + 'int', + array('int'), + "Number of Bobs" + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php new file mode 100644 index 0000000..45868d7 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php @@ -0,0 +1,86 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\UsesTag + * + * @author Daniel O'Connor + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class UsesTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\UsesTag can create + * a link for the @uses doc block. + * + * @param string $type + * @param string $content + * @param string $exContent + * @param string $exReference + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\UsesTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exContent, + $exDescription, + $exReference + ) { + $tag = new UsesTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exContent, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + $this->assertEquals($exReference, $tag->getReference()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exContent, $exDescription, $exReference + return array( + array( + 'uses', + 'Foo::bar()', + 'Foo::bar()', + '', + 'Foo::bar()' + ), + array( + 'uses', + 'Foo::bar() Testing', + 'Foo::bar() Testing', + 'Testing', + 'Foo::bar()', + ), + array( + 'uses', + 'Foo::bar() Testing comments', + 'Foo::bar() Testing comments', + 'Testing comments', + 'Foo::bar()', + ), + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php new file mode 100644 index 0000000..9ae2aa5 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php @@ -0,0 +1,94 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag + * + * @author Daniel O'Connor + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class VarTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can + * understand the @var doc block. + * + * @param string $type + * @param string $content + * @param string $exType + * @param string $exVariable + * @param string $exDescription + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\VarTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exType, + $exVariable, + $exDescription + ) { + $tag = new VarTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exType, $tag->getType()); + $this->assertEquals($exVariable, $tag->getVariableName()); + $this->assertEquals($exDescription, $tag->getDescription()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exType, $exVariable, $exDescription + return array( + array( + 'var', + 'int', + 'int', + '', + '' + ), + array( + 'var', + 'int $bob', + 'int', + '$bob', + '' + ), + array( + 'var', + 'int $bob Number of bobs', + 'int', + '$bob', + 'Number of bobs' + ), + array( + 'var', + '', + '', + '', + '' + ), + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php new file mode 100644 index 0000000..e145386 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php @@ -0,0 +1,115 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VersionTag + * + * @author Vasil Rangelov + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class VersionTagTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create + * a link for the @version doc block. + * + * @param string $type + * @param string $content + * @param string $exContent + * @param string $exDescription + * @param string $exVersion + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag\VersionTag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exContent, + $exDescription, + $exVersion + ) { + $tag = new VersionTag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($exContent, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + $this->assertEquals($exVersion, $tag->getVersion()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exContent, $exDescription, $exVersion + return array( + array( + 'version', + '1.0 First release.', + '1.0 First release.', + 'First release.', + '1.0' + ), + array( + 'version', + "1.0\nFirst release.", + "1.0\nFirst release.", + 'First release.', + '1.0' + ), + array( + 'version', + "1.0\nFirst\nrelease.", + "1.0\nFirst\nrelease.", + "First\nrelease.", + '1.0' + ), + array( + 'version', + 'Unfinished release', + 'Unfinished release', + 'Unfinished release', + '' + ), + array( + 'version', + '1.0', + '1.0', + '', + '1.0' + ), + array( + 'version', + 'GIT: $Id$', + 'GIT: $Id$', + '', + 'GIT: $Id$' + ), + array( + 'version', + 'GIT: $Id$ Dev build', + 'GIT: $Id$ Dev build', + 'Dev build', + 'GIT: $Id$' + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php new file mode 100644 index 0000000..9e873ec --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php @@ -0,0 +1,313 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +use phpDocumentor\Reflection\DocBlock; +use phpDocumentor\Reflection\DocBlock\Context; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag + * + * @author Daniel O'Connor + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class TagTest extends \PHPUnit_Framework_TestCase +{ + + /** + * @expectedException \InvalidArgumentException + * + * @return void + */ + public function testInvalidTagLine() + { + Tag::createInstance('Invalid tag line'); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler + * + * @return void + */ + public function testTagHandlerUnregistration() + { + $currentHandler = __NAMESPACE__ . '\Tag\VarTag'; + $tagPreUnreg = Tag::createInstance('@var mixed'); + $this->assertInstanceOf( + $currentHandler, + $tagPreUnreg + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPreUnreg + ); + + Tag::registerTagHandler('var', null); + + $tagPostUnreg = Tag::createInstance('@var mixed'); + $this->assertNotInstanceOf( + $currentHandler, + $tagPostUnreg + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPostUnreg + ); + + Tag::registerTagHandler('var', $currentHandler); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler + * + * @return void + */ + public function testTagHandlerCorrectRegistration() + { + if (0 == ini_get('allow_url_include')) { + $this->markTestSkipped('"data" URIs for includes are required.'); + } + $currentHandler = __NAMESPACE__ . '\Tag\VarTag'; + $tagPreReg = Tag::createInstance('@var mixed'); + $this->assertInstanceOf( + $currentHandler, + $tagPreReg + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPreReg + ); + + include 'data:text/plain;base64,'. base64_encode( +<<assertTrue(Tag::registerTagHandler('var', '\MyTagHandler')); + + $tagPostReg = Tag::createInstance('@var mixed'); + $this->assertNotInstanceOf( + $currentHandler, + $tagPostReg + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPostReg + ); + $this->assertInstanceOf( + '\MyTagHandler', + $tagPostReg + ); + + $this->assertTrue(Tag::registerTagHandler('var', $currentHandler)); + } + + /** + * @depends testTagHandlerCorrectRegistration + * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler + * @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance + * + * @return void + */ + public function testNamespacedTagHandlerCorrectRegistration() + { + $tagPreReg = Tag::createInstance('@T something'); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPreReg + ); + $this->assertNotInstanceOf( + '\MyTagHandler', + $tagPreReg + ); + + $this->assertTrue( + Tag::registerTagHandler('\MyNamespace\MyTag', '\MyTagHandler') + ); + + $tagPostReg = Tag::createInstance( + '@T something', + new DocBlock( + '', + new Context('', array('T' => '\MyNamespace\MyTag')) + ) + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPostReg + ); + $this->assertInstanceOf( + '\MyTagHandler', + $tagPostReg + ); + + $this->assertTrue( + Tag::registerTagHandler('\MyNamespace\MyTag', null) + ); + } + + /** + * @depends testTagHandlerCorrectRegistration + * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler + * @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance + * + * @return void + */ + public function testNamespacedTagHandlerIncorrectRegistration() + { + $tagPreReg = Tag::createInstance('@T something'); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPreReg + ); + $this->assertNotInstanceOf( + '\MyTagHandler', + $tagPreReg + ); + + $this->assertFalse( + Tag::registerTagHandler('MyNamespace\MyTag', '\MyTagHandler') + ); + + $tagPostReg = Tag::createInstance( + '@T something', + new DocBlock( + '', + new Context('', array('T' => '\MyNamespace\MyTag')) + ) + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPostReg + ); + $this->assertNotInstanceOf( + '\MyTagHandler', + $tagPostReg + ); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler + * + * @return void + */ + public function testNonExistentTagHandlerRegistration() + { + $currentHandler = __NAMESPACE__ . '\Tag\VarTag'; + $tagPreReg = Tag::createInstance('@var mixed'); + $this->assertInstanceOf( + $currentHandler, + $tagPreReg + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPreReg + ); + + $this->assertFalse(Tag::registerTagHandler('var', 'Non existent')); + + $tagPostReg = Tag::createInstance('@var mixed'); + $this->assertInstanceOf( + $currentHandler, + $tagPostReg + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPostReg + ); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler + * + * @return void + */ + public function testIncompatibleTagHandlerRegistration() + { + $currentHandler = __NAMESPACE__ . '\Tag\VarTag'; + $tagPreReg = Tag::createInstance('@var mixed'); + $this->assertInstanceOf( + $currentHandler, + $tagPreReg + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPreReg + ); + + $this->assertFalse( + Tag::registerTagHandler('var', __NAMESPACE__ . '\TagTest') + ); + + $tagPostReg = Tag::createInstance('@var mixed'); + $this->assertInstanceOf( + $currentHandler, + $tagPostReg + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\Tag', + $tagPostReg + ); + } + + /** + * Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can + * understand the @var doc block. + * + * @param string $type + * @param string $content + * @param string $exDescription + * + * @covers \phpDocumentor\Reflection\DocBlock\Tag + * @dataProvider provideDataForConstuctor + * + * @return void + */ + public function testConstructorParesInputsIntoCorrectFields( + $type, + $content, + $exDescription + ) { + $tag = new Tag($type, $content); + + $this->assertEquals($type, $tag->getName()); + $this->assertEquals($content, $tag->getContent()); + $this->assertEquals($exDescription, $tag->getDescription()); + } + + /** + * Data provider for testConstructorParesInputsIntoCorrectFields + * + * @return array + */ + public function provideDataForConstuctor() + { + // $type, $content, $exDescription + return array( + array( + 'unknown', + 'some content', + 'some content', + ), + array( + 'unknown', + '', + '', + ) + ); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php new file mode 100644 index 0000000..78c7306 --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php @@ -0,0 +1,195 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Type; + +use phpDocumentor\Reflection\DocBlock\Context; + +/** + * Test class for \phpDocumentor\Reflection\DocBlock\Type\Collection + * + * @covers phpDocumentor\Reflection\DocBlock\Type\Collection + * + * @author Mike van Riel + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class CollectionTest extends \PHPUnit_Framework_TestCase +{ + /** + * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct + * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getContext + * + * @return void + */ + public function testConstruct() + { + $collection = new Collection(); + $this->assertCount(0, $collection); + $this->assertEquals('', $collection->getContext()->getNamespace()); + $this->assertCount(0, $collection->getContext()->getNamespaceAliases()); + } + + /** + * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct + * + * @return void + */ + public function testConstructWithTypes() + { + $collection = new Collection(array('integer', 'string')); + $this->assertCount(2, $collection); + } + + /** + * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct + * + * @return void + */ + public function testConstructWithNamespace() + { + $collection = new Collection(array(), new Context('\My\Space')); + $this->assertEquals('My\Space', $collection->getContext()->getNamespace()); + + $collection = new Collection(array(), new Context('My\Space')); + $this->assertEquals('My\Space', $collection->getContext()->getNamespace()); + + $collection = new Collection(array(), null); + $this->assertEquals('', $collection->getContext()->getNamespace()); + } + + /** + * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct + * + * @return void + */ + public function testConstructWithNamespaceAliases() + { + $fixture = array('a' => 'b'); + $collection = new Collection(array(), new Context(null, $fixture)); + $this->assertEquals( + array('a' => '\b'), + $collection->getContext()->getNamespaceAliases() + ); + } + + /** + * @param string $fixture + * @param array $expected + * + * @dataProvider provideTypesToExpand + * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add + * + * @return void + */ + public function testAdd($fixture, $expected) + { + $collection = new Collection( + array(), + new Context('\My\Space', array('Alias' => '\My\Space\Aliasing')) + ); + $collection->add($fixture); + + $this->assertSame($expected, $collection->getArrayCopy()); + } + + /** + * @param string $fixture + * @param array $expected + * + * @dataProvider provideTypesToExpandWithoutNamespace + * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add + * + * @return void + */ + public function testAddWithoutNamespace($fixture, $expected) + { + $collection = new Collection( + array(), + new Context(null, array('Alias' => '\My\Space\Aliasing')) + ); + $collection->add($fixture); + + $this->assertSame($expected, $collection->getArrayCopy()); + } + + /** + * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add + * @expectedException InvalidArgumentException + * + * @return void + */ + public function testAddWithInvalidArgument() + { + $collection = new Collection(); + $collection->add(array()); + } + + /** + * Returns the types and their expected values to test the retrieval of + * types. + * + * @param string $method Name of the method consuming this data provider. + * @param string $namespace Name of the namespace to user as basis. + * + * @return string[] + */ + public function provideTypesToExpand($method, $namespace = '\My\Space\\') + { + return array( + array('', array()), + array(' ', array()), + array('int', array('int')), + array('int ', array('int')), + array('string', array('string')), + array('DocBlock', array($namespace.'DocBlock')), + array('DocBlock[]', array($namespace.'DocBlock[]')), + array(' DocBlock ', array($namespace.'DocBlock')), + array('\My\Space\DocBlock', array('\My\Space\DocBlock')), + array('Alias\DocBlock', array('\My\Space\Aliasing\DocBlock')), + array( + 'DocBlock|Tag', + array($namespace .'DocBlock', $namespace .'Tag') + ), + array( + 'DocBlock|null', + array($namespace.'DocBlock', 'null') + ), + array( + '\My\Space\DocBlock|Tag', + array('\My\Space\DocBlock', $namespace.'Tag') + ), + array( + 'DocBlock[]|null', + array($namespace.'DocBlock[]', 'null') + ), + array( + 'DocBlock[]|int[]', + array($namespace.'DocBlock[]', 'int[]') + ), + ); + } + + /** + * Returns the types and their expected values to test the retrieval of + * types when no namespace is available. + * + * @param string $method Name of the method consuming this data provider. + * + * @return string[] + */ + public function provideTypesToExpandWithoutNamespace($method) + { + return $this->provideTypesToExpand($method, '\\'); + } +} diff --git a/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php new file mode 100644 index 0000000..30eedfc --- /dev/null +++ b/core/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php @@ -0,0 +1,337 @@ + + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +use phpDocumentor\Reflection\DocBlock\Context; +use phpDocumentor\Reflection\DocBlock\Location; +use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag; + +/** + * Test class for phpDocumentor\Reflection\DocBlock + * + * @author Mike van Riel + * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ +class DocBlockTest extends \PHPUnit_Framework_TestCase +{ + /** + * @covers \phpDocumentor\Reflection\DocBlock + * + * @return void + */ + public function testConstruct() + { + $fixture = << '\phpDocumentor')), + new Location(2) + ); + $this->assertEquals( + 'This is a short description', + $object->getShortDescription() + ); + $this->assertEquals( + 'This is a long description', + $object->getLongDescription()->getContents() + ); + $this->assertCount(2, $object->getTags()); + $this->assertTrue($object->hasTag('see')); + $this->assertTrue($object->hasTag('return')); + $this->assertFalse($object->hasTag('category')); + + $this->assertSame('MyNamespace', $object->getContext()->getNamespace()); + $this->assertSame( + array('PHPDoc' => '\phpDocumentor'), + $object->getContext()->getNamespaceAliases() + ); + $this->assertSame(2, $object->getLocation()->getLineNumber()); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock::splitDocBlock + * + * @return void + */ + public function testConstructWithTagsOnly() + { + $fixture = <<assertEquals('', $object->getShortDescription()); + $this->assertEquals('', $object->getLongDescription()->getContents()); + $this->assertCount(2, $object->getTags()); + $this->assertTrue($object->hasTag('see')); + $this->assertTrue($object->hasTag('return')); + $this->assertFalse($object->hasTag('category')); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock::isTemplateStart + */ + public function testIfStartOfTemplateIsDiscovered() + { + $fixture = <<assertEquals('', $object->getShortDescription()); + $this->assertEquals('', $object->getLongDescription()->getContents()); + $this->assertCount(2, $object->getTags()); + $this->assertTrue($object->hasTag('see')); + $this->assertTrue($object->hasTag('return')); + $this->assertFalse($object->hasTag('category')); + $this->assertTrue($object->isTemplateStart()); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock::isTemplateEnd + */ + public function testIfEndOfTemplateIsDiscovered() + { + $fixture = <<assertEquals('', $object->getShortDescription()); + $this->assertEquals('', $object->getLongDescription()->getContents()); + $this->assertTrue($object->isTemplateEnd()); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock::cleanInput + * + * @return void + */ + public function testConstructOneLiner() + { + $fixture = '/** Short description and nothing more. */'; + $object = new DocBlock($fixture); + $this->assertEquals( + 'Short description and nothing more.', + $object->getShortDescription() + ); + $this->assertEquals('', $object->getLongDescription()->getContents()); + $this->assertCount(0, $object->getTags()); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock::__construct + * + * @return void + */ + public function testConstructFromReflector() + { + $object = new DocBlock(new \ReflectionClass($this)); + $this->assertEquals( + 'Test class for phpDocumentor\Reflection\DocBlock', + $object->getShortDescription() + ); + $this->assertEquals('', $object->getLongDescription()->getContents()); + $this->assertCount(4, $object->getTags()); + $this->assertTrue($object->hasTag('author')); + $this->assertTrue($object->hasTag('copyright')); + $this->assertTrue($object->hasTag('license')); + $this->assertTrue($object->hasTag('link')); + $this->assertFalse($object->hasTag('category')); + } + + /** + * @expectedException \InvalidArgumentException + * + * @return void + */ + public function testExceptionOnInvalidObject() + { + new DocBlock($this); + } + + public function testDotSeperation() + { + $fixture = <<assertEquals( + 'This is a short description.', + $object->getShortDescription() + ); + $this->assertEquals( + "This is a long description.\nThis is a continuation of the long " + ."description.", + $object->getLongDescription()->getContents() + ); + } + + /** + * @covers \phpDocumentor\Reflection\DocBlock::parseTags + * @expectedException \LogicException + * + * @return void + */ + public function testInvalidTagBlock() + { + if (0 == ini_get('allow_url_include')) { + $this->markTestSkipped('"data" URIs for includes are required.'); + } + + include 'data:text/plain;base64,'. base64_encode( + <<assertEquals( + 'This is a short description.', + $object->getShortDescription() + ); + $this->assertEquals( + 'This is a long description.', + $object->getLongDescription()->getContents() + ); + $tags = $object->getTags(); + $this->assertCount(2, $tags); + $this->assertTrue($object->hasTag('method')); + $this->assertTrue($object->hasTag('Method')); + $this->assertInstanceOf( + __NAMESPACE__ . '\DocBlock\Tag\MethodTag', + $tags[0] + ); + $this->assertInstanceOf( + __NAMESPACE__ . '\DocBlock\Tag', + $tags[1] + ); + $this->assertNotInstanceOf( + __NAMESPACE__ . '\DocBlock\Tag\MethodTag', + $tags[1] + ); + } + + /** + * @depends testConstructFromReflector + * @covers \phpDocumentor\Reflection\DocBlock::getTagsByName + * + * @return void + */ + public function testGetTagsByNameZeroAndOneMatch() + { + $object = new DocBlock(new \ReflectionClass($this)); + $this->assertEmpty($object->getTagsByName('category')); + $this->assertCount(1, $object->getTagsByName('author')); + } + + /** + * @depends testConstructWithTagsOnly + * @covers \phpDocumentor\Reflection\DocBlock::parseTags + * + * @return void + */ + public function testParseMultilineTag() + { + $fixture = <<assertCount(1, $object->getTags()); + } + + /** + * @depends testConstructWithTagsOnly + * @covers \phpDocumentor\Reflection\DocBlock::parseTags + * + * @return void + */ + public function testParseMultilineTagWithLineBreaks() + { + $fixture = <<assertCount(1, $tags = $object->getTags()); + /** @var ReturnTag $tag */ + $tag = reset($tags); + $this->assertEquals("Content on\n multiple lines.\n\n One more, after the break.", $tag->getDescription()); + } + + /** + * @depends testConstructWithTagsOnly + * @covers \phpDocumentor\Reflection\DocBlock::getTagsByName + * + * @return void + */ + public function testGetTagsByNameMultipleMatch() + { + $fixture = <<assertEmpty($object->getTagsByName('category')); + $this->assertCount(1, $object->getTagsByName('return')); + $this->assertCount(2, $object->getTagsByName('param')); + } +} diff --git a/core/vendor/phpspec/prophecy/.gitignore b/core/vendor/phpspec/prophecy/.gitignore new file mode 100644 index 0000000..0c39a17 --- /dev/null +++ b/core/vendor/phpspec/prophecy/.gitignore @@ -0,0 +1,5 @@ +*.tgz +*.phar +bin +vendor +composer.lock diff --git a/core/vendor/phpspec/prophecy/.travis.yml b/core/vendor/phpspec/prophecy/.travis.yml new file mode 100644 index 0000000..4a69309 --- /dev/null +++ b/core/vendor/phpspec/prophecy/.travis.yml @@ -0,0 +1,9 @@ +language: php + +php: [5.3, 5.4, 5.5, hhvm, hhvm-nightly] + +sudo: false + +before_script: travis_retry composer install --no-interaction --prefer-source + +script: vendor/bin/phpspec run -fpretty -v diff --git a/core/vendor/phpspec/prophecy/CHANGES.md b/core/vendor/phpspec/prophecy/CHANGES.md new file mode 100644 index 0000000..fe761da --- /dev/null +++ b/core/vendor/phpspec/prophecy/CHANGES.md @@ -0,0 +1,110 @@ +1.4.0 / 2015-03-27 +================== + + * Fixed errors in return type phpdocs (thanks @sobit) + * Fixed stringifying of hash containing one value (thanks @avant1) + * Improved clarity of method call expectation exception (thanks @dantleech) + * Add ability to specify which argument is returned in willReturnArgument (thanks @coderbyheart) + * Add more information to MethodNotFound exceptions (thanks @ciaranmcnulty) + * Support for mocking classes with methods that return references (thanks @edsonmedina) + * Improved object comparison (thanks @whatthejeff) + * Adopted '^' in composer dependencies (thanks @GrahamCampbell) + * Fixed non-typehinted arguments being treated as optional (thanks @whatthejeff) + * Magic methods are now filtered for keywords (thanks @seagoj) + * More readable errors for failure when expecting single calls (thanks @dantleech) + +1.3.1 / 2014-11-17 +================== + + * Fix the edge case when failed predictions weren't recorded for `getCheckedPredictions()` + +1.3.0 / 2014-11-14 +================== + + * Add a way to get checked predictions with `MethodProphecy::getCheckedPredictions()` + * Fix HHVM compatibility + * Remove dead code (thanks @stof) + * Add support for DirectoryIterators (thanks @shanethehat) + +1.2.0 / 2014-07-18 +================== + + * Added support for doubling magic methods documented in the class phpdoc (thanks @armetiz) + * Fixed a segfault appearing in some cases (thanks @dmoreaulf) + * Fixed the doubling of methods with typehints on non-existent classes (thanks @gquemener) + * Added support for internal classes using keywords as method names (thanks @milan) + * Added IdenticalValueToken and Argument::is (thanks @florianv) + * Removed the usage of scalar typehints in HHVM as HHVM 3 does not support them anymore in PHP code (thanks @whatthejeff) + +1.1.2 / 2014-01-24 +================== + + * Spy automatically promotes spied method call to an expected one + +1.1.1 / 2014-01-15 +================== + + * Added support for HHVM + +1.1.0 / 2014-01-01 +================== + + * Changed the generated class names to use a static counter instead of a random number + * Added a clss patch for ReflectionClass::newInstance to make its argument optional consistently (thanks @docteurklein) + * Fixed mirroring of classes with typehints on non-existent classes (thanks @docteurklein) + * Fixed the support of array callables in CallbackPromise and CallbackPrediction (thanks @ciaranmcnulty) + * Added support for properties in ObjectStateToken (thanks @adrienbrault) + * Added support for mocking classes with a final constructor (thanks @ciaranmcnulty) + * Added ArrayEveryEntryToken and Argument::withEveryEntry() (thanks @adrienbrault) + * Added an exception when trying to prophesize on a final method instead of ignoring silently (thanks @docteurklein) + * Added StringContainToken and Argument::containingString() (thanks @peterjmit) + * Added ``shouldNotHaveBeenCalled`` on the MethodProphecy (thanks @ciaranmcnulty) + * Fixed the comparison of objects in ExactValuetoken (thanks @sstok) + * Deprecated ``shouldNotBeenCalled`` in favor of ``shouldNotHaveBeenCalled`` + +1.0.4 / 2013-08-10 +================== + + * Better randomness for generated class names (thanks @sstok) + * Add support for interfaces into TypeToken and Argument::type() (thanks @sstok) + * Add support for old-style (method name === class name) constructors (thanks @l310 for report) + +1.0.3 / 2013-07-04 +================== + + * Support callable typehints (thanks @stof) + * Do not attempt to autoload arrays when generating code (thanks @MarcoDeBortoli) + * New ArrayEntryToken (thanks @kagux) + +1.0.2 / 2013-05-19 +================== + + * Logical `AND` token added (thanks @kagux) + * Logical `NOT` token added (thanks @kagux) + * Add support for setting custom constructor arguments + * Properly stringify hashes + * Record calls that throw exceptions + * Migrate spec suite to PhpSpec 2.0 + +1.0.1 / 2013-04-30 +================== + + * Fix broken UnexpectedCallException message + * Trim AggregateException message + +1.0.0 / 2013-04-29 +================== + + * Improve exception messages + +1.0.0-BETA2 / 2013-04-03 +======================== + + * Add more debug information to CallTimes and Call prediction exception messages + * Fix MethodNotFoundException wrong namespace (thanks @gunnarlium) + * Fix some typos in the exception messages (thanks @pborreli) + +1.0.0-BETA1 / 2013-03-25 +======================== + + * Initial release diff --git a/core/vendor/phpspec/prophecy/CONTRIBUTING.md b/core/vendor/phpspec/prophecy/CONTRIBUTING.md new file mode 100644 index 0000000..6ea0589 --- /dev/null +++ b/core/vendor/phpspec/prophecy/CONTRIBUTING.md @@ -0,0 +1,21 @@ +Contributing +------------ + +Prophecy is an open source, community-driven project. If you'd like to contribute, +feel free to do this, but remember to follow this few simple rules: + +- Make your feature addition or bug fix, +- Add either specs or examples for any changes you're making (bugfixes or additions) + (please look into `spec/` folder for some examples). This is important so we don't break + it in a future version unintentionally, +- Commit your code, but do not mess with `CHANGES.md`, + +Running tests +------------- + +Make sure that you don't break anything with your changes by running: + +```bash +$> composer install --dev --prefer-dist +$> vendor/bin/phpspec +``` diff --git a/core/vendor/phpspec/prophecy/LICENSE b/core/vendor/phpspec/prophecy/LICENSE new file mode 100644 index 0000000..c8b3647 --- /dev/null +++ b/core/vendor/phpspec/prophecy/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013 Konstantin Kudryashov + Marcello Duarte + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/core/vendor/phpspec/prophecy/README.md b/core/vendor/phpspec/prophecy/README.md new file mode 100644 index 0000000..639ffd0 --- /dev/null +++ b/core/vendor/phpspec/prophecy/README.md @@ -0,0 +1,389 @@ +# Prophecy + +[![Build Status](https://travis-ci.org/phpspec/prophecy.svg?branch=master)](https://travis-ci.org/phpspec/prophecy) + +Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking +framework. Though initially it was created to fulfil phpspec2 needs, it is flexible +enough to be used inside any testing framework out there with minimal effort. + +## A simple example + +```php +prophet->prophesize('App\Security\Hasher'); + $user = new App\Entity\User($hasher->reveal()); + + $hasher->generateHash($user, 'qwerty')->willReturn('hashed_pass'); + + $user->setPassword('qwerty'); + + $this->assertEquals('hashed_pass', $user->getPassword()); + } + + protected function setup() + { + $this->prophet = new \Prophecy\Prophet; + } + + protected function tearDown() + { + $this->prophet->checkPredictions(); + } +} +``` + +## Installation + +### Prerequisites + +Prophecy requires PHP 5.3.3 or greater. + +### Setup through composer + +First, add Prophecy to the list of dependencies inside your `composer.json`: + +```json +{ + "require-dev": { + "phpspec/prophecy": "~1.0" + } +} +``` + +Then simply install it with composer: + +```bash +$> composer install --prefer-dist +``` + +You can read more about Composer on its [official webpage](http://getcomposer.org). + +## How to use it + +First of all, in Prophecy every word has a logical meaning, even the name of the library +itself (Prophecy). When you start feeling that, you'll become very fluid with this +tool. + +For example, Prophecy has been named that way because it concentrates on describing the future +behavior of objects with very limited knowledge about them. But as with any other prophecy, +those object prophecies can't create themselves - there should be a Prophet: + +```php +$prophet = new Prophecy\Prophet; +``` + +The Prophet creates prophecies by *prophesizing* them: + +```php +$prophecy = $prophet->prophesize(); +``` + +The result of the `prophesize()` method call is a new object of class `ObjectProphecy`. Yes, +that's your specific object prophecy, which describes how your object would behave +in the near future. But first, you need to specify which object you're talking about, +right? + +```php +$prophecy->willExtend('stdClass'); +$prophecy->willImplement('SessionHandlerInterface'); +``` + +There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells +object prophecy that our object should extend specific class, the second one says that +it should implement some interface. Obviously, objects in PHP can implement multiple +interfaces, but extend only one parent class. + +### Dummies + +Ok, now we have our object prophecy. What can we do with it? First of all, we can get +our object *dummy* by revealing its prophecy: + +```php +$dummy = $prophecy->reveal(); +``` + +The `$dummy` variable now holds a special dummy object. Dummy objects are objects that extend +and/or implement preset classes/interfaces by overriding all their public methods. The key +point about dummies is that they do not hold any logic - they just do nothing. Any method +of the dummy will always return `null` and the dummy will never throw any exceptions. +Dummy is your friend if you don't care about the actual behavior of this double and just need +a token object to satisfy a method typehint. + +You need to understand one thing - a dummy is not a prophecy. Your object prophecy is still +assigned to `$prophecy` variable and in order to manipulate with your expectations, you +should work with it. `$dummy` is a dummy - a simple php object that tries to fulfil your +prophecy. + +### Stubs + +Ok, now we know how to create basic prophecies and reveal dummies from them. That's +awesome if we don't care about our _doubles_ (objects that reflect originals) +interactions. If we do, we need to use *stubs* or *mocks*. + +A stub is an object double, which doesn't have any expectations about the object behavior, +but when put in specific environment, behaves in specific way. Ok, I know, it's cryptic, +but bear with me for a minute. Simply put, a stub is a dummy, which depending on the called +method signature does different things (has logic). To create stubs in Prophecy: + +```php +$prophecy->read('123')->willReturn('value'); +``` + +Oh wow. We've just made an arbitrary call on the object prophecy? Yes, we did. And this +call returned us a new object instance of class `MethodProphecy`. Yep, that's a specific +method with arguments prophecy. Method prophecies give you the ability to create method +promises or predictions. We'll talk about method predictions later in the _Mocks_ section. + +#### Promises + +Promises are logical blocks, that represent your fictional methods in prophecy terms +and they are handled by the `MethodProphecy::will(PromiseInterface $promise)` method. +As a matter of fact, the call that we made earlier (`willReturn('value')`) is a simple +shortcut to: + +```php +$prophecy->read('123')->will(new Prophecy\Promise\ReturnPromise(array('value'))); +``` + +This promise will cause any call to our double's `read()` method with exactly one +argument - `'123'` to always return `'value'`. But that's only for this +promise, there's plenty others you can use: + +- `ReturnPromise` or `->willReturn(1)` - returns a value from a method call +- `ReturnArgumentPromise` or `->willReturnArgument($index)` - returns the nth method argument from call +- `ThrowPromise` or `->willThrow` - causes the method to throw specific exception +- `CallbackPromise` or `->will($callback)` - gives you a quick way to define your own custom logic + +Keep in mind, that you can always add even more promises by implementing +`Prophecy\Promise\PromiseInterface`. + +#### Method prophecies idempotency + +Prophecy enforces same method prophecies and, as a consequence, same promises and +predictions for the same method calls with the same arguments. This means: + +```php +$methodProphecy1 = $prophecy->read('123'); +$methodProphecy2 = $prophecy->read('123'); +$methodProphecy3 = $prophecy->read('321'); + +$methodProphecy1 === $methodProphecy2; +$methodProphecy1 !== $methodProphecy3; +``` + +That's interesting, right? Now you might ask me how would you define more complex +behaviors where some method call changes behavior of others. In PHPUnit or Mockery +you do that by predicting how many times your method will be called. In Prophecy, +you'll use promises for that: + +```php +$user->getName()->willReturn(null); + +// For PHP 5.4 +$user->setName('everzet')->will(function () { + $this->getName()->willReturn('everzet'); +}); + +// For PHP 5.3 +$user->setName('everzet')->will(function ($args, $user) { + $user->getName()->willReturn('everzet'); +}); + +// Or +$user->setName('everzet')->will(function ($args) use ($user) { + $user->getName()->willReturn('everzet'); +}); +``` + +And now it doesn't matter how many times or in which order your methods are called. +What matters is their behaviors and how well you faked it. + +#### Arguments wildcarding + +The previous example is awesome (at least I hope it is for you), but that's not +optimal enough. We hardcoded `'everzet'` in our expectation. Isn't there a better +way? In fact there is, but it involves understanding what this `'everzet'` +actually is. + +You see, even if method arguments used during method prophecy creation look +like simple method arguments, in reality they are not. They are argument token +wildcards. As a matter of fact, `->setName('everzet')` looks like a simple call just +because Prophecy automatically transforms it under the hood into: + +```php +$user->setName(new Prophecy\Argument\Token\ExactValueToken('everzet')); +``` + +Those argument tokens are simple PHP classes, that implement +`Prophecy\Argument\Token\TokenInterface` and tell Prophecy how to compare real arguments +with your expectations. And yes, those classnames are damn big. That's why there's a +shortcut class `Prophecy\Argument`, which you can use to create tokens like that: + +```php +use Prophecy\Argument; + +$user->setName(Argument::exact('everzet')); +``` + +`ExactValueToken` is not very useful in our case as it forced us to hardcode the username. +That's why Prophecy comes bundled with a bunch of other tokens: + +- `IdenticalValueToken` or `Argument::is($value)` - checks that the argument is identical to a specific value +- `ExactValueToken` or `Argument::exact($value)` - checks that the argument matches a specific value +- `TypeToken` or `Argument::type($typeOrClass)` - checks that the argument matches a specific type or + classname +- `ObjectStateToken` or `Argument::which($method, $value)` - checks that the argument method returns + a specific value +- `CallbackToken` or `Argument::that(callback)` - checks that the argument matches a custom callback +- `AnyValueToken` or `Argument::any()` - matches any argument +- `AnyValuesToken` or `Argument::cetera()` - matches any arguments to the rest of the signature + +And you can add even more by implementing `TokenInterface` with your own custom classes. + +So, let's refactor our initial `{set,get}Name()` logic with argument tokens: + +```php +use Prophecy\Argument; + +$user->getName()->willReturn(null); + +// For PHP 5.4 +$user->setName(Argument::type('string'))->will(function ($args) { + $this->getName()->willReturn($args[0]); +}); + +// For PHP 5.3 +$user->setName(Argument::type('string'))->will(function ($args, $user) { + $user->getName()->willReturn($args[0]); +}); + +// Or +$user->setName(Argument::type('string'))->will(function ($args) use ($user) { + $user->getName()->willReturn($args[0]); +}); +``` + +That's it. Now our `{set,get}Name()` prophecy will work with any string argument provided to it. +We've just described how our stub object should behave, even though the original object could have +no behavior whatsoever. + +One last bit about arguments now. You might ask, what happens in case of: + +```php +use Prophecy\Argument; + +$user->getName()->willReturn(null); + +// For PHP 5.4 +$user->setName(Argument::type('string'))->will(function ($args) { + $this->getName()->willReturn($args[0]); +}); + +// For PHP 5.3 +$user->setName(Argument::type('string'))->will(function ($args, $user) { + $user->getName()->willReturn($args[0]); +}); + +// Or +$user->setName(Argument::type('string'))->will(function ($args) use ($user) { + $user->getName()->willReturn($args[0]); +}); + +$user->setName(Argument::any())->will(function () { +}); +``` + +Nothing. Your stub will continue behaving the way it did before. That's because of how +arguments wildcarding works. Every argument token type has a different score level, which +wildcard then uses to calculate the final arguments match score and use the method prophecy +promise that has the highest score. In this case, `Argument::type()` in case of success +scores `5` and `Argument::any()` scores `3`. So the type token wins, as does the first +`setName()` method prophecy and its promise. The simple rule of thumb - more precise token +always wins. + +#### Getting stub objects + +Ok, now we know how to define our prophecy method promises, let's get our stub from +it: + +```php +$stub = $prophecy->reveal(); +``` + +As you might see, the only difference between how we get dummies and stubs is that with +stubs we describe every object conversation instead of just agreeing with `null` returns +(object being *dummy*). As a matter of fact, after you define your first promise +(method call), Prophecy will force you to define all the communications - it throws +the `UnexpectedCallException` for any call you didn't describe with object prophecy before +calling it on a stub. + +### Mocks + +Now we know how to define doubles without behavior (dummies) and doubles with behavior, but +no expectations (stubs). What's left is doubles for which we have some expectations. These +are called mocks and in Prophecy they look almost exactly the same as stubs, except that +they define *predictions* instead of *promises* on method prophecies: + +```php +$entityManager->flush()->shouldBeCalled(); +``` + +#### Predictions + +The `shouldBeCalled()` method here assigns `CallPrediction` to our method prophecy. +Predictions are a delayed behavior check for your prophecies. You see, during the entire lifetime +of your doubles, Prophecy records every single call you're making against it inside your +code. After that, Prophecy can use this collected information to check if it matches defined +predictions. You can assign predictions to method prophecies using the +`MethodProphecy::should(PredictionInterface $prediction)` method. As a matter of fact, +the `shouldBeCalled()` method we used earlier is just a shortcut to: + +```php +$entityManager->flush()->should(new Prophecy\Prediction\CallPrediction()); +``` + +It checks if your method of interest (that matches both the method name and the arguments wildcard) +was called 1 or more times. If the prediction failed then it throws an exception. When does this +check happen? Whenever you call `checkPredictions()` on the main Prophet object: + +```php +$prophet->checkPredictions(); +``` + +In PHPUnit, you would want to put this call into the `tearDown()` method. If no predictions +are defined, it would do nothing. So it won't harm to call it after every test. + +There are plenty more predictions you can play with: + +- `CallPrediction` or `shouldBeCalled()` - checks that the method has been called 1 or more times +- `NoCallsPrediction` or `shouldNotBeCalled()` - checks that the method has not been called +- `CallTimesPrediction` or `shouldBeCalledTimes($count)` - checks that the method has been called + `$count` times +- `CallbackPrediction` or `should($callback)` - checks the method against your own custom callback + +Of course, you can always create your own custom prediction any time by implementing +`PredictionInterface`. + +### Spies + +The last bit of awesomeness in Prophecy is out-of-the-box spies support. As I said in the previous +section, Prophecy records every call made during the double's entire lifetime. This means +you don't need to record predictions in order to check them. You can also do it +manually by using the `MethodProphecy::shouldHave(PredictionInterface $prediction)` method: + +```php +$em = $prophet->prophesize('Doctrine\ORM\EntityManager'); + +$controller->createUser($em->reveal()); + +$em->flush()->shouldHaveBeenCalled(); +``` + +Such manipulation with doubles is called spying. And with Prophecy it just works. diff --git a/core/vendor/phpspec/prophecy/composer.json b/core/vendor/phpspec/prophecy/composer.json new file mode 100644 index 0000000..654aaad --- /dev/null +++ b/core/vendor/phpspec/prophecy/composer.json @@ -0,0 +1,40 @@ +{ + "name": "phpspec/prophecy", + "description": "Highly opinionated mocking framework for PHP 5.3+", + "keywords": ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy"], + "homepage": "https://github.com/phpspec/prophecy", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "require": { + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1", + "doctrine/instantiator": "^1.0.2" + }, + + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php new file mode 100644 index 0000000..d96318e --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php @@ -0,0 +1,143 @@ +beConstructedWith(array(42, 'zet', $object)); + + $class = get_class($object->getWrappedObject()); + $hash = spl_object_hash($object->getWrappedObject()); + + $this->__toString()->shouldReturn("exact(42), exact(\"zet\"), exact($class:$hash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))"); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $token1 + * @param \Prophecy\Argument\Token\TokenInterface $token2 + * @param \Prophecy\Argument\Token\TokenInterface $token3 + */ + function it_generates_string_representation_from_all_tokens_imploded($token1, $token2, $token3) + { + $token1->__toString()->willReturn('token_1'); + $token2->__toString()->willReturn('token_2'); + $token3->__toString()->willReturn('token_3'); + + $this->beConstructedWith(array($token1, $token2, $token3)); + $this->__toString()->shouldReturn('token_1, token_2, token_3'); + } + + function it_exposes_list_of_tokens(TokenInterface $token) + { + $this->beConstructedWith(array($token)); + + $this->getTokens()->shouldReturn(array($token)); + } + + function it_returns_score_of_1_if_there_are_no_tokens_and_arguments() + { + $this->beConstructedWith(array()); + + $this->scoreArguments(array())->shouldReturn(1); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $token1 + * @param \Prophecy\Argument\Token\TokenInterface $token2 + * @param \Prophecy\Argument\Token\TokenInterface $token3 + */ + function it_should_return_match_score_based_on_all_tokens_score($token1, $token2, $token3) + { + $token1->scoreArgument('one')->willReturn(3); + $token1->isLast()->willReturn(false); + $token2->scoreArgument(2)->willReturn(5); + $token2->isLast()->willReturn(false); + $token3->scoreArgument($obj = new \stdClass())->willReturn(10); + $token3->isLast()->willReturn(false); + + $this->beConstructedWith(array($token1, $token2, $token3)); + $this->scoreArguments(array('one', 2, $obj))->shouldReturn(18); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $token1 + * @param \Prophecy\Argument\Token\TokenInterface $token2 + * @param \Prophecy\Argument\Token\TokenInterface $token3 + */ + function it_returns_false_if_there_is_less_arguments_than_tokens($token1, $token2, $token3) + { + $token1->scoreArgument('one')->willReturn(3); + $token1->isLast()->willReturn(false); + $token2->scoreArgument(2)->willReturn(5); + $token2->isLast()->willReturn(false); + $token3->scoreArgument(null)->willReturn(false); + $token3->isLast()->willReturn(false); + + $this->beConstructedWith(array($token1, $token2, $token3)); + $this->scoreArguments(array('one', 2))->shouldReturn(false); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $token1 + * @param \Prophecy\Argument\Token\TokenInterface $token2 + * @param \Prophecy\Argument\Token\TokenInterface $token3 + */ + function it_returns_false_if_there_is_less_tokens_than_arguments($token1, $token2, $token3) + { + $token1->scoreArgument('one')->willReturn(3); + $token1->isLast()->willReturn(false); + $token2->scoreArgument(2)->willReturn(5); + $token2->isLast()->willReturn(false); + $token3->scoreArgument($obj = new \stdClass())->willReturn(10); + $token3->isLast()->willReturn(false); + + $this->beConstructedWith(array($token1, $token2, $token3)); + $this->scoreArguments(array('one', 2, $obj, 4))->shouldReturn(false); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $token1 + * @param \Prophecy\Argument\Token\TokenInterface $token2 + * @param \Prophecy\Argument\Token\TokenInterface $token3 + */ + function it_should_return_false_if_one_of_the_tokens_returns_false($token1, $token2, $token3) + { + $token1->scoreArgument('one')->willReturn(3); + $token1->isLast()->willReturn(false); + $token2->scoreArgument(2)->willReturn(false); + $token2->isLast()->willReturn(false); + $token3->scoreArgument($obj = new \stdClass())->willReturn(10); + $token3->isLast()->willReturn(false); + + $this->beConstructedWith(array($token1, $token2, $token3)); + $this->scoreArguments(array('one', 2, $obj))->shouldReturn(false); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $token1 + * @param \Prophecy\Argument\Token\TokenInterface $token2 + * @param \Prophecy\Argument\Token\TokenInterface $token3 + */ + function it_should_calculate_score_until_last_token($token1, $token2, $token3) + { + $token1->scoreArgument('one')->willReturn(3); + $token1->isLast()->willReturn(false); + + $token2->scoreArgument(2)->willReturn(7); + $token2->isLast()->willReturn(true); + + $token3->scoreArgument($obj = new \stdClass())->willReturn(10); + $token3->isLast()->willReturn(false); + + $this->beConstructedWith(array($token1, $token2, $token3)); + $this->scoreArguments(array('one', 2, $obj))->shouldReturn(10); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php new file mode 100644 index 0000000..a43e923 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php @@ -0,0 +1,28 @@ +shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + function its_string_representation_is_star() + { + $this->__toString()->shouldReturn('*'); + } + + function it_scores_any_argument_as_3() + { + $this->scoreArgument(42)->shouldReturn(3); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php new file mode 100644 index 0000000..c29076f --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php @@ -0,0 +1,28 @@ +shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_last() + { + $this->shouldBeLast(); + } + + function its_string_representation_is_star_with_followup() + { + $this->__toString()->shouldReturn('* [, ...]'); + } + + function it_scores_any_argument_as_2() + { + $this->scoreArgument(42)->shouldReturn(2); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php new file mode 100644 index 0000000..5d040d5 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php @@ -0,0 +1,64 @@ +beConstructedWith(2); + } + + function it_implements_TokenInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + function it_scores_6_if_argument_array_has_proper_count() + { + $this->scoreArgument(array(1,2))->shouldReturn(6); + } + + /** + * @param \Countable $countable + */ + function it_scores_6_if_argument_countable_object_has_proper_count($countable) + { + $countable->count()->willReturn(2); + $this->scoreArgument($countable)->shouldReturn(6); + } + + function it_does_not_score_if_argument_is_neither_array_nor_countable_object() + { + $this->scoreArgument('string')->shouldBe(false); + $this->scoreArgument(5)->shouldBe(false); + $this->scoreArgument(new \stdClass)->shouldBe(false); + } + + function it_does_not_score_if_argument_array_has_wrong_count() + { + $this->scoreArgument(array(1))->shouldReturn(false); + } + + /** + * @param \Countable $countable + */ + function it_does_not_score_if_argument_countable_object_has_wrong_count($countable) + { + $countable->count()->willReturn(3); + $this->scoreArgument($countable)->shouldReturn(false); + } + + function it_has_simple_string_representation() + { + $this->__toString()->shouldBe('count(2)'); + } + +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php new file mode 100644 index 0000000..8ff0f15 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php @@ -0,0 +1,229 @@ +beConstructedWith($key, $value); + } + + function it_implements_TokenInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + function it_holds_key_and_value($key, $value) + { + $this->getKey()->shouldBe($key); + $this->getValue()->shouldBe($value); + } + + function its_string_representation_tells_that_its_an_array_containing_the_key_value_pair($key, $value) + { + $key->__toString()->willReturn('key'); + $value->__toString()->willReturn('value'); + $this->__toString()->shouldBe('[..., key => value, ...]'); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $key + * @param \stdClass $object + */ + function it_wraps_non_token_value_into_ExactValueToken($key, $object) + { + $this->beConstructedWith($key, $object); + $this->getValue()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken'); + } + + /** + * @param \stdClass $object + * @param \Prophecy\Argument\Token\TokenInterface $value + */ + function it_wraps_non_token_key_into_ExactValueToken($object, $value) + { + $this->beConstructedWith($object, $value); + $this->getKey()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken'); + } + + function it_scores_array_half_of_combined_scores_from_key_and_value_tokens($key, $value) + { + $key->scoreArgument('key')->willReturn(4); + $value->scoreArgument('value')->willReturn(6); + $this->scoreArgument(array('key'=>'value'))->shouldBe(5); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $key + * @param \Prophecy\Argument\Token\TokenInterface $value + * @param \Iterator $object + */ + function it_scores_traversable_object_half_of_combined_scores_from_key_and_value_tokens($key, $value, $object) + { + $object->current()->will(function () use ($object) { + $object->valid()->willReturn(false); + + return 'value'; + }); + $object->key()->willReturn('key'); + $object->rewind()->willReturn(null); + $object->next()->willReturn(null); + $object->valid()->willReturn(true); + $key->scoreArgument('key')->willReturn(6); + $value->scoreArgument('value')->willReturn(2); + $this->scoreArgument($object)->shouldBe(4); + } + + /** + * @param \Prophecy\Argument\Token\AnyValuesToken $key + * @param \Prophecy\Argument\Token\TokenInterface $value + * @param \ArrayAccess $object + */ + function it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken($key, $value, $object) + { + $key->__toString()->willReturn('any_token'); + $this->beConstructedWith($key,$value); + $errorMessage = 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. + 'But you used `any_token`.'; + $this->shouldThrow(new InvalidArgumentException($errorMessage))->duringScoreArgument($object); + } + + /** + * @param \Prophecy\Argument\Token\ExactValueToken $key + * @param \Prophecy\Argument\Token\TokenInterface $value + * @param \ArrayAccess $object + */ + function it_scores_array_accessible_object_half_of_combined_scores_from_key_and_value_tokens($key, $value, $object) + { + $object->offsetExists('key')->willReturn(true); + $object->offsetGet('key')->willReturn('value'); + $key->getValue()->willReturn('key'); + $key->scoreArgument('key')->willReturn(3); + $value->scoreArgument('value')->willReturn(1); + $this->scoreArgument($object)->shouldBe(2); + } + + /** + * @param \Prophecy\Argument\Token\AnyValuesToken $key + * @param \Prophecy\Argument\Token\TokenInterface $value + * @param \ArrayIterator $object + */ + function it_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible($key, $value, $object) + { + $this->beConstructedWith($key, $value); + $object->current()->will(function () use ($object) { + $object->valid()->willReturn(false); + + return 'value'; + }); + $object->key()->willReturn('key'); + $object->rewind()->willReturn(null); + $object->next()->willReturn(null); + $object->valid()->willReturn(true); + $this->shouldNotThrow(new InvalidArgumentException)->duringScoreArgument($object); + } + + function it_does_not_score_if_argument_is_neither_array_nor_traversable_nor_array_accessible() + { + $this->scoreArgument('string')->shouldBe(false); + $this->scoreArgument(new \stdClass)->shouldBe(false); + } + + function it_does_not_score_empty_array() + { + $this->scoreArgument(array())->shouldBe(false); + } + + function it_does_not_score_array_if_key_and_value_tokens_do_not_score_same_entry($key, $value) + { + $argument = array(1 => 'foo', 2 => 'bar'); + $key->scoreArgument(1)->willReturn(true); + $key->scoreArgument(2)->willReturn(false); + $value->scoreArgument('foo')->willReturn(false); + $value->scoreArgument('bar')->willReturn(true); + $this->scoreArgument($argument)->shouldBe(false); + } + + /** + * @param \Iterator $object + */ + function it_does_not_score_traversable_object_without_entries($object) + { + $object->rewind()->willReturn(null); + $object->next()->willReturn(null); + $object->valid()->willReturn(false); + $this->scoreArgument($object)->shouldBe(false); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $key + * @param \Prophecy\Argument\Token\TokenInterface $value + * @param \Iterator $object + */ + function it_does_not_score_traversable_object_if_key_and_value_tokens_do_not_score_same_entry($key, $value, $object) + { + $object->current()->willReturn('foo'); + $object->current()->will(function () use ($object) { + $object->valid()->willReturn(false); + + return 'bar'; + }); + $object->key()->willReturn(1); + $object->key()->willReturn(2); + $object->rewind()->willReturn(null); + $object->next()->willReturn(null); + $object->valid()->willReturn(true); + $key->scoreArgument(1)->willReturn(true); + $key->scoreArgument(2)->willReturn(false); + $value->scoreArgument('foo')->willReturn(false); + $value->scoreArgument('bar')->willReturn(true); + $this->scoreArgument($object)->shouldBe(false); + } + + /** + * @param \Prophecy\Argument\Token\ExactValueToken $key + * @param \ArrayAccess $object + */ + function it_does_not_score_array_accessible_object_if_it_has_no_offset_with_key_token_value($key, $object) + { + $object->offsetExists('key')->willReturn(false); + $key->getValue()->willReturn('key'); + $this->scoreArgument($object)->shouldBe(false); + } + + /** + * @param \Prophecy\Argument\Token\ExactValueToken $key + * @param \Prophecy\Argument\Token\TokenInterface $value + * @param \ArrayAccess $object + */ + function it_does_not_score_array_accessible_object_if_key_and_value_tokens_do_not_score_same_entry($key, $value, $object) + { + $object->offsetExists('key')->willReturn(true); + $object->offsetGet('key')->willReturn('value'); + $key->getValue()->willReturn('key'); + $value->scoreArgument('value')->willReturn(false); + $key->scoreArgument('key')->willReturn(true); + $this->scoreArgument($object)->shouldBe(false); + } + + function its_score_is_capped_at_8($key, $value) + { + $key->scoreArgument('key')->willReturn(10); + $value->scoreArgument('value')->willReturn(10); + $this->scoreArgument(array('key'=>'value'))->shouldBe(8); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php new file mode 100644 index 0000000..8662e7d --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php @@ -0,0 +1,109 @@ +beConstructedWith($value); + } + + function it_implements_TokenInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + function it_holds_value($value) + { + $this->getValue()->shouldBe($value); + } + + function its_string_representation_tells_that_its_an_array_containing_only_value($value) + { + $value->__toString()->willReturn('value'); + $this->__toString()->shouldBe('[value, ..., value]'); + } + + /** + * @param \stdClass $stdClass + */ + function it_wraps_non_token_value_into_ExactValueToken($stdClass) + { + $this->beConstructedWith($stdClass); + $this->getValue()->shouldHaveType('Prophecy\Argument\Token\ExactValueToken'); + } + + function it_does_not_score_if_argument_is_neither_array_nor_traversable() + { + $this->scoreArgument('string')->shouldBe(false); + $this->scoreArgument(new \stdClass)->shouldBe(false); + } + + function it_does_not_score_empty_array() + { + $this->scoreArgument(array())->shouldBe(false); + } + + /** + * @param \Iterator $object + */ + function it_does_not_score_traversable_object_without_entries($object) + { + $object->rewind()->willReturn(null); + $object->next()->willReturn(null); + $object->valid()->willReturn(false); + $this->scoreArgument($object)->shouldBe(false); + } + + function it_scores_avg_of_scores_from_value_tokens($value) + { + $value->scoreArgument('value1')->willReturn(6); + $value->scoreArgument('value2')->willReturn(3); + $this->scoreArgument(array('value1', 'value2'))->shouldBe(4.5); + } + + function it_scores_false_if_entry_scores_false($value) + { + $value->scoreArgument('value1')->willReturn(6); + $value->scoreArgument('value2')->willReturn(false); + $this->scoreArgument(array('value1', 'value2'))->shouldBe(false); + } + + function it_does_not_score_array_keys($value) + { + $value->scoreArgument('value')->willReturn(6); + $value->scoreArgument('key')->shouldNotBeCalled(0); + $this->scoreArgument(array('key' => 'value'))->shouldBe(6); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $value + * @param \Iterator $object + */ + function it_scores_traversable_object_from_value_token($value, $object) + { + $object->current()->will(function ($args, $object) { + $object->valid()->willReturn(false); + + return 'value'; + }); + $object->key()->willReturn('key'); + $object->rewind()->willReturn(null); + $object->next()->willReturn(null); + $object->valid()->willReturn(true); + $value->scoreArgument('value')->willReturn(2); + $this->scoreArgument($object)->shouldBe(2); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php new file mode 100644 index 0000000..4395bf0 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php @@ -0,0 +1,42 @@ +beConstructedWith('get_class'); + } + + function it_implements_TokenInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + function it_scores_7_if_argument_matches_callback() + { + $this->beConstructedWith(function ($argument) { return 2 === $argument; }); + + $this->scoreArgument(2)->shouldReturn(7); + } + + function it_does_not_scores_if_argument_does_not_match_callback() + { + $this->beConstructedWith(function ($argument) { return 2 === $argument; }); + + $this->scoreArgument(5)->shouldReturn(false); + } + + function its_string_representation_should_tell_that_its_callback() + { + $this->__toString()->shouldReturn('callback()'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php new file mode 100644 index 0000000..9e46e02 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php @@ -0,0 +1,155 @@ +beConstructedWith(42); + } + + function it_implements_TokenInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + function it_holds_value() + { + $this->getValue()->shouldReturn(42); + } + + function it_scores_10_if_value_is_equal_to_argument() + { + $this->scoreArgument(42)->shouldReturn(10); + $this->scoreArgument('42')->shouldReturn(10); + } + + function it_scores_10_if_value_is_an_object_and_equal_to_argument() + { + $value = new \DateTime(); + $value2 = clone $value; + + $this->beConstructedWith($value); + $this->scoreArgument($value2)->shouldReturn(10); + } + + function it_does_not_scores_if_value_is_not_equal_to_argument() + { + $this->scoreArgument(50)->shouldReturn(false); + $this->scoreArgument(new \stdClass())->shouldReturn(false); + } + + function it_does_not_scores_if_value_an_object_and_is_not_equal_to_argument() + { + $value = new ExactValueTokenFixtureB('ABC'); + $value2 = new ExactValueTokenFixtureB('CBA'); + + $this->beConstructedWith($value); + $this->scoreArgument($value2)->shouldReturn(false); + } + + function it_does_not_scores_if_value_type_and_is_not_equal_to_argument() + { + $this->beConstructedWith(false); + $this->scoreArgument(0)->shouldReturn(false); + } + + function it_generates_proper_string_representation_for_integer() + { + $this->beConstructedWith(42); + $this->__toString()->shouldReturn('exact(42)'); + } + + function it_generates_proper_string_representation_for_string() + { + $this->beConstructedWith('some string'); + $this->__toString()->shouldReturn('exact("some string")'); + } + + function it_generates_single_line_representation_for_multiline_string() + { + $this->beConstructedWith("some\nstring"); + $this->__toString()->shouldReturn('exact("some\\nstring")'); + } + + function it_generates_proper_string_representation_for_double() + { + $this->beConstructedWith(42.3); + $this->__toString()->shouldReturn('exact(42.3)'); + } + + function it_generates_proper_string_representation_for_boolean_true() + { + $this->beConstructedWith(true); + $this->__toString()->shouldReturn('exact(true)'); + } + + function it_generates_proper_string_representation_for_boolean_false() + { + $this->beConstructedWith(false); + $this->__toString()->shouldReturn('exact(false)'); + } + + function it_generates_proper_string_representation_for_null() + { + $this->beConstructedWith(null); + $this->__toString()->shouldReturn('exact(null)'); + } + + function it_generates_proper_string_representation_for_empty_array() + { + $this->beConstructedWith(array()); + $this->__toString()->shouldReturn('exact([])'); + } + + function it_generates_proper_string_representation_for_array() + { + $this->beConstructedWith(array('zet', 42)); + $this->__toString()->shouldReturn('exact(["zet", 42])'); + } + + function it_generates_proper_string_representation_for_resource() + { + $resource = fopen(__FILE__, 'r'); + $this->beConstructedWith($resource); + $this->__toString()->shouldReturn('exact(stream:'.$resource.')'); + } + + /** + * @param \stdClass $object + */ + function it_generates_proper_string_representation_for_object($object) + { + $objHash = sprintf('%s:%s', + get_class($object->getWrappedObject()), + spl_object_hash($object->getWrappedObject()) + ); + + $this->beConstructedWith($object); + $this->__toString()->shouldReturn("exact($objHash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))"); + } +} + +class ExactValueTokenFixtureA +{ + public $errors; +} + +class ExactValueTokenFixtureB extends ExactValueTokenFixtureA +{ + public $errors; + public $value = null; + + public function __construct($value) + { + $this->value = $value; + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php new file mode 100644 index 0000000..00c3a21 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php @@ -0,0 +1,152 @@ +beConstructedWith(42); + } + + function it_is_initializable() + { + $this->shouldHaveType('Prophecy\Argument\Token\IdenticalValueToken'); + } + + function it_scores_11_if_string_value_is_identical_to_argument() + { + $this->beConstructedWith('foo'); + $this->scoreArgument('foo')->shouldReturn(11); + } + + function it_scores_11_if_boolean_value_is_identical_to_argument() + { + $this->beConstructedWith(false); + $this->scoreArgument(false)->shouldReturn(11); + } + + function it_scores_11_if_integer_value_is_identical_to_argument() + { + $this->beConstructedWith(31); + $this->scoreArgument(31)->shouldReturn(11); + } + + function it_scores_11_if_float_value_is_identical_to_argument() + { + $this->beConstructedWith(31.12); + $this->scoreArgument(31.12)->shouldReturn(11); + } + + function it_scores_11_if_array_value_is_identical_to_argument() + { + $this->beConstructedWith(array('foo' => 'bar')); + $this->scoreArgument(array('foo' => 'bar'))->shouldReturn(11); + } + + function it_scores_11_if_object_value_is_identical_to_argument() + { + $object = new \stdClass(); + + $this->beConstructedWith($object); + $this->scoreArgument($object)->shouldReturn(11); + } + + function it_scores_false_if_value_is_not_identical_to_argument() + { + $this->beConstructedWith(new \stdClass()); + $this->scoreArgument('foo')->shouldReturn(false); + } + + function it_scores_false_if_object_value_is_not_the_same_instance_than_argument() + { + $this->beConstructedWith(new \stdClass()); + $this->scoreArgument(new \stdClass())->shouldReturn(false); + } + + function it_scores_false_if_integer_value_is_not_identical_to_boolean_argument() + { + $this->beConstructedWith(1); + $this->scoreArgument(true)->shouldReturn(false); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + function it_generates_proper_string_representation_for_integer() + { + $this->beConstructedWith(42); + $this->__toString()->shouldReturn('identical(42)'); + } + + function it_generates_proper_string_representation_for_string() + { + $this->beConstructedWith('some string'); + $this->__toString()->shouldReturn('identical("some string")'); + } + + function it_generates_single_line_representation_for_multiline_string() + { + $this->beConstructedWith("some\nstring"); + $this->__toString()->shouldReturn('identical("some\\nstring")'); + } + + function it_generates_proper_string_representation_for_double() + { + $this->beConstructedWith(42.3); + $this->__toString()->shouldReturn('identical(42.3)'); + } + + function it_generates_proper_string_representation_for_boolean_true() + { + $this->beConstructedWith(true); + $this->__toString()->shouldReturn('identical(true)'); + } + + function it_generates_proper_string_representation_for_boolean_false() + { + $this->beConstructedWith(false); + $this->__toString()->shouldReturn('identical(false)'); + } + + function it_generates_proper_string_representation_for_null() + { + $this->beConstructedWith(null); + $this->__toString()->shouldReturn('identical(null)'); + } + + function it_generates_proper_string_representation_for_empty_array() + { + $this->beConstructedWith(array()); + $this->__toString()->shouldReturn('identical([])'); + } + + function it_generates_proper_string_representation_for_array() + { + $this->beConstructedWith(array('zet', 42)); + $this->__toString()->shouldReturn('identical(["zet", 42])'); + } + + function it_generates_proper_string_representation_for_resource() + { + $resource = fopen(__FILE__, 'r'); + $this->beConstructedWith($resource); + $this->__toString()->shouldReturn('identical(stream:'.$resource.')'); + } + + function it_generates_proper_string_representation_for_object($object) + { + $objHash = sprintf('%s:%s', + get_class($object->getWrappedObject()), + spl_object_hash($object->getWrappedObject()) + ); + + $this->beConstructedWith($object); + $this->__toString()->shouldReturn("identical($objHash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))"); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php new file mode 100644 index 0000000..bb5e384 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php @@ -0,0 +1,78 @@ +beConstructedWith(array()); + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_not_last() + { + $this->beConstructedWith(array()); + $this->shouldNotBeLast(); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $token1 + * @param \Prophecy\Argument\Token\TokenInterface $token2 + * @param \Prophecy\Argument\Token\TokenInterface $token3 + */ + function it_generates_string_representation_from_all_tokens_imploded($token1, $token2, $token3) + { + $token1->__toString()->willReturn('token_1'); + $token2->__toString()->willReturn('token_2'); + $token3->__toString()->willReturn('token_3'); + + $this->beConstructedWith(array($token1, $token2, $token3)); + $this->__toString()->shouldReturn('bool(token_1 AND token_2 AND token_3)'); + } + + function it_wraps_non_token_arguments_into_ExactValueToken() + { + $this->beConstructedWith(array(15, '1985')); + $this->__toString()->shouldReturn("bool(exact(15) AND exact(\"1985\"))"); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $token1 + * @param \Prophecy\Argument\Token\TokenInterface $token2 + */ + function it_scores_the_maximum_score_from_all_scores_returned_by_tokens($token1, $token2) + { + $token1->scoreArgument(1)->willReturn(10); + $token2->scoreArgument(1)->willReturn(5); + $this->beConstructedWith(array($token1, $token2)); + $this->scoreArgument(1)->shouldReturn(10); + } + + function it_does_not_score_if_there_are_no_arguments_or_tokens() + { + $this->beConstructedWith(array()); + $this->scoreArgument('any')->shouldReturn(false); + } + + /** + * @param \Prophecy\Argument\Token\TokenInterface $token1 + * @param \Prophecy\Argument\Token\TokenInterface $token2 + */ + function it_does_not_score_if_either_of_tokens_does_not_score($token1, $token2) + { + $token1->scoreArgument(1)->willReturn(10); + $token1->scoreArgument(2)->willReturn(false); + + $token2->scoreArgument(1)->willReturn(false); + $token2->scoreArgument(2)->willReturn(10); + + $this->beConstructedWith(array($token1, $token2)); + + $this->scoreArgument(1)->shouldReturn(false); + $this->scoreArgument(2)->shouldReturn(false); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php new file mode 100644 index 0000000..7ce7f3d --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php @@ -0,0 +1,65 @@ +beConstructedWith($token); + } + + function it_implements_TokenInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_holds_originating_token($token) + { + $this->getOriginatingToken()->shouldReturn($token); + } + + function it_has_simple_string_representation($token) + { + $token->__toString()->willReturn('value'); + $this->__toString()->shouldBe('not(value)'); + } + + function it_wraps_non_token_argument_into_ExactValueToken() + { + $this->beConstructedWith(5); + $token = $this->getOriginatingToken(); + $token->shouldhaveType('Prophecy\Argument\Token\ExactValueToken'); + $token->getValue()->shouldBe(5); + } + + function it_scores_4_if_preset_token_does_not_match_the_argument($token) + { + $token->scoreArgument('argument')->willReturn(false); + $this->scoreArgument('argument')->shouldBe(4); + } + + function it_does_not_score_if_preset_token_matches_argument($token) + { + $token->scoreArgument('argument')->willReturn(5); + $this->scoreArgument('argument')->shouldBe(false); + } + + function it_is_last_if_preset_token_is_last($token) + { + $token->isLast()->willReturn(true); + $this->shouldBeLast(); + } + + function it_is_not_last_if_preset_token_is_not_last($token) + { + $token->isLast()->willReturn(false); + $this->shouldNotBeLast(); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php new file mode 100644 index 0000000..a783a15 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php @@ -0,0 +1,101 @@ +beConstructedWith('getName', 'stdClass'); + } + + function it_implements_TokenInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + /** + * @param \ReflectionClass $reflection + */ + function it_scores_8_if_argument_object_has_specific_method_state($reflection) + { + $reflection->getName()->willReturn('stdClass'); + + $this->scoreArgument($reflection)->shouldReturn(8); + } + + /** + * @param \stdClass $class + */ + function it_scores_8_if_argument_object_has_specific_property_state($class) + { + $class->getName = 'stdClass'; + + $this->scoreArgument($class)->shouldReturn(8); + } + + function it_does_not_score_if_argument_method_state_does_not_match() + { + $value = new ObjectStateTokenFixtureB('ABC'); + $value2 = new ObjectStateTokenFixtureB('CBA'); + + $this->beConstructedWith('getSelf', $value); + $this->scoreArgument($value2)->shouldReturn(false); + } + + /** + * @param \stdClass $class + */ + function it_does_not_score_if_argument_property_state_does_not_match($class) + { + $class->getName = 'SplFileInfo'; + + $this->scoreArgument($class)->shouldReturn(false); + } + + /** + * @param \spec\Prophecy\Argument\Token\ObjectStateTokenFixtureA $class + */ + function it_does_not_score_if_argument_object_does_not_have_method_or_property($class) + { + $this->scoreArgument($class)->shouldReturn(false); + } + + function it_does_not_score_if_argument_is_not_object() + { + $this->scoreArgument(42)->shouldReturn(false); + } + + function it_has_simple_string_representation() + { + $this->__toString()->shouldReturn('state(getName(), "stdClass")'); + } +} + +class ObjectStateTokenFixtureA +{ + public $errors; +} + +class ObjectStateTokenFixtureB extends ObjectStateTokenFixtureA +{ + public $errors; + public $value = null; + + public function __construct($value) + { + $this->value = $value; + } + + public function getSelf() + { + return $this; + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php new file mode 100644 index 0000000..c7fd265 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php @@ -0,0 +1,49 @@ +beConstructedWith('a substring'); + } + + function it_is_initializable() + { + $this->shouldHaveType('Prophecy\Argument\Token\StringContainsToken'); + } + + function it_implements_TokenInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_holds_value() + { + $this->getValue()->shouldReturn('a substring'); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + function it_scores_6_if_the_argument_contains_the_value() + { + $this->scoreArgument('Argument containing a substring')->shouldReturn(6); + } + + function it_does_not_score_if_the_argument_does_not_contain_the_value() + { + $this->scoreArgument('Argument will not match')->shouldReturn(false); + } + + function its_string_representation_shows_substring() + { + $this->__toString()->shouldReturn('contains("a substring")'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php new file mode 100644 index 0000000..f9a9507 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php @@ -0,0 +1,59 @@ +beConstructedWith('integer'); + } + + function it_implements_TokenInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); + } + + function it_is_not_last() + { + $this->shouldNotBeLast(); + } + + function it_scores_5_if_argument_matches_simple_type() + { + $this->beConstructedWith('integer'); + + $this->scoreArgument(42)->shouldReturn(5); + } + + function it_does_not_scores_if_argument_does_not_match_simple_type() + { + $this->beConstructedWith('integer'); + + $this->scoreArgument(42.0)->shouldReturn(false); + } + + /** + * @param \ReflectionObject $object + */ + function it_scores_5_if_argument_is_an_instance_of_specified_class($object) + { + $this->beConstructedWith('ReflectionClass'); + + $this->scoreArgument($object)->shouldReturn(5); + } + + function it_has_simple_string_representation() + { + $this->__toString()->shouldReturn('type(integer)'); + } + + function it_scores_5_if_argument_is_an_instance_of_specified_interface(\Prophecy\Argument\Token\TokenInterface $interface) + { + $this->beConstructedWith('Prophecy\Argument\Token\TokenInterface'); + + $this->scoreArgument($interface)->shouldReturn(5); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php new file mode 100644 index 0000000..990aa80 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php @@ -0,0 +1,101 @@ +exact(42); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ExactValueToken'); + $token->getValue()->shouldReturn(42); + } + + function it_has_a_shortcut_for_any_argument_token() + { + $token = $this->any(); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValueToken'); + } + + function it_has_a_shortcut_for_multiple_arguments_token() + { + $token = $this->cetera(); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValuesToken'); + } + + function it_has_a_shortcut_for_type_token() + { + $token = $this->type('integer'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\TypeToken'); + } + + function it_has_a_shortcut_for_callback_token() + { + $token = $this->that('get_class'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\CallbackToken'); + } + + function it_has_a_shortcut_for_object_state_token() + { + $token = $this->which('getName', 'everzet'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ObjectStateToken'); + } + + function it_has_a_shortcut_for_logical_and_token() + { + $token = $this->allOf('integer', 5); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalAndToken'); + } + + function it_has_a_shortcut_for_array_count_token() + { + $token = $this->size(5); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayCountToken'); + } + + function it_has_a_shortcut_for_array_entry_token() + { + $token = $this->withEntry('key', 'value'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken'); + } + + function it_has_a_shortcut_for_array_every_entry_token() + { + $token = $this->withEveryEntry('value'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEveryEntryToken'); + } + + function it_has_a_shortcut_for_identical_value_token() + { + $token = $this->is('value'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\IdenticalValueToken'); + } + + function it_has_a_shortcut_for_array_entry_token_matching_any_key() + { + $token = $this->containing('value'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken'); + $token->getKey()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken'); + } + + function it_has_a_shortcut_for_array_entry_token_matching_any_value() + { + $token = $this->withKey('key'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken'); + $token->getValue()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken'); + } + + function it_has_a_shortcut_for_logical_not_token() + { + $token = $this->not('kagux'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalNotToken'); + } + + function it_has_a_shortcut_for_string_contains_token() + { + $token = $this->containingString('string'); + $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\StringContainsToken'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php new file mode 100644 index 0000000..e9b91c8 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php @@ -0,0 +1,188 @@ +scoreArguments(array(5, 2, 3))->willReturn(10); + $objectProphecy->getMethodProphecies()->willReturn(array()); + + $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3)); + + $calls = $this->findCalls('setValues', $wildcard); + $calls->shouldHaveCount(1); + + $calls[0]->shouldBeAnInstanceOf('Prophecy\Call\Call'); + $calls[0]->getMethodName()->shouldReturn('setValues'); + $calls[0]->getArguments()->shouldReturn(array(5, 2, 3)); + $calls[0]->getReturnValue()->shouldReturn(null); + } + + function it_returns_null_for_any_call_through_makeCall_if_no_method_prophecies_added( + $objectProphecy + ) + { + $objectProphecy->getMethodProphecies()->willReturn(array()); + + $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3))->shouldReturn(null); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $method1 + * @param \Prophecy\Prophecy\MethodProphecy $method2 + * @param \Prophecy\Prophecy\MethodProphecy $method3 + * @param \Prophecy\Argument\ArgumentsWildcard $arguments1 + * @param \Prophecy\Argument\ArgumentsWildcard $arguments2 + * @param \Prophecy\Argument\ArgumentsWildcard $arguments3 + * @param \Prophecy\Promise\PromiseInterface $promise + */ + function it_executes_promise_of_method_prophecy_that_matches_signature_passed_to_makeCall( + $objectProphecy, $method1, $method2, $method3, $arguments1, $arguments2, $arguments3, + $promise + ) + { + $method1->getMethodName()->willReturn('getName'); + $method1->getArgumentsWildcard()->willReturn($arguments1); + $arguments1->scoreArguments(array('world', 'everything'))->willReturn(false); + + $method2->getMethodName()->willReturn('setTitle'); + $method2->getArgumentsWildcard()->willReturn($arguments2); + $arguments2->scoreArguments(array('world', 'everything'))->willReturn(false); + + $method3->getMethodName()->willReturn('getName'); + $method3->getArgumentsWildcard()->willReturn($arguments3); + $method3->getPromise()->willReturn($promise); + $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200); + + $objectProphecy->getMethodProphecies()->willReturn(array( + 'method1' => array($method1), + 'method2' => array($method2, $method3) + )); + $objectProphecy->getMethodProphecies('getName')->willReturn(array($method1, $method3)); + $objectProphecy->reveal()->willReturn(new \stdClass()); + + $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method3)->willReturn(42); + + $this->makeCall($objectProphecy, 'getName', array('world', 'everything'))->shouldReturn(42); + + $calls = $this->findCalls('getName', $arguments3); + $calls->shouldHaveCount(1); + $calls[0]->getReturnValue()->shouldReturn(42); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $method1 + * @param \Prophecy\Prophecy\MethodProphecy $method2 + * @param \Prophecy\Prophecy\MethodProphecy $method3 + * @param \Prophecy\Argument\ArgumentsWildcard $arguments1 + * @param \Prophecy\Argument\ArgumentsWildcard $arguments2 + * @param \Prophecy\Argument\ArgumentsWildcard $arguments3 + * @param \Prophecy\Promise\PromiseInterface $promise + */ + function it_executes_promise_of_method_prophecy_that_matches_with_highest_score_to_makeCall( + $objectProphecy, $method1, $method2, $method3, $arguments1, $arguments2, $arguments3, + $promise + ) + { + $method1->getMethodName()->willReturn('getName'); + $method1->getArgumentsWildcard()->willReturn($arguments1); + $arguments1->scoreArguments(array('world', 'everything'))->willReturn(50); + + $method2->getMethodName()->willReturn('getName'); + $method2->getArgumentsWildcard()->willReturn($arguments2); + $method2->getPromise()->willReturn($promise); + $arguments2->scoreArguments(array('world', 'everything'))->willReturn(300); + + $method3->getMethodName()->willReturn('getName'); + $method3->getArgumentsWildcard()->willReturn($arguments3); + $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200); + + $objectProphecy->getMethodProphecies()->willReturn(array( + 'method1' => array($method1), + 'method2' => array($method2, $method3) + )); + $objectProphecy->getMethodProphecies('getName')->willReturn(array( + $method1, $method2, $method3 + )); + $objectProphecy->reveal()->willReturn(new \stdClass()); + + $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method2) + ->willReturn('second'); + + $this->makeCall($objectProphecy, 'getName', array('world', 'everything')) + ->shouldReturn('second'); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $method + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + */ + function it_throws_exception_if_call_does_not_match_any_of_defined_method_prophecies( + $objectProphecy, $method, $arguments + ) + { + $method->getMethodName()->willReturn('getName'); + $method->getArgumentsWildcard()->willReturn($arguments); + $arguments->scoreArguments(array('world', 'everything'))->willReturn(false); + $arguments->__toString()->willReturn('arg1, arg2'); + + $objectProphecy->getMethodProphecies()->willReturn(array('method1' => array($method))); + $objectProphecy->getMethodProphecies('getName')->willReturn(array($method)); + + $this->shouldThrow('Prophecy\Exception\Call\UnexpectedCallException') + ->duringMakeCall($objectProphecy, 'getName', array('world', 'everything')); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $method + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + */ + function it_returns_null_if_method_prophecy_that_matches_makeCall_arguments_has_no_promise( + $objectProphecy, $method, $arguments + ) + { + $method->getMethodName()->willReturn('getName'); + $method->getArgumentsWildcard()->willReturn($arguments); + $method->getPromise()->willReturn(null); + $arguments->scoreArguments(array('world', 'everything'))->willReturn(100); + + $objectProphecy->getMethodProphecies()->willReturn(array($method)); + $objectProphecy->getMethodProphecies('getName')->willReturn(array($method)); + + $this->makeCall($objectProphecy, 'getName', array('world', 'everything')) + ->shouldReturn(null); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $wildcard + */ + function it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard( + $objectProphecy, $wildcard + ) + { + $objectProphecy->getMethodProphecies()->willReturn(array()); + + $this->makeCall($objectProphecy, 'getName', array('world')); + $this->makeCall($objectProphecy, 'getName', array('everything')); + $this->makeCall($objectProphecy, 'setName', array(42)); + + $wildcard->scoreArguments(array('world'))->willReturn(false); + $wildcard->scoreArguments(array('everything'))->willReturn(10); + + $calls = $this->findCalls('getName', $wildcard); + + $calls->shouldHaveCount(1); + $calls[0]->getMethodName()->shouldReturn('getName'); + $calls[0]->getArguments()->shouldReturn(array('everything')); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php new file mode 100644 index 0000000..d1a8539 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php @@ -0,0 +1,54 @@ +beConstructedWith('setValues', array(5, 2), 42, $exception, 'some_file.php', 23); + } + + function it_exposes_method_name_through_getter() + { + $this->getMethodName()->shouldReturn('setValues'); + } + + function it_exposes_arguments_through_getter() + { + $this->getArguments()->shouldReturn(array(5, 2)); + } + + function it_exposes_return_value_through_getter() + { + $this->getReturnValue()->shouldReturn(42); + } + + function it_exposes_exception_through_getter($exception) + { + $this->getException()->shouldReturn($exception); + } + + function it_exposes_file_and_line_through_getter() + { + $this->getFile()->shouldReturn('some_file.php'); + $this->getLine()->shouldReturn(23); + } + + function it_returns_shortpath_to_callPlace() + { + $this->getCallPlace()->shouldReturn('some_file.php:23'); + } + + function it_returns_unknown_as_callPlace_if_no_file_or_line_provided() + { + $this->beConstructedWith('setValues', array(), 0, null, null, null); + + $this->getCallPlace()->shouldReturn('unknown'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php new file mode 100644 index 0000000..2d7d934 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php @@ -0,0 +1,59 @@ +shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); + } + + function its_priority_is_100() + { + $this->getPriority()->shouldReturn(100); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_supports_anything($node) + { + $this->supports($node)->shouldReturn(true); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $class + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method + * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg1 + * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg2 + */ + function it_makes_all_constructor_arguments_optional($class, $method, $arg1, $arg2) + { + $class->hasMethod('__construct')->willReturn(true); + $class->getMethod('__construct')->willReturn($method); + $method->getArguments()->willReturn(array($arg1, $arg2)); + + $arg1->setDefault(null)->shouldBeCalled(); + $arg2->setDefault(null)->shouldBeCalled(); + + $method->setCode(Argument::type('string'))->shouldBeCalled(); + + $this->apply($class); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $class + */ + function it_creates_new_constructor_if_object_has_none($class) + { + $class->hasMethod('__construct')->willReturn(false); + $class->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode')) + ->shouldBeCalled(); + + $this->apply($class); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php new file mode 100644 index 0000000..8c348b8 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php @@ -0,0 +1,37 @@ +shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); + } + + function its_priority_is_minus_50() + { + $this->getPriority()->shouldReturn(-50); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method + * @param \Prophecy\Doubler\Generator\Node\MethodNode $getterMethod + */ + function it_uses_parent_code_for_setTraceOptions($node, $method, $getterMethod) + { + $node->hasMethod('setTraceOptions')->willReturn(true); + $node->getMethod('setTraceOptions')->willReturn($method); + $node->hasMethod('getTraceOptions')->willReturn(true); + $node->getMethod('getTraceOptions')->willReturn($getterMethod); + + $method->useParentCode()->shouldBeCalled(); + $getterMethod->useParentCode()->shouldBeCalled(); + + $this->apply($node); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php new file mode 100644 index 0000000..200d961 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php @@ -0,0 +1,44 @@ +shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); + } + + function its_priority_is_49() + { + $this->getPriority()->shouldReturn(49); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method1 + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method2 + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method3 + */ + function it_will_remove_echo_and_eval_methods($node, $method1, $method2, $method3) + { + $node->removeMethod('eval')->shouldBeCalled(); + $node->removeMethod('echo')->shouldBeCalled(); + + $method1->getName()->willReturn('echo'); + $method2->getName()->willReturn('eval'); + $method3->getName()->willReturn('notKeyword'); + + $node->getMethods()->willReturn(array( + 'echo' => $method1, + 'eval' => $method2, + 'notKeyword' => $method3, + )); + + $this->apply($node); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php new file mode 100644 index 0000000..cb1d0f0 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php @@ -0,0 +1,76 @@ +shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_supports_anything($node) + { + $this->supports($node)->shouldReturn(true); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_discovers_api_using_phpdoc($node) + { + $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApi'); + + $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled(); + + $this->apply($node); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_ignores_existing_methods($node) + { + $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiExtended'); + + $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled(); + $node->addMethod(new MethodNode('definedMethod'))->shouldNotBeCalled(); + + $this->apply($node); + } + + function it_has_50_priority() + { + $this->getPriority()->shouldReturn(50); + } +} + +/** + * @method void undefinedMethod() + */ +class MagicalApi +{ + /** + * @return void + */ + public function definedMethod() + { + + } +} + +/** + * @method void undefinedMethod() + * @method void definedMethod() + */ +class MagicalApiExtended extends MagicalApi +{ + +} \ No newline at end of file diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php new file mode 100644 index 0000000..c460814 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php @@ -0,0 +1,83 @@ +shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); + } + + function it_has_priority_of_0() + { + $this->getPriority()->shouldReturn(0); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_supports_any_class($node) + { + $this->supports($node)->shouldReturn(true); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_forces_class_to_implement_ProphecySubjectInterface($node) + { + $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->shouldBeCalled(); + + $node->addProperty('objectProphecy', 'private')->willReturn(null); + $node->getMethods()->willReturn(array()); + $node->hasMethod(Argument::any())->willReturn(false); + $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); + $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); + + $this->apply($node); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + * @param \Prophecy\Doubler\Generator\Node\MethodNode $constructor + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method1 + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method2 + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method3 + */ + function it_forces_all_class_methods_except_constructor_to_proxy_calls_into_prophecy_makeCall( + $node, $constructor, $method1, $method2, $method3 + ) + { + $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->willReturn(null); + $node->addProperty('objectProphecy', 'private')->willReturn(null); + $node->hasMethod(Argument::any())->willReturn(false); + $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); + $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); + + $constructor->getName()->willReturn('__construct'); + $method1->getName()->willReturn('method1'); + $method2->getName()->willReturn('method2'); + $method3->getName()->willReturn('method3'); + + $node->getMethods()->willReturn(array( + 'method1' => $method1, + 'method2' => $method2, + 'method3' => $method3, + )); + + $constructor->setCode(Argument::any())->shouldNotBeCalled(); + + $method1->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());') + ->shouldBeCalled(); + $method2->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());') + ->shouldBeCalled(); + $method3->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());') + ->shouldBeCalled(); + + $this->apply($node); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php new file mode 100644 index 0000000..4116e4d --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php @@ -0,0 +1,47 @@ +shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); + } + + function its_priority_is_50() + { + $this->getPriority()->shouldReturn(50); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $reflectionClassNode + * @param \Prophecy\Doubler\Generator\Node\ClassNode $anotherClassNode + */ + function it_supports_ReflectionClass_only($reflectionClassNode, $anotherClassNode) + { + $reflectionClassNode->getParentClass()->willReturn('ReflectionClass'); + $anotherClassNode->getParentClass()->willReturn('stdClass'); + + $this->supports($reflectionClassNode)->shouldReturn(true); + $this->supports($anotherClassNode)->shouldReturn(false); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $class + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method + * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg1 + * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg2 + */ + function it_makes_all_newInstance_arguments_optional($class, $method, $arg1, $arg2) + { + $class->getMethod('newInstance')->willReturn($method); + $method->getArguments()->willReturn(array($arg1)); + $arg1->setDefault(null)->shouldBeCalled(); + + $this->apply($class); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php new file mode 100644 index 0000000..37fe82f --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php @@ -0,0 +1,91 @@ +shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); + } + + function its_priority_is_50() + { + $this->getPriority()->shouldReturn(50); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_does_not_support_nodes_without_parent_class($node) + { + $node->getParentClass()->willReturn('stdClass'); + $this->supports($node)->shouldReturn(false); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_supports_nodes_with_SplFileInfo_as_parent_class($node) + { + $node->getParentClass()->willReturn('SplFileInfo'); + $this->supports($node)->shouldReturn(true); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_supports_nodes_with_derivative_of_SplFileInfo_as_parent_class($node) + { + $node->getParentClass()->willReturn('SplFileInfo'); + $this->supports($node)->shouldReturn(true); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_adds_a_method_to_node_if_not_exists($node) + { + $node->hasMethod('__construct')->willReturn(false); + $node->addMethod(Argument::any())->shouldBeCalled(); + $node->getParentClass()->shouldBeCalled(); + + $this->apply($node); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method + */ + function it_updates_existing_method_if_found($node, $method) + { + $node->hasMethod('__construct')->willReturn(true); + $node->getMethod('__construct')->willReturn($method); + $node->getParentClass()->shouldBeCalled(); + + $method->useParentCode()->shouldBeCalled(); + + $this->apply($node); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method + */ + function it_should_not_supply_a_file_for_a_directory_iterator($node, $method) + { + $node->hasMethod('__construct')->willReturn(true); + $node->getMethod('__construct')->willReturn($method); + $node->getParentClass()->willReturn('DirectoryIterator'); + + $method->setCode(Argument::that(function($value) { + return strpos($value, '.php') === false; + }))->shouldBeCalled(); + + $this->apply($node); + } + +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php new file mode 100644 index 0000000..2279b72 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php @@ -0,0 +1,61 @@ +shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_supports_class_that_implements_only_Traversable($node) + { + $node->getInterfaces()->willReturn(array('Traversable')); + + $this->supports($node)->shouldReturn(true); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_does_not_support_class_that_implements_Iterator($node) + { + $node->getInterfaces()->willReturn(array('Traversable', 'Iterator')); + + $this->supports($node)->shouldReturn(false); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_does_not_support_class_that_implements_IteratorAggregate($node) + { + $node->getInterfaces()->willReturn(array('Traversable', 'IteratorAggregate')); + + $this->supports($node)->shouldReturn(false); + } + + function it_has_100_priority() + { + $this->getPriority()->shouldReturn(100); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_forces_node_to_implement_IteratorAggregate($node) + { + $node->addInterface('Iterator')->shouldBeCalled(); + + $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); + + $this->apply($node); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php new file mode 100644 index 0000000..a39fa87 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php @@ -0,0 +1,122 @@ +beConstructedWith($mirror, $creator, $namer); + } + + function it_does_not_have_patches_by_default() + { + $this->getClassPatches()->shouldHaveCount(0); + } + + /** + * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $patch + */ + function its_registerClassPatch_adds_a_patch_to_the_doubler($patch) + { + $this->registerClassPatch($patch); + $this->getClassPatches()->shouldReturn(array($patch)); + } + + /** + * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt1 + * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt2 + * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt3 + * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt4 + */ + function its_getClassPatches_sorts_patches_by_priority($alt1, $alt2, $alt3, $alt4) + { + $alt1->getPriority()->willReturn(2); + $alt2->getPriority()->willReturn(50); + $alt3->getPriority()->willReturn(10); + $alt4->getPriority()->willReturn(0); + + $this->registerClassPatch($alt1); + $this->registerClassPatch($alt2); + $this->registerClassPatch($alt3); + $this->registerClassPatch($alt4); + + $this->getClassPatches()->shouldReturn(array($alt2, $alt3, $alt1, $alt4)); + } + + /** + * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt1 + * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt2 + * @param \ReflectionClass $class + * @param \ReflectionClass $interface1 + * @param \ReflectionClass $interface2 + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function its_double_mirrors_alterates_and_instantiates_provided_class( + $mirror, $creator, $namer, $alt1, $alt2, $class, $interface1, $interface2, $node + ) + { + $mirror->reflect($class, array($interface1, $interface2))->willReturn($node); + $alt1->supports($node)->willReturn(true); + $alt2->supports($node)->willReturn(false); + $alt1->getPriority()->willReturn(1); + $alt2->getPriority()->willReturn(2); + $namer->name($class, array($interface1, $interface2))->willReturn('SplStack'); + $class->getName()->willReturn('stdClass'); + $interface1->getName()->willReturn('ArrayAccess'); + $interface2->getName()->willReturn('Iterator'); + + $alt1->apply($node)->shouldBeCalled(); + $alt2->apply($node)->shouldNotBeCalled(); + $creator->create('SplStack', $node)->shouldBeCalled(); + + $this->registerClassPatch($alt1); + $this->registerClassPatch($alt2); + + $this->double($class, array($interface1, $interface2)) + ->shouldReturnAnInstanceOf('SplStack'); + } + + /** + * @param \ReflectionClass $class + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_double_instantiates_a_class_with_constructor_argument($mirror, $class, $node, $namer) + { + $class->getName()->willReturn('ReflectionClass'); + $mirror->reflect($class, array())->willReturn($node); + $namer->name($class, array())->willReturn('ReflectionClass'); + + $double = $this->double($class, array(), array('stdClass')); + $double->shouldBeAnInstanceOf('ReflectionClass'); + $double->getName()->shouldReturn('stdClass'); + } + + /** + * @param \ReflectionClass $class + * @param \Prophecy\Doubler\Generator\Node\ClassNode $node + */ + function it_can_instantiate_class_with_final_constructor($mirror, $class, $node, $namer) + { + $class->getName()->willReturn('spec\Prophecy\Doubler\WithFinalConstructor'); + $mirror->reflect($class, array())->willReturn($node); + $namer->name($class, array())->willReturn('spec\Prophecy\Doubler\WithFinalConstructor'); + + $double = $this->double($class, array()); + + $double->shouldBeAnInstanceOf('spec\Prophecy\Doubler\WithFinalConstructor'); + } +} + +class WithFinalConstructor +{ + final public function __construct() {} +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php new file mode 100644 index 0000000..1dc8cda --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php @@ -0,0 +1,186 @@ +getParentClass()->willReturn('RuntimeException'); + $class->getInterfaces()->willReturn(array( + 'Prophecy\Doubler\Generator\MirroredInterface', 'ArrayAccess', 'ArrayIterator' + )); + $class->getProperties()->willReturn(array('name' => 'public', 'email' => 'private')); + $class->getMethods()->willReturn(array($method1, $method2, $method3)); + + $method1->getName()->willReturn('getName'); + $method1->getVisibility()->willReturn('public'); + $method1->returnsReference()->willReturn(false); + $method1->isStatic()->willReturn(true); + $method1->getArguments()->willReturn(array($argument11, $argument12)); + $method1->getCode()->willReturn('return $this->name;'); + + $method2->getName()->willReturn('getEmail'); + $method2->getVisibility()->willReturn('protected'); + $method2->returnsReference()->willReturn(false); + $method2->isStatic()->willReturn(false); + $method2->getArguments()->willReturn(array($argument21)); + $method2->getCode()->willReturn('return $this->email;'); + + $method3->getName()->willReturn('getRefValue'); + $method3->getVisibility()->willReturn('public'); + $method3->returnsReference()->willReturn(true); + $method3->isStatic()->willReturn(false); + $method3->getArguments()->willReturn(array($argument31)); + $method3->getCode()->willReturn('return $this->refValue;'); + + $argument11->getName()->willReturn('fullname'); + $argument11->getTypeHint()->willReturn('array'); + $argument11->isOptional()->willReturn(true); + $argument11->getDefault()->willReturn(null); + $argument11->isPassedByReference()->willReturn(false); + + $argument12->getName()->willReturn('class'); + $argument12->getTypeHint()->willReturn('ReflectionClass'); + $argument12->isOptional()->willReturn(false); + $argument12->isPassedByReference()->willReturn(false); + + $argument21->getName()->willReturn('default'); + $argument21->getTypeHint()->willReturn(null); + $argument21->isOptional()->willReturn(true); + $argument21->getDefault()->willReturn('ever.zet@gmail.com'); + $argument21->isPassedByReference()->willReturn(false); + + $argument31->getName()->willReturn('refValue'); + $argument31->getTypeHint()->willReturn(null); + $argument31->isOptional()->willReturn(false); + $argument31->getDefault()->willReturn(); + $argument31->isPassedByReference()->willReturn(false); + + $code = $this->generate('CustomClass', $class); + $expected = <<<'PHP' +namespace { +class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface, \ArrayAccess, \ArrayIterator { +public $name; +private $email; + +public static function getName(array $fullname = NULL, \ReflectionClass $class) { +return $this->name; +} +protected function getEmail( $default = 'ever.zet@gmail.com') { +return $this->email; +} +public function &getRefValue( $refValue) { +return $this->refValue; +} + +} +} +PHP; + $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); + $code->shouldBe($expected); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $class + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method + * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument + */ + function it_overrides_properly_methods_with_args_passed_by_reference( + $class, $method, $argument + ) + { + $class->getParentClass()->willReturn('RuntimeException'); + $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); + $class->getProperties()->willReturn(array()); + $class->getMethods()->willReturn(array($method)); + + $method->getName()->willReturn('getName'); + $method->getVisibility()->willReturn('public'); + $method->isStatic()->willReturn(false); + $method->getArguments()->willReturn(array($argument)); + $method->returnsReference()->willReturn(false); + $method->getCode()->willReturn('return $this->name;'); + + $argument->getName()->willReturn('fullname'); + $argument->getTypeHint()->willReturn('array'); + $argument->isOptional()->willReturn(true); + $argument->getDefault()->willReturn(null); + $argument->isPassedByReference()->willReturn(true); + + $code = $this->generate('CustomClass', $class); + $expected =<<<'PHP' +namespace { +class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface { + +public function getName(array &$fullname = NULL) { +return $this->name; +} + +} +} +PHP; + $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); + $code->shouldBe($expected); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $class + */ + function it_generates_empty_class_for_empty_ClassNode($class) + { + $class->getParentClass()->willReturn('stdClass'); + $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); + $class->getProperties()->willReturn(array()); + $class->getMethods()->willReturn(array()); + + $code = $this->generate('CustomClass', $class); + $expected =<<<'PHP' +namespace { +class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface { + + +} +} +PHP; + $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); + $code->shouldBe($expected); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $class + */ + function it_wraps_class_in_namespace_if_it_is_namespaced($class) + { + $class->getParentClass()->willReturn('stdClass'); + $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); + $class->getProperties()->willReturn(array()); + $class->getMethods()->willReturn(array()); + + $code = $this->generate('My\Awesome\CustomClass', $class); + $expected =<<<'PHP' +namespace My\Awesome { +class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface { + + +} +} +PHP; + $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); + $code->shouldBe($expected); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php new file mode 100644 index 0000000..c7b5700 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php @@ -0,0 +1,44 @@ +beConstructedWith($generator); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $class + */ + function it_evaluates_code_generated_by_ClassCodeGenerator($generator, $class) + { + $generator->generate('stdClass', $class)->shouldBeCalled()->willReturn( + 'return 42;' + ); + + $this->create('stdClass', $class)->shouldReturn(42); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ClassNode $class + */ + function it_throws_an_exception_if_class_does_not_exist_after_evaluation($generator, $class) + { + $generator->generate('CustomClass', $class)->shouldBeCalled()->willReturn( + 'return 42;' + ); + + $class->getParentClass()->willReturn('stdClass'); + $class->getInterfaces()->willReturn(array('Interface1', 'Interface2')); + + $this->shouldThrow('Prophecy\Exception\Doubler\ClassCreatorException') + ->duringCreate('CustomClass', $class); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php new file mode 100644 index 0000000..dd9e9c4 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php @@ -0,0 +1,554 @@ +getName()->willReturn('Custom\ClassName'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array( + $method1, $method2, $method3 + )); + + $method1->getName()->willReturn('getName'); + $method2->getName()->willReturn('isPublic'); + $method3->getName()->willReturn('isAbstract'); + + $method1->isFinal()->willReturn(false); + $method2->isFinal()->willReturn(false); + $method3->isFinal()->willReturn(false); + + $method1->isProtected()->willReturn(false); + $method2->isProtected()->willReturn(false); + $method3->isProtected()->willReturn(false); + + $method1->isStatic()->willReturn(false); + $method2->isStatic()->willReturn(false); + $method3->isStatic()->willReturn(false); + + $method1->returnsReference()->willReturn(false); + $method2->returnsReference()->willReturn(false); + $method3->returnsReference()->willReturn(false); + + $method1->getParameters()->willReturn(array()); + $method2->getParameters()->willReturn(array()); + $method3->getParameters()->willReturn(array()); + + $classNode = $this->reflect($class, array()); + $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); + $classNode->getParentClass()->shouldReturn('Custom\ClassName'); + + $methodNodes = $classNode->getMethods(); + $methodNodes->shouldHaveCount(3); + + $classNode->hasMethod('getName')->shouldReturn(true); + $classNode->hasMethod('isPublic')->shouldReturn(true); + $classNode->hasMethod('isAbstract')->shouldReturn(true); + } + + /** + * @param ReflectionClass $class + * @param ReflectionMethod $method + * @param ReflectionParameter $parameter + */ + function it_changes_argument_names_if_they_are_varying($class, $method, $parameter) + { + + $class->getName()->willReturn('Custom\ClassName'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); + + $method->getParameters()->willReturn(array($parameter)); + $method->getName()->willReturn('methodName'); + $method->isFinal()->willReturn(false); + $method->isProtected()->willReturn(false); + $method->isStatic()->willReturn(false); + $method->returnsReference()->willReturn(false); + + $parameter->getName()->willReturn('...'); + $parameter->isDefaultValueAvailable()->willReturn(true); + $parameter->getDefaultValue()->willReturn(null); + $parameter->isPassedByReference()->willReturn(false); + $parameter->getClass()->willReturn($class); + + $classNode = $this->reflect($class, array()); + + $methodNodes = $classNode->getMethods(); + + $argumentNodes = $methodNodes['methodName']->getArguments(); + $argumentNode = $argumentNodes[0]; + + $argumentNode->getName()->shouldReturn('__dot_dot_dot__'); + } + + /** + * @param ReflectionClass $class + * @param ReflectionMethod $method + */ + function it_reflects_protected_abstract_methods($class, $method) + { + $class->getName()->willReturn('Custom\ClassName'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array($method)); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array()); + + $method->isProtected()->willReturn(true); + $method->isStatic()->willReturn(false); + $method->getParameters()->willReturn(array()); + $method->getName()->willReturn('innerDetail'); + $method->returnsReference()->willReturn(false); + + + $classNode = $this->reflect($class, array()); + $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); + $classNode->getParentClass()->shouldReturn('Custom\ClassName'); + + $methodNodes = $classNode->getMethods(); + $methodNodes->shouldHaveCount(1); + + $methodNodes['innerDetail']->getVisibility()->shouldReturn('protected'); + } + + /** + * @param ReflectionClass $class + * @param ReflectionMethod $method + */ + function it_reflects_public_static_methods($class, $method) + { + $class->getName()->willReturn('Custom\ClassName'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array($method)); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array()); + + $method->isProtected()->willReturn(true); + $method->isStatic()->willReturn(true); + $method->getParameters()->willReturn(array()); + $method->getName()->willReturn('innerDetail'); + $method->returnsReference()->willReturn(false); + + $classNode = $this->reflect($class, array()); + $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); + $classNode->getParentClass()->shouldReturn('Custom\ClassName'); + + $methodNodes = $classNode->getMethods(); + $methodNodes->shouldHaveCount(1); + + $methodNodes['innerDetail']->getVisibility()->shouldReturn('protected'); + $methodNodes['innerDetail']->isStatic()->shouldReturn(true); + } + + /** + * @param ReflectionClass $class + * @param ReflectionMethod $method + * @param ReflectionParameter $param1 + * @param ReflectionParameter $param2 + * @param ReflectionClass $typeHint + * @param ReflectionParameter $param3 + */ + function it_properly_reads_methods_arguments_with_types( + $class, $method, $param1, $param2, $typeHint, $param3 + ) + { + $class->getName()->willReturn('Custom\ClassName'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); + + $method->getName()->willReturn('methodWithArgs'); + $method->isFinal()->willReturn(false); + $method->isProtected()->willReturn(true); + $method->isStatic()->willReturn(false); + $method->returnsReference()->willReturn(false); + $method->getParameters()->willReturn(array($param1, $param2, $param3)); + + $param1->getName()->willReturn('arg_1'); + $param1->isArray()->willReturn(true); + $param1->getClass()->willReturn(null); + $param1->isDefaultValueAvailable()->willReturn(true); + $param1->isPassedByReference()->willReturn(false); + $param1->allowsNull()->willReturn(false); + $param1->getDefaultValue()->willReturn(array()); + + $param2->getName()->willReturn('arg2'); + $param2->isArray()->willReturn(false); + $param2->getClass()->willReturn($typeHint); + $param2->isDefaultValueAvailable()->willReturn(false); + $param2->isOptional()->willReturn(false); + $param2->isPassedByReference()->willReturn(false); + $param2->allowsNull()->willReturn(false); + $typeHint->getName()->willReturn('ArrayAccess'); + + $param3->getName()->willReturn('arg_3'); + $param3->isArray()->willReturn(false); + if (version_compare(PHP_VERSION, '5.4', '>=')) { + $param3->isCallable()->willReturn(true); + } + $param3->getClass()->willReturn(null); + $param3->isOptional()->willReturn(false); + $param3->isDefaultValueAvailable()->willReturn(false); + $param3->isPassedByReference()->willReturn(false); + $param3->allowsNull()->willReturn(true); + + $classNode = $this->reflect($class, array()); + $methodNodes = $classNode->getMethods(); + $argNodes = $methodNodes['methodWithArgs']->getArguments(); + + $argNodes[0]->getName()->shouldReturn('arg_1'); + $argNodes[0]->getTypeHint()->shouldReturn('array'); + $argNodes[0]->isOptional()->shouldReturn(true); + $argNodes[0]->getDefault()->shouldReturn(array()); + + $argNodes[1]->getName()->shouldReturn('arg2'); + $argNodes[1]->getTypeHint()->shouldReturn('ArrayAccess'); + $argNodes[1]->isOptional()->shouldReturn(false); + + $argNodes[2]->getName()->shouldReturn('arg_3'); + if (version_compare(PHP_VERSION, '5.4', '>=')) { + $argNodes[2]->getTypeHint()->shouldReturn('callable'); + $argNodes[2]->isOptional()->shouldReturn(true); + $argNodes[2]->getDefault()->shouldReturn(null); + } else { + $argNodes[2]->isOptional()->shouldReturn(false); + } + } + + /** + * @param ReflectionClass $class + * @param ReflectionMethod $method + * @param ReflectionParameter $param1 + */ + function it_marks_required_args_without_types_as_not_optional( + $class, $method, $param1 + ) + { + $class->getName()->willReturn('Custom\ClassName'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); + + $method->getName()->willReturn('methodWithArgs'); + $method->isFinal()->willReturn(false); + $method->isProtected()->willReturn(false); + $method->isStatic()->willReturn(false); + $method->returnsReference()->willReturn(false); + $method->getParameters()->willReturn(array($param1)); + + $param1->getName()->willReturn('arg_1'); + $param1->isArray()->willReturn(false); + if (version_compare(PHP_VERSION, '5.4', '>=')) { + $param1->isCallable()->willReturn(false); + } + $param1->getClass()->willReturn(null); + $param1->isDefaultValueAvailable()->willReturn(false); + $param1->isOptional()->willReturn(false); + $param1->isPassedByReference()->willReturn(false); + $param1->allowsNull()->willReturn(true); + if (defined('HHVM_VERSION')) { + $param1->getTypehintText()->willReturn(null); + } + + $classNode = $this->reflect($class, array()); + $methodNodes = $classNode->getMethods(); + $argNodes = $methodNodes['methodWithArgs']->getArguments(); + + $argNodes[0]->isOptional()->shouldReturn(false); + } + + /** + * @param ReflectionClass $class + * @param ReflectionMethod $method + * @param ReflectionParameter $param1 + * @param ReflectionParameter $param2 + * @param ReflectionClass $typeHint + */ + function it_marks_passed_by_reference_args_as_passed_by_reference( + $class, $method, $param1, $param2, $typeHint + ) + { + $class->getName()->willReturn('Custom\ClassName'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); + + $method->getName()->willReturn('methodWithArgs'); + $method->isFinal()->willReturn(false); + $method->isProtected()->willReturn(false); + $method->isStatic()->willReturn(false); + $method->returnsReference()->willReturn(false); + $method->getParameters()->willReturn(array($param1, $param2)); + + $param1->getName()->willReturn('arg_1'); + $param1->isArray()->willReturn(false); + if (version_compare(PHP_VERSION, '5.4', '>=')) { + $param1->isCallable()->willReturn(false); + } + $param1->getClass()->willReturn(null); + $param1->isDefaultValueAvailable()->willReturn(false); + $param1->isOptional()->willReturn(true); + $param1->isPassedByReference()->willReturn(true); + $param1->allowsNull()->willReturn(false); + if (defined('HHVM_VERSION')) { + $param1->getTypehintText()->willReturn(null); + } + + $param2->getName()->willReturn('arg2'); + $param2->isArray()->willReturn(false); + $param2->getClass()->willReturn($typeHint); + $param2->isDefaultValueAvailable()->willReturn(false); + $param2->isOptional()->willReturn(false); + $param2->isPassedByReference()->willReturn(false); + $param2->allowsNull()->willReturn(false); + $typeHint->getName()->willReturn('ArrayAccess'); + + $classNode = $this->reflect($class, array()); + $methodNodes = $classNode->getMethods(); + $argNodes = $methodNodes['methodWithArgs']->getArguments(); + + $argNodes[0]->isPassedByReference()->shouldReturn(true); + $argNodes[1]->isPassedByReference()->shouldReturn(false); + } + + /** + * @param ReflectionClass $class + */ + function it_throws_an_exception_if_class_is_final($class) + { + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(true); + $class->getName()->willReturn('Custom\ClassName'); + + $this->shouldThrow('Prophecy\Exception\Doubler\ClassMirrorException') + ->duringReflect($class, array()); + } + + /** + * @param ReflectionClass $class + * @param ReflectionMethod $method + */ + function it_ignores_final_methods($class, $method) + { + $class->getName()->willReturn('Custom\ClassName'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); + + $method->isFinal()->willReturn(true); + $method->getName()->willReturn('finalImplementation'); + + $classNode = $this->reflect($class, array()); + $classNode->getMethods()->shouldHaveCount(0); + } + + /** + * @param ReflectionClass $interface + */ + function it_throws_an_exception_if_interface_provided_instead_of_class($interface) + { + $interface->isInterface()->willReturn(true); + $interface->getName()->willReturn('Custom\ClassName'); + + $this->shouldThrow('Prophecy\Exception\InvalidArgumentException') + ->duringReflect($interface, array()); + } + + /** + * @param ReflectionClass $interface1 + * @param ReflectionClass $interface2 + * @param ReflectionMethod $method1 + * @param ReflectionMethod $method2 + * @param ReflectionMethod $method3 + */ + function it_reflects_all_interfaces_methods( + $interface1, $interface2, $method1, $method2, $method3 + ) + { + $interface1->getName()->willReturn('MyInterface1'); + $interface2->getName()->willReturn('MyInterface2'); + + $interface1->isInterface()->willReturn(true); + $interface2->isInterface()->willReturn(true); + + $interface1->getMethods()->willReturn(array($method1)); + $interface2->getMethods()->willReturn(array($method2, $method3)); + + $method1->getName()->willReturn('getName'); + $method2->getName()->willReturn('isPublic'); + $method3->getName()->willReturn('isAbstract'); + + $method1->isProtected()->willReturn(false); + $method2->isProtected()->willReturn(false); + $method3->isProtected()->willReturn(false); + + $method1->returnsReference()->willReturn(false); + $method2->returnsReference()->willReturn(false); + $method3->returnsReference()->willReturn(false); + + $method1->isStatic()->willReturn(false); + $method2->isStatic()->willReturn(false); + $method3->isStatic()->willReturn(false); + + $method1->getParameters()->willReturn(array()); + $method2->getParameters()->willReturn(array()); + $method3->getParameters()->willReturn(array()); + + $classNode = $this->reflect(null, array($interface1, $interface2)); + + $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); + $classNode->getParentClass()->shouldReturn('stdClass'); + $classNode->getInterfaces()->shouldReturn(array( + 'Prophecy\Doubler\Generator\ReflectionInterface', 'MyInterface2', 'MyInterface1', + )); + + $methodNodes = $classNode->getMethods(); + $methodNodes->shouldHaveCount(3); + + $classNode->hasMethod('getName')->shouldReturn(true); + $classNode->hasMethod('isPublic')->shouldReturn(true); + $classNode->hasMethod('isAbstract')->shouldReturn(true); + } + + /** + * @param ReflectionClass $class + * @param ReflectionMethod $method1 + * @param ReflectionMethod $method2 + * @param ReflectionMethod $method3 + */ + function it_ignores_virtually_private_methods($class, $method1, $method2, $method3) + { + $class->getName()->willReturn('SomeClass'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method1, $method2, $method3)); + + $method1->getName()->willReturn('_getName'); + $method2->getName()->willReturn('__toString'); + $method3->getName()->willReturn('isAbstract'); + + $method1->isFinal()->willReturn(false); + $method2->isFinal()->willReturn(false); + $method3->isFinal()->willReturn(false); + + $method1->isProtected()->willReturn(false); + $method2->isProtected()->willReturn(false); + $method3->isProtected()->willReturn(false); + + $method1->isStatic()->willReturn(false); + $method2->isStatic()->willReturn(false); + $method3->isStatic()->willReturn(false); + + $method1->returnsReference()->willReturn(false); + $method2->returnsReference()->willReturn(false); + $method3->returnsReference()->willReturn(false); + + $method1->getParameters()->willReturn(array()); + $method2->getParameters()->willReturn(array()); + $method3->getParameters()->willReturn(array()); + + $classNode = $this->reflect($class, array()); + $methodNodes = $classNode->getMethods(); + $methodNodes->shouldHaveCount(2); + + $classNode->hasMethod('isAbstract')->shouldReturn(true); + } + + /** + * @param ReflectionClass $class + * @param ReflectionMethod $method + */ + function it_does_not_throw_exception_for_virtually_private_finals($class, $method) + { + $class->getName()->willReturn('SomeClass'); + $class->isInterface()->willReturn(false); + $class->isFinal()->willReturn(false); + $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); + $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); + + $method->getName()->willReturn('__toString'); + $method->isFinal()->willReturn(true); + + $this->shouldNotThrow()->duringReflect($class, array()); + } + + /** + * @param ReflectionClass $class + */ + function it_throws_an_exception_if_class_provided_in_interfaces_list($class) + { + $class->getName()->willReturn('MyClass'); + $class->isInterface()->willReturn(false); + + $this->shouldThrow('InvalidArgumentException') + ->duringReflect(null, array($class)); + } + + function it_throws_an_exception_if_not_reflection_provided_as_interface() + { + $this->shouldThrow('InvalidArgumentException') + ->duringReflect(null, array(null)); + } + + function it_doesnt_fail_to_typehint_nonexistent_FQCN() + { + $classNode = $this->reflect(new ReflectionClass('spec\Prophecy\Doubler\Generator\OptionalDepsClass'), array()); + $method = $classNode->getMethod('iHaveAStrangeTypeHintedArg'); + $arguments = $method->getArguments(); + $arguments[0]->getTypeHint()->shouldBe('I\Simply\Am\Nonexistent'); + } + + function it_doesnt_fail_to_typehint_nonexistent_RQCN() + { + $classNode = $this->reflect(new ReflectionClass('spec\Prophecy\Doubler\Generator\OptionalDepsClass'), array()); + $method = $classNode->getMethod('iHaveAnEvenStrangerTypeHintedArg'); + $arguments = $method->getArguments(); + $arguments[0]->getTypeHint()->shouldBe('I\Simply\Am\Not'); + } + + function it_doesnt_use_scalar_typehints() + { + $classNode = $this->reflect(new ReflectionClass('ReflectionMethod'), array()); + $method = $classNode->getMethod('export'); + $arguments = $method->getArguments(); + $arguments[0]->getTypeHint()->shouldReturn(null); + $arguments[1]->getTypeHint()->shouldReturn(null); + $arguments[2]->getTypeHint()->shouldReturn(null); + } +} + +class OptionalDepsClass +{ + public function iHaveAStrangeTypeHintedArg(\I\Simply\Am\Nonexistent $class) + { + } + + public function iHaveAnEvenStrangerTypeHintedArg(Simply\Am\Not $class) + { + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php new file mode 100644 index 0000000..cea578f --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php @@ -0,0 +1,62 @@ +beConstructedWith('name'); + } + + function it_is_not_be_passed_by_reference_by_default() + { + $this->shouldNotBePassedByReference(); + } + + function it_is_passed_by_reference_if_marked() + { + $this->setAsPassedByReference(); + $this->shouldBePassedByReference(); + } + + function it_has_name_with_which_it_was_been_constructed() + { + $this->getName()->shouldReturn('name'); + } + + function it_has_no_typehint_by_default() + { + $this->getTypeHint()->shouldReturn(null); + } + + function its_typeHint_is_mutable() + { + $this->setTypeHint('array'); + $this->getTypeHint()->shouldReturn('array'); + } + + function it_does_not_have_default_value_by_default() + { + $this->getDefault()->shouldReturn(null); + } + + function it_is_not_optional_by_default() + { + $this->isOptional()->shouldReturn(false); + } + + function its_default_is_mutable() + { + $this->setDefault(array()); + $this->getDefault()->shouldReturn(array()); + } + + function it_is_marked_as_optional_when_default_is_set() + { + $this->setDefault(null); + $this->isOptional()->shouldReturn(true); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php new file mode 100644 index 0000000..18f0e1c --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php @@ -0,0 +1,154 @@ +getParentClass()->shouldReturn('stdClass'); + } + + function its_parentClass_is_mutable() + { + $this->setParentClass('Exception'); + $this->getParentClass()->shouldReturn('Exception'); + } + + function its_parentClass_is_set_to_stdClass_if_user_set_null() + { + $this->setParentClass(null); + $this->getParentClass()->shouldReturn('stdClass'); + } + + function it_does_not_implement_any_interface_by_default() + { + $this->getInterfaces()->shouldHaveCount(0); + } + + function its_addInterface_adds_item_to_the_list_of_implemented_interfaces() + { + $this->addInterface('MyInterface'); + $this->getInterfaces()->shouldHaveCount(1); + } + + function its_hasInterface_returns_true_if_class_implements_interface() + { + $this->addInterface('MyInterface'); + $this->hasInterface('MyInterface')->shouldReturn(true); + } + + function its_hasInterface_returns_false_if_class_does_not_implements_interface() + { + $this->hasInterface('MyInterface')->shouldReturn(false); + } + + function it_supports_implementation_of_multiple_interfaces() + { + $this->addInterface('MyInterface'); + $this->addInterface('MySecondInterface'); + $this->getInterfaces()->shouldHaveCount(2); + } + + function it_ignores_same_interfaces_added_twice() + { + $this->addInterface('MyInterface'); + $this->addInterface('MyInterface'); + + $this->getInterfaces()->shouldHaveCount(1); + $this->getInterfaces()->shouldReturn(array('MyInterface')); + } + + function it_does_not_have_methods_by_default() + { + $this->getMethods()->shouldHaveCount(0); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method1 + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method2 + */ + function it_can_has_methods($method1, $method2) + { + $method1->getName()->willReturn('__construct'); + $method2->getName()->willReturn('getName'); + + $this->addMethod($method1); + $this->addMethod($method2); + + $this->getMethods()->shouldReturn(array( + '__construct' => $method1, + 'getName' => $method2 + )); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method + */ + function its_hasMethod_returns_true_if_method_exists($method) + { + $method->getName()->willReturn('getName'); + + $this->addMethod($method); + + $this->hasMethod('getName')->shouldReturn(true); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method + */ + function its_getMethod_returns_method_by_name($method) + { + $method->getName()->willReturn('getName'); + + $this->addMethod($method); + + $this->getMethod('getName')->shouldReturn($method); + } + + function its_hasMethod_returns_false_if_method_does_not_exists() + { + $this->hasMethod('getName')->shouldReturn(false); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\MethodNode $method + */ + function its_hasMethod_returns_false_if_method_has_been_removed($method) + { + $method->getName()->willReturn('getName'); + $this->addMethod($method); + $this->removeMethod('getName'); + + $this->hasMethod('getName')->shouldReturn(false); + } + + + function it_does_not_have_properties_by_default() + { + $this->getProperties()->shouldHaveCount(0); + } + + function it_is_able_to_have_properties() + { + $this->addProperty('title'); + $this->addProperty('text', 'private'); + $this->getProperties()->shouldReturn(array( + 'title' => 'public', + 'text' => 'private' + )); + } + + function its_addProperty_does_not_accept_unsupported_visibility() + { + $this->shouldThrow('InvalidArgumentException')->duringAddProperty('title', 'town'); + } + + function its_addProperty_lowercases_visibility_before_setting() + { + $this->addProperty('text', 'PRIVATE'); + $this->getProperties()->shouldReturn(array('text' => 'private')); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php new file mode 100644 index 0000000..7582706 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php @@ -0,0 +1,123 @@ +beConstructedWith('getTitle'); + } + + function it_has_a_name() + { + $this->getName()->shouldReturn('getTitle'); + } + + function it_has_public_visibility_by_default() + { + $this->getVisibility()->shouldReturn('public'); + } + + function its_visibility_is_mutable() + { + $this->setVisibility('private'); + $this->getVisibility()->shouldReturn('private'); + } + + function it_is_not_static_by_default() + { + $this->shouldNotBeStatic(); + } + + function it_does_not_return_a_reference_by_default() + { + $this->returnsReference()->shouldReturn(false); + } + + function it_should_be_settable_as_returning_a_reference_through_setter() + { + $this->setReturnsReference(); + $this->returnsReference()->shouldReturn(true); + } + + function it_should_be_settable_as_static_through_setter() + { + $this->setStatic(); + $this->shouldBeStatic(); + } + + function it_accepts_only_supported_visibilities() + { + $this->shouldThrow('InvalidArgumentException')->duringSetVisibility('stealth'); + } + + function it_lowercases_visibility_before_setting_it() + { + $this->setVisibility('Public'); + $this->getVisibility()->shouldReturn('public'); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument1 + * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument2 + */ + function its_useParentCode_causes_method_to_call_parent($argument1, $argument2) + { + $argument1->getName()->willReturn('objectName'); + $argument2->getName()->willReturn('default'); + + $this->addArgument($argument1); + $this->addArgument($argument2); + + $this->useParentCode(); + + $this->getCode()->shouldReturn( + 'return parent::getTitle($objectName, $default);' + ); + } + + function its_code_is_mutable() + { + $this->setCode('echo "code";'); + $this->getCode()->shouldReturn('echo "code";'); + } + + function its_reference_returning_methods_will_generate_exceptions() + { + $this->setCode('echo "code";'); + $this->setReturnsReference(); + $this->getCode()->shouldReturn("throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), 'getTitle');"); + } + + function its_setCode_provided_with_null_cleans_method_body() + { + $this->setCode(null); + $this->getCode()->shouldReturn(''); + } + + function it_is_constructable_with_code() + { + $this->beConstructedWith('getTitle', 'die();'); + $this->getCode()->shouldReturn('die();'); + } + + function it_does_not_have_arguments_by_default() + { + $this->getArguments()->shouldHaveCount(0); + } + + /** + * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument1 + * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument2 + */ + function it_supports_adding_arguments($argument1, $argument2) + { + $this->addArgument($argument1); + $this->addArgument($argument2); + + $this->getArguments()->shouldReturn(array($argument1, $argument2)); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php new file mode 100644 index 0000000..7026126 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php @@ -0,0 +1,96 @@ +beConstructedWith($doubler); + } + + /** + * @param \Prophecy\Prophecy\ProphecySubjectInterface $double + */ + function it_returns_anonymous_double_instance_by_default($doubler, $double) + { + $doubler->double(null, array())->willReturn($double); + + $this->getInstance()->shouldReturn($double); + } + + /** + * @param \Prophecy\Prophecy\ProphecySubjectInterface $double + * @param \ReflectionClass $class + */ + function it_returns_class_double_instance_if_set($doubler, $double, $class) + { + $doubler->double($class, array())->willReturn($double); + + $this->setParentClass($class); + + $this->getInstance()->shouldReturn($double); + } + + /** + * @param \Prophecy\Prophecy\ProphecySubjectInterface $double1 + * @param \Prophecy\Prophecy\ProphecySubjectInterface $double2 + */ + function it_returns_same_double_instance_if_called_2_times( + $doubler, $double1, $double2 + ) + { + $doubler->double(null, array())->willReturn($double1); + $doubler->double(null, array())->willReturn($double2); + + $this->getInstance()->shouldReturn($double2); + $this->getInstance()->shouldReturn($double2); + } + + function its_setParentClass_throws_ClassNotFoundException_if_class_not_found() + { + $this->shouldThrow('Prophecy\Exception\Doubler\ClassNotFoundException') + ->duringSetParentClass('SomeUnexistingClass'); + } + + /** + * @param \Prophecy\Prophecy\ProphecySubjectInterface $double + */ + function its_setParentClass_throws_exception_if_prophecy_is_already_created( + $doubler, $double + ) + { + $doubler->double(null, array())->willReturn($double); + + $this->getInstance(); + + $this->shouldThrow('Prophecy\Exception\Doubler\DoubleException') + ->duringSetParentClass('stdClass'); + } + + function its_addInterface_throws_InterfaceNotFoundException_if_no_interface_found() + { + $this->shouldThrow('Prophecy\Exception\Doubler\InterfaceNotFoundException') + ->duringAddInterface('SomeUnexistingInterface'); + } + + /** + * @param \Prophecy\Prophecy\ProphecySubjectInterface $double + */ + function its_addInterface_throws_exception_if_prophecy_is_already_created( + $doubler, $double + ) + { + $doubler->double(null, array())->willReturn($double); + + $this->getInstance(); + + $this->shouldThrow('Prophecy\Exception\Doubler\DoubleException') + ->duringAddInterface('ArrayAccess'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php new file mode 100644 index 0000000..a3e7491 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php @@ -0,0 +1,72 @@ +getName()->willReturn('stdClass'); + $this->name($class, array())->shouldStartWith('Double\stdClass\\'); + } + + /** + * @param \ReflectionClass $class + */ + function its_name_generates_name_based_on_namespaced_class_reflection($class) + { + $class->getName()->willReturn('Some\Custom\Class'); + $this->name($class, array())->shouldStartWith('Double\Some\Custom\Class\P'); + } + + /** + * @param \ReflectionClass $interface1 + * @param \ReflectionClass $interface2 + */ + function its_name_generates_name_based_on_interface_shortnames($interface1, $interface2) + { + $interface1->getShortName()->willReturn('HandlerInterface'); + $interface2->getShortName()->willReturn('LoaderInterface'); + + $this->name(null, array($interface1, $interface2))->shouldStartWith( + 'Double\HandlerInterface\LoaderInterface\P' + ); + } + + function it_generates_proper_name_for_no_class_and_interfaces_list() + { + $this->name(null, array())->shouldStartWith('Double\stdClass\P'); + } + + /** + * @param \ReflectionClass $class + * @param \ReflectionClass $interface1 + * @param \ReflectionClass $interface2 + */ + function its_name_generates_name_based_only_on_class_if_its_available( + $class, $interface1, $interface2 + ) + { + $class->getName()->willReturn('Some\Custom\Class'); + $interface1->getShortName()->willReturn('HandlerInterface'); + $interface2->getShortName()->willReturn('LoaderInterface'); + + $this->name($class, array($interface1, $interface2))->shouldStartWith( + 'Double\Some\Custom\Class\P' + ); + } + + public function getMatchers() + { + return array( + 'startWith' => function ($subject, $string) { + return 0 === strpos($subject, $string); + }, + ); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php new file mode 100644 index 0000000..6fd1a5c --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php @@ -0,0 +1,32 @@ +beConstructedWith('msg', $objectProphecy, 'getName', array('arg1', 'arg2')); + } + + function it_is_prophecy_exception() + { + $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ObjectProphecyException'); + } + + function it_exposes_method_name_through_getter() + { + $this->getMethodName()->shouldReturn('getName'); + } + + function it_exposes_arguments_through_getter() + { + $this->getArguments()->shouldReturn(array('arg1', 'arg2')); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php new file mode 100644 index 0000000..5824138 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php @@ -0,0 +1,28 @@ +beConstructedWith('', $node); + } + + function it_is_a_prophecy_exception() + { + $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception'); + $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); + } + + function it_contains_a_reflected_node($node) + { + $this->getClassNode()->shouldReturn($node); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php new file mode 100644 index 0000000..21e31a3 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php @@ -0,0 +1,27 @@ +beConstructedWith('', $class); + } + + function it_is_a_prophecy_exception() + { + $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception'); + $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); + } + + function it_contains_a_reflected_class_link($class) + { + $this->getReflectedClass()->shouldReturn($class); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php new file mode 100644 index 0000000..251512b --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php @@ -0,0 +1,25 @@ +beConstructedWith('msg', 'CustomClass'); + } + + function it_is_a_prophecy_exception() + { + $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception'); + $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoubleException'); + } + + function its_getClassname_returns_classname() + { + $this->getClassname()->shouldReturn('CustomClass'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php new file mode 100644 index 0000000..6fe5a19 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php @@ -0,0 +1,14 @@ +shouldBeAnInstanceOf('RuntimeException'); + $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php new file mode 100644 index 0000000..ad1a439 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php @@ -0,0 +1,24 @@ +beConstructedWith('msg', 'CustomInterface'); + } + + function it_extends_ClassNotFoundException() + { + $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\ClassNotFoundException'); + } + + function its_getClassname_returns_classname() + { + $this->getClassname()->shouldReturn('CustomInterface'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php new file mode 100644 index 0000000..a889dd7 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php @@ -0,0 +1,40 @@ +beConstructedWith('', 'User', 'getName', array(1, 2, 3)); + } + + function it_is_DoubleException() + { + $this->shouldHaveType('Prophecy\Exception\Doubler\DoubleException'); + } + + function it_has_MethodName() + { + $this->getMethodName()->shouldReturn('getName'); + } + + function it_has_classnamej() + { + $this->getClassname()->shouldReturn('User'); + } + + function it_has_an_arguments_list() + { + $this->getArguments()->shouldReturn(array(1, 2, 3)); + } + + function it_has_a_default_null_argument_list() + { + $this->beConstructedWith('', 'User', 'getName'); + $this->getArguments()->shouldReturn(null); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php new file mode 100644 index 0000000..22a5ebd --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php @@ -0,0 +1,57 @@ +beConstructedWith(null); + } + + function it_is_prediction_exception() + { + $this->shouldBeAnInstanceOf('RuntimeException'); + $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\PredictionException'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + */ + function it_can_store_objectProphecy_link($object) + { + $this->setObjectProphecy($object); + $this->getObjectProphecy()->shouldReturn($object); + } + + function it_should_not_have_exceptions_at_the_beginning() + { + $this->getExceptions()->shouldHaveCount(0); + } + + /** + * @param \Prophecy\Exception\Prediction\PredictionException $exception + */ + function it_should_append_exception_through_append_method($exception) + { + $exception->getMessage()->willReturn('Exception #1'); + + $this->append($exception); + + $this->getExceptions()->shouldReturn(array($exception)); + } + + /** + * @param \Prophecy\Exception\Prediction\PredictionException $exception + */ + function it_should_update_message_during_append($exception) + { + $exception->getMessage()->willReturn('Exception #1'); + + $this->append($exception); + + $this->getMessage()->shouldReturn(" Exception #1"); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php new file mode 100644 index 0000000..473f1a2 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php @@ -0,0 +1,29 @@ +getObjectProphecy()->willReturn($objectProphecy); + + $this->beConstructedWith('message', $methodProphecy); + } + + function it_is_PredictionException() + { + $this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException'); + } + + function it_extends_MethodProphecyException() + { + $this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php new file mode 100644 index 0000000..adad975 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php @@ -0,0 +1,31 @@ +getObjectProphecy()->willReturn($objectProphecy); + + $this->beConstructedWith('message', $methodProphecy, 5, array($call1, $call2)); + } + + function it_extends_UnexpectedCallsException() + { + $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\UnexpectedCallsException'); + } + + function it_should_expose_expectedCount_through_getter() + { + $this->getExpectedCount()->shouldReturn(5); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php new file mode 100644 index 0000000..c0fe24d --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php @@ -0,0 +1,36 @@ +getObjectProphecy()->willReturn($objectProphecy); + + $this->beConstructedWith('message', $methodProphecy, array($call1, $call2)); + } + + function it_is_PredictionException() + { + $this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException'); + } + + function it_extends_MethodProphecyException() + { + $this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException'); + } + + function it_should_expose_calls_list_through_getter($call1, $call2) + { + $this->getCalls()->shouldReturn(array($call1, $call2)); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php new file mode 100644 index 0000000..97cf9e1 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php @@ -0,0 +1,30 @@ +getObjectProphecy()->willReturn($objectProphecy); + + $this->beConstructedWith('message', $methodProphecy); + } + + function it_extends_DoubleException() + { + $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ObjectProphecyException'); + } + + function it_holds_a_stub_reference($methodProphecy) + { + $this->getMethodProphecy()->shouldReturn($methodProphecy); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php new file mode 100644 index 0000000..bcacfed --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php @@ -0,0 +1,27 @@ +beConstructedWith('message', $objectProphecy); + } + + function it_should_be_a_prophecy_exception() + { + $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ProphecyException'); + } + + function it_holds_double_reference($objectProphecy) + { + $this->getObjectProphecy()->shouldReturn($objectProphecy); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php new file mode 100644 index 0000000..3da8c59 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php @@ -0,0 +1,42 @@ +shouldHaveType('Prophecy\Prediction\PredictionInterface'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + * @param \Prophecy\Call\Call $call + */ + function it_does_nothing_if_there_is_more_than_one_call_been_made($object, $method, $call) + { + $this->check(array($call), $object, $method)->shouldReturn(null); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + */ + function it_throws_NoCallsException_if_no_calls_found($object, $method, $arguments) + { + $method->getObjectProphecy()->willReturn($object); + $method->getMethodName()->willReturn('getName'); + $method->getArgumentsWildcard()->willReturn($arguments); + $arguments->__toString()->willReturn('123'); + $object->reveal()->willReturn(new \stdClass()); + $object->findProphecyMethodCalls('getName', Argument::any())->willReturn(array()); + + $this->shouldThrow('Prophecy\Exception\Prediction\NoCallsException') + ->duringCheck(array(), $object, $method); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php new file mode 100644 index 0000000..c670892 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php @@ -0,0 +1,54 @@ +beConstructedWith(2); + } + + function it_is_prediction() + { + $this->shouldHaveType('Prophecy\Prediction\PredictionInterface'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + * @param \Prophecy\Call\Call $call1 + * @param \Prophecy\Call\Call $call2 + */ + function it_does_nothing_if_there_were_exact_amount_of_calls_being_made( + $object, $method, $call1, $call2 + ) + { + $this->check(array($call1, $call2), $object, $method)->shouldReturn(null); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + * @param \Prophecy\Call\Call $call + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + */ + function it_throws_UnexpectedCallsCountException_if_calls_found( + $object, $method, $call, $arguments + ) + { + $method->getObjectProphecy()->willReturn($object); + $method->getMethodName()->willReturn('getName'); + $method->getArgumentsWildcard()->willReturn($arguments); + $arguments->__toString()->willReturn('123'); + + $call->getMethodName()->willReturn('getName'); + $call->getArguments()->willReturn(array(5, 4, 'three')); + $call->getCallPlace()->willReturn('unknown'); + + $this->shouldThrow('Prophecy\Exception\Prediction\UnexpectedCallsCountException') + ->duringCheck(array($call), $object, $method); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php new file mode 100644 index 0000000..7fe475e --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php @@ -0,0 +1,36 @@ +beConstructedWith('get_class'); + } + + function it_is_prediction() + { + $this->shouldHaveType('Prophecy\Prediction\PredictionInterface'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + * @param \Prophecy\Call\Call $call + */ + function it_proxies_call_to_callback($object, $method, $call) + { + $returnFirstCallCallback = function ($calls, $object, $method) { + throw new RuntimeException; + }; + + $this->beConstructedWith($returnFirstCallCallback); + + $this->shouldThrow('RuntimeException')->duringCheck(array($call), $object, $method); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php new file mode 100644 index 0000000..a3ef9bc --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php @@ -0,0 +1,43 @@ +shouldHaveType('Prophecy\Prediction\PredictionInterface'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_does_nothing_if_there_is_no_calls_made($object, $method) + { + $this->check(array(), $object, $method)->shouldReturn(null); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + * @param \Prophecy\Call\Call $call + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + */ + function it_throws_UnexpectedCallsException_if_calls_found($object, $method, $call, $arguments) + { + $method->getObjectProphecy()->willReturn($object); + $method->getMethodName()->willReturn('getName'); + $method->getArgumentsWildcard()->willReturn($arguments); + $arguments->__toString()->willReturn('123'); + + $call->getMethodName()->willReturn('getName'); + $call->getArguments()->willReturn(array(5, 4, 'three')); + $call->getCallPlace()->willReturn('unknown'); + + $this->shouldThrow('Prophecy\Exception\Prediction\UnexpectedCallsException') + ->duringCheck(array($call), $object, $method); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php new file mode 100644 index 0000000..5d99b1b --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php @@ -0,0 +1,110 @@ +beConstructedWith('get_class'); + } + + function it_is_promise() + { + $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_should_execute_closure_callback($object, $method) + { + $firstArgumentCallback = function ($args) { + return $args[0]; + }; + + $this->beConstructedWith($firstArgumentCallback); + + $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_should_execute_static_array_callback($object, $method) + { + $firstArgumentCallback = array('spec\Prophecy\Promise\ClassCallback', 'staticCallbackMethod'); + + $this->beConstructedWith($firstArgumentCallback); + + $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_should_execute_instance_array_callback($object, $method) + { + $class = new ClassCallback(); + $firstArgumentCallback = array($class, 'callbackMethod'); + + $this->beConstructedWith($firstArgumentCallback); + + $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_should_execute_string_function_callback($object, $method) + { + $firstArgumentCallback = 'spec\Prophecy\Promise\functionCallbackFirstArgument'; + + $this->beConstructedWith($firstArgumentCallback); + + $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); + } + +} + +/** + * Class used to test callbackpromise + * + * @param array + * @return string + */ +class ClassCallback +{ + /** + * @param array $args + */ + function callbackMethod($args) + { + return $args[0]; + } + + /** + * @param array $args + */ + static function staticCallbackMethod($args) + { + return $args[0]; + } +} + +/** + * Callback function used to test callbackpromise + * + * @param array + * @return string + */ +function functionCallbackFirstArgument($args) +{ + return $args[0]; +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php new file mode 100644 index 0000000..4acb7bb --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php @@ -0,0 +1,41 @@ +shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_should_return_first_argument_if_provided($object, $method) + { + $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_should_return_null_if_no_arguments_provided($object, $method) + { + $this->execute(array(), $object, $method)->shouldReturn(null); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_should_return_nth_argument_if_provided($object, $method) + { + $this->beConstructedWith(1); + $this->execute(array('one', 'two'), $object, $method)->shouldReturn('two'); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php new file mode 100644 index 0000000..18bfd87 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php @@ -0,0 +1,61 @@ +beConstructedWith(array(42)); + } + + function it_is_promise() + { + $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_returns_value_it_was_constructed_with($object, $method) + { + $this->execute(array(), $object, $method)->shouldReturn(42); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_always_returns_last_value_left_in_the_return_values($object, $method) + { + $this->execute(array(), $object, $method)->shouldReturn(42); + $this->execute(array(), $object, $method)->shouldReturn(42); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_consequently_returns_multiple_values_it_was_constructed_with($object, $method) + { + $this->beConstructedWith(array(42, 24, 12)); + + $this->execute(array(), $object, $method)->shouldReturn(42); + $this->execute(array(), $object, $method)->shouldReturn(24); + $this->execute(array(), $object, $method)->shouldReturn(12); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_returns_null_if_constructed_with_empty_array($object, $method) + { + $this->beConstructedWith(array()); + + $this->execute(array(), $object, $method)->shouldReturn(null); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php new file mode 100644 index 0000000..5f44897 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php @@ -0,0 +1,58 @@ +beConstructedWith('RuntimeException'); + } + + function it_is_promise() + { + $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_instantiates_and_throws_exception_from_provided_classname($object, $method) + { + $this->beConstructedWith('InvalidArgumentException'); + + $this->shouldThrow('InvalidArgumentException') + ->duringExecute(array(), $object, $method); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_instantiates_exceptions_with_required_arguments($object, $method) + { + $this->beConstructedWith('spec\Prophecy\Promise\RequiredArgumentException'); + + $this->shouldThrow('spec\Prophecy\Promise\RequiredArgumentException') + ->duringExecute(array(), $object, $method); + } + + /** + * @param \Prophecy\Prophecy\ObjectProphecy $object + * @param \Prophecy\Prophecy\MethodProphecy $method + */ + function it_throws_provided_exception($object, $method) + { + $this->beConstructedWith($exc = new \RuntimeException('Some exception')); + + $this->shouldThrow($exc)->duringExecute(array(), $object, $method); + } +} + +class RequiredArgumentException extends \Exception +{ + final public function __construct($message, $code) {} +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php new file mode 100644 index 0000000..d8299a7 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php @@ -0,0 +1,381 @@ +reveal()->willReturn($reflection); + + $this->beConstructedWith($objectProphecy, 'getName', null); + } + + function it_is_initializable() + { + $this->shouldHaveType('Prophecy\Prophecy\MethodProphecy'); + } + + function its_constructor_throws_MethodNotFoundException_for_unexisting_method($objectProphecy) + { + $this->shouldThrow('Prophecy\Exception\Doubler\MethodNotFoundException')->during( + '__construct', array($objectProphecy, 'getUnexisting', null) + ); + } + + function its_constructor_throws_MethodProphecyException_for_final_methods($objectProphecy, ClassWithFinalMethod $subject) + { + $objectProphecy->reveal()->willReturn($subject); + + $this->shouldThrow('Prophecy\Exception\Prophecy\MethodProphecyException')->during( + '__construct', array($objectProphecy, 'finalMethod', null) + ); + } + + function its_constructor_transforms_array_passed_as_3rd_argument_to_ArgumentsWildcard( + $objectProphecy + ) + { + $this->beConstructedWith($objectProphecy, 'getName', array(42, 33)); + + $wildcard = $this->getArgumentsWildcard(); + $wildcard->shouldNotBe(null); + $wildcard->__toString()->shouldReturn('exact(42), exact(33)'); + } + + function its_constructor_does_not_touch_third_argument_if_it_is_null($objectProphecy) + { + $this->beConstructedWith($objectProphecy, 'getName', null); + + $wildcard = $this->getArgumentsWildcard(); + $wildcard->shouldBe(null); + } + + /** + * @param \Prophecy\Promise\PromiseInterface $promise + */ + function it_records_promise_through_will_method($promise, $objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->will($promise); + $this->getPromise()->shouldReturn($promise); + } + + /** + * @param \Prophecy\Promise\PromiseInterface $promise + */ + function it_adds_itself_to_ObjectProphecy_during_call_to_will($objectProphecy, $promise) + { + $objectProphecy->addMethodProphecy($this)->shouldBeCalled(); + + $this->will($promise); + } + + function it_adds_ReturnPromise_during_willReturn_call($objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->willReturn(42); + $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ReturnPromise'); + } + + function it_adds_ThrowPromise_during_willThrow_call($objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->willThrow('RuntimeException'); + $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ThrowPromise'); + } + + function it_adds_ReturnArgumentPromise_during_willReturnArgument_call($objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->willReturnArgument(); + $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ReturnArgumentPromise'); + } + + function it_adds_ReturnArgumentPromise_during_willReturnArgument_call_with_index_argument($objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->willReturnArgument(1); + $promise = $this->getPromise(); + $promise->shouldBeAnInstanceOf('Prophecy\Promise\ReturnArgumentPromise'); + $promise->execute(array('one', 'two'), $objectProphecy, $this)->shouldReturn('two'); + } + + function it_adds_CallbackPromise_during_will_call_with_callback_argument($objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $callback = function () {}; + + $this->will($callback); + $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\CallbackPromise'); + } + + /** + * @param \Prophecy\Prediction\PredictionInterface $prediction + */ + function it_records_prediction_through_should_method($prediction, $objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->callOnWrappedObject('should', array($prediction)); + $this->getPrediction()->shouldReturn($prediction); + } + + function it_adds_CallbackPrediction_during_should_call_with_callback_argument($objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $callback = function () {}; + + $this->callOnWrappedObject('should', array($callback)); + $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallbackPrediction'); + } + + /** + * @param \Prophecy\Prediction\PredictionInterface $prediction + */ + function it_adds_itself_to_ObjectProphecy_during_call_to_should($objectProphecy, $prediction) + { + $objectProphecy->addMethodProphecy($this)->shouldBeCalled(); + + $this->callOnWrappedObject('should', array($prediction)); + } + + function it_adds_CallPrediction_during_shouldBeCalled_call($objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->callOnWrappedObject('shouldBeCalled', array()); + $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallPrediction'); + } + + function it_adds_NoCallsPrediction_during_shouldNotBeCalled_call($objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->callOnWrappedObject('shouldNotBeCalled', array()); + $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\NoCallsPrediction'); + } + + function it_adds_CallTimesPrediction_during_shouldBeCalledTimes_call($objectProphecy) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->callOnWrappedObject('shouldBeCalledTimes', array(5)); + $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallTimesPrediction'); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + * @param \Prophecy\Prediction\PredictionInterface $prediction + * @param \Prophecy\Call\Call $call1 + * @param \Prophecy\Call\Call $call2 + */ + function it_checks_prediction_via_shouldHave_method_call( + $objectProphecy, $arguments, $prediction, $call1, $call2 + ) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); + $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); + + $this->withArguments($arguments); + $this->callOnWrappedObject('shouldHave', array($prediction)); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + * @param \Prophecy\Prediction\PredictionInterface $prediction + * @param \Prophecy\Call\Call $call1 + * @param \Prophecy\Call\Call $call2 + */ + function it_sets_return_promise_during_shouldHave_call_if_none_was_set_before( + $objectProphecy, $arguments, $prediction, $call1, $call2 + ) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); + $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); + + $this->withArguments($arguments); + $this->callOnWrappedObject('shouldHave', array($prediction)); + + $this->getPromise()->shouldReturnAnInstanceOf('Prophecy\Promise\ReturnPromise'); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + * @param \Prophecy\Prediction\PredictionInterface $prediction + * @param \Prophecy\Call\Call $call1 + * @param \Prophecy\Call\Call $call2 + * @param \Prophecy\Promise\PromiseInterface $promise + */ + function it_does_not_set_return_promise_during_shouldHave_call_if_it_was_set_before( + $objectProphecy, $arguments, $prediction, $call1, $call2, $promise + ) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); + $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); + + $this->will($promise); + $this->withArguments($arguments); + $this->callOnWrappedObject('shouldHave', array($prediction)); + + $this->getPromise()->shouldReturn($promise); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + * @param \Prophecy\Prediction\PredictionInterface $prediction1 + * @param \Prophecy\Prediction\PredictionInterface $prediction2 + * @param \Prophecy\Call\Call $call1 + * @param \Prophecy\Call\Call $call2 + * @param \Prophecy\Promise\PromiseInterface $promise + */ + function it_records_checked_predictions( + $objectProphecy, $arguments, $prediction1, $prediction2, $call1, $call2, $promise + ) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + $prediction1->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn(); + $prediction2->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn(); + $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); + + $this->will($promise); + $this->withArguments($arguments); + $this->callOnWrappedObject('shouldHave', array($prediction1)); + $this->callOnWrappedObject('shouldHave', array($prediction2)); + + $this->getCheckedPredictions()->shouldReturn(array($prediction1, $prediction2)); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + * @param \Prophecy\Prediction\PredictionInterface $prediction + * @param \Prophecy\Call\Call $call1 + * @param \Prophecy\Call\Call $call2 + * @param \Prophecy\Promise\PromiseInterface $promise + */ + function it_records_even_failed_checked_predictions( + $objectProphecy, $arguments, $prediction, $call1, $call2, $promise + ) + { + $objectProphecy->addMethodProphecy($this)->willReturn(null); + $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willThrow(new \RuntimeException()); + $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); + + $this->will($promise); + $this->withArguments($arguments); + + try { + $this->callOnWrappedObject('shouldHave', array($prediction)); + } catch (\Exception $e) {} + + $this->getCheckedPredictions()->shouldReturn(array($prediction)); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + * @param \Prophecy\Prediction\PredictionInterface $prediction + * @param \Prophecy\Call\Call $call1 + * @param \Prophecy\Call\Call $call2 + */ + function it_checks_prediction_via_shouldHave_method_call_with_callback( + $objectProphecy, $arguments, $prediction, $call1, $call2 + ) + { + $callback = function ($calls, $object, $method) { + throw new \RuntimeException; + }; + $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); + + $this->withArguments($arguments); + $this->shouldThrow('RuntimeException')->duringShouldHave($callback); + } + + function it_does_nothing_during_checkPrediction_if_no_prediction_set() + { + $this->checkPrediction()->shouldReturn(null); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + * @param \Prophecy\Prediction\PredictionInterface $prediction + * @param \Prophecy\Call\Call $call1 + * @param \Prophecy\Call\Call $call2 + */ + function it_checks_set_prediction_during_checkPrediction( + $objectProphecy, $arguments, $prediction, $call1, $call2 + ) + { + $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); + $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); + $objectProphecy->addMethodProphecy($this)->willReturn(null); + + $this->withArguments($arguments); + $this->callOnWrappedObject('should', array($prediction)); + $this->checkPrediction(); + } + + function it_links_back_to_ObjectProphecy_through_getter($objectProphecy) + { + $this->getObjectProphecy()->shouldReturn($objectProphecy); + } + + function it_has_MethodName() + { + $this->getMethodName()->shouldReturn('getName'); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $wildcard + */ + function it_contains_ArgumentsWildcard_it_was_constructed_with($objectProphecy, $wildcard) + { + $this->beConstructedWith($objectProphecy, 'getName', $wildcard); + + $this->getArgumentsWildcard()->shouldReturn($wildcard); + } + + /** + * @param \Prophecy\Argument\ArgumentsWildcard $wildcard + */ + function its_ArgumentWildcard_is_mutable_through_setter($wildcard) + { + $this->withArguments($wildcard); + + $this->getArgumentsWildcard()->shouldReturn($wildcard); + } + + function its_withArguments_transforms_passed_array_into_ArgumentsWildcard() + { + $this->withArguments(array(42, 33)); + + $wildcard = $this->getArgumentsWildcard(); + $wildcard->shouldNotBe(null); + $wildcard->__toString()->shouldReturn('exact(42), exact(33)'); + } + + function its_withArguments_throws_exception_if_wrong_arguments_provided() + { + $this->shouldThrow('Prophecy\Exception\InvalidArgumentException')->duringWithArguments(42); + } +} + +class ClassWithFinalMethod +{ + final public function finalMethod() {} +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php new file mode 100644 index 0000000..00f57fe --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php @@ -0,0 +1,305 @@ +beConstructedWith($lazyDouble); + + $lazyDouble->getInstance()->willReturn($double); + } + + function it_implements_ProphecyInterface() + { + $this->shouldBeAnInstanceOf('Prophecy\Prophecy\ProphecyInterface'); + } + + function it_sets_parentClass_during_willExtend_call($lazyDouble) + { + $lazyDouble->setParentClass('123')->shouldBeCalled(); + + $this->willExtend('123'); + } + + function it_adds_interface_during_willImplement_call($lazyDouble) + { + $lazyDouble->addInterface('222')->shouldBeCalled(); + + $this->willImplement('222'); + } + + function it_sets_constructor_arguments_during_willBeConstructedWith_call($lazyDouble) + { + $lazyDouble->setArguments(array(1, 2, 5))->shouldBeCalled(); + + $this->willBeConstructedWith(array(1, 2, 5)); + } + + function it_does_not_have_method_prophecies_by_default() + { + $this->getMethodProphecies()->shouldHaveCount(0); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $method1 + * @param \Prophecy\Prophecy\MethodProphecy $method2 + * @param \Prophecy\Argument\ArgumentsWildcard $arguments + */ + function it_should_get_method_prophecies_by_method_name($method1, $method2, $arguments) + { + $method1->getMethodName()->willReturn('getName'); + $method1->getArgumentsWildcard()->willReturn($arguments); + $method2->getMethodName()->willReturn('setName'); + $method2->getArgumentsWildcard()->willReturn($arguments); + + $this->addMethodProphecy($method1); + $this->addMethodProphecy($method2); + + $methods = $this->getMethodProphecies('setName'); + $methods->shouldHaveCount(1); + $methods[0]->getMethodName()->shouldReturn('setName'); + } + + function it_should_return_empty_array_if_no_method_prophecies_found() + { + $methods = $this->getMethodProphecies('setName'); + $methods->shouldHaveCount(0); + } + + /** + * @param \Prophecy\Call\CallCenter $callCenter + */ + function it_should_proxy_makeProphecyMethodCall_to_CallCenter($lazyDouble, $callCenter) + { + $this->beConstructedWith($lazyDouble, $callCenter); + + $callCenter->makeCall($this->getWrappedObject(), 'setName', array('everzet'))->willReturn(42); + + $this->makeProphecyMethodCall('setName', array('everzet'))->shouldReturn(42); + } + + /** + * @param \Prophecy\Call\CallCenter $callCenter + * @param \Prophecy\Prophecy\RevealerInterface $revealer + */ + function it_should_reveal_arguments_and_return_values_from_callCenter( + $lazyDouble, $callCenter, $revealer + ) + { + $this->beConstructedWith($lazyDouble, $callCenter, $revealer); + + $revealer->reveal(array('question'))->willReturn(array('life')); + $revealer->reveal('answer')->willReturn(42); + + $callCenter->makeCall($this->getWrappedObject(), 'setName', array('life'))->willReturn('answer'); + + $this->makeProphecyMethodCall('setName', array('question'))->shouldReturn(42); + } + + /** + * @param \Prophecy\Call\CallCenter $callCenter + * @param \Prophecy\Argument\ArgumentsWildcard $wildcard + * @param \Prophecy\Call\Call $call + */ + function it_should_proxy_getProphecyMethodCalls_to_CallCenter( + $lazyDouble, $callCenter, $wildcard, $call + ) + { + $this->beConstructedWith($lazyDouble, $callCenter); + + $callCenter->findCalls('setName', $wildcard)->willReturn(array($call)); + + $this->findProphecyMethodCalls('setName', $wildcard)->shouldReturn(array($call)); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy + * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard + */ + function its_addMethodProphecy_adds_method_prophecy( + $methodProphecy, $argumentsWildcard + ) + { + $methodProphecy->getArgumentsWildcard()->willReturn($argumentsWildcard); + $methodProphecy->getMethodName()->willReturn('getUsername'); + + $this->addMethodProphecy($methodProphecy); + + $this->getMethodProphecies()->shouldReturn(array( + 'getUsername' => array($methodProphecy) + )); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy1 + * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy2 + * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard1 + * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard2 + */ + function its_addMethodProphecy_handles_prophecies_with_different_arguments( + $methodProphecy1, $methodProphecy2, $argumentsWildcard1, $argumentsWildcard2 + ) + { + $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1); + $methodProphecy1->getMethodName()->willReturn('getUsername'); + + $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2); + $methodProphecy2->getMethodName()->willReturn('getUsername'); + + $this->addMethodProphecy($methodProphecy1); + $this->addMethodProphecy($methodProphecy2); + + $this->getMethodProphecies()->shouldReturn(array( + 'getUsername' => array( + $methodProphecy1, + $methodProphecy2, + ) + )); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy1 + * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy2 + * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard1 + * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard2 + */ + function its_addMethodProphecy_handles_prophecies_for_different_methods( + $methodProphecy1, $methodProphecy2, $argumentsWildcard1, $argumentsWildcard2 + ) + { + $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1); + $methodProphecy1->getMethodName()->willReturn('getUsername'); + + $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2); + $methodProphecy2->getMethodName()->willReturn('isUsername'); + + $this->addMethodProphecy($methodProphecy1); + $this->addMethodProphecy($methodProphecy2); + + $this->getMethodProphecies()->shouldReturn(array( + 'getUsername' => array( + $methodProphecy1 + ), + 'isUsername' => array( + $methodProphecy2 + ) + )); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy + */ + function its_addMethodProphecy_throws_exception_when_method_has_no_ArgumentsWildcard( + $methodProphecy + ) + { + $methodProphecy->getArgumentsWildcard()->willReturn(null); + $methodProphecy->getObjectProphecy()->willReturn($this); + $methodProphecy->getMethodName()->willReturn('getTitle'); + + $this->shouldThrow('Prophecy\Exception\Prophecy\MethodProphecyException')->duringAddMethodProphecy( + $methodProphecy + ); + } + + function it_returns_null_after_checkPredictions_call_if_there_is_no_method_prophecies() + { + $this->checkProphecyMethodsPredictions()->shouldReturn(null); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy1 + * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy2 + * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard1 + * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard2 + */ + function it_throws_AggregateException_during_checkPredictions_if_predictions_fail( + $methodProphecy1, $methodProphecy2, $argumentsWildcard1, $argumentsWildcard2 + ) + { + $methodProphecy1->getMethodName()->willReturn('getName'); + $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1); + $methodProphecy1->checkPrediction() + ->willThrow('Prophecy\Exception\Prediction\AggregateException'); + + $methodProphecy2->getMethodName()->willReturn('setName'); + $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2); + $methodProphecy2->checkPrediction() + ->willThrow('Prophecy\Exception\Prediction\AggregateException'); + + $this->addMethodProphecy($methodProphecy1); + $this->addMethodProphecy($methodProphecy2); + + $this->shouldThrow('Prophecy\Exception\Prediction\AggregateException') + ->duringCheckProphecyMethodsPredictions(); + } + + /** + * @param \Prophecy\Doubler\Doubler $doubler + * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection + */ + function it_returns_new_MethodProphecy_instance_for_arbitrary_call($doubler, $reflection) + { + $doubler->double(Argument::any())->willReturn($reflection); + + $return = $this->getProphecy(); + $return->shouldBeAnInstanceOf('Prophecy\Prophecy\MethodProphecy'); + $return->getMethodName()->shouldReturn('getProphecy'); + } + + /** + * @param \Prophecy\Doubler\Doubler $doubler + * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection + */ + function it_returns_same_MethodProphecy_for_same_registered_signature($doubler, $reflection) + { + $doubler->double(Argument::any())->willReturn($reflection); + + $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(1, 2, 3)); + $methodProphecy2 = $this->getProphecy(1, 2, 3); + + $methodProphecy2->shouldBe($methodProphecy1); + } + + /** + * @param \Prophecy\Doubler\Doubler $doubler + * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection + */ + function it_returns_new_MethodProphecy_for_different_signatures($doubler, $reflection) + { + $doubler->double(Argument::any())->willReturn($reflection); + + $value = new ObjectProphecySpecFixtureB('ABC'); + $value2 = new ObjectProphecySpecFixtureB('CBA'); + + $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(1, 2, 3, $value)); + $methodProphecy2 = $this->getProphecy(1, 2, 3, $value2); + + $methodProphecy2->shouldNotBe($methodProphecy1); + } +} + +class ObjectProphecySpecFixtureA +{ + public $errors; +} + +class ObjectProphecySpecFixtureB extends ObjectProphecySpecFixtureA +{ + public $errors; + public $value = null; + + public function __construct($value) + { + $this->value = $value; + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php new file mode 100644 index 0000000..4d83d73 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php @@ -0,0 +1,51 @@ +shouldBeAnInstanceOf('Prophecy\Prophecy\RevealerInterface'); + } + + /** + * @param \Prophecy\Prophecy\ProphecyInterface $prophecy + * @param \stdClass $object + */ + function it_reveals_single_instance_of_ProphecyInterface($prophecy, $object) + { + $prophecy->reveal()->willReturn($object); + + $this->reveal($prophecy)->shouldReturn($object); + } + + /** + * @param \Prophecy\Prophecy\ProphecyInterface $prophecy1 + * @param \Prophecy\Prophecy\ProphecyInterface $prophecy2 + * @param \stdClass $object1 + * @param \stdClass $object2 + */ + function it_reveals_instances_of_ProphecyInterface_inside_array( + $prophecy1, $prophecy2, $object1, $object2 + ) + { + $prophecy1->reveal()->willReturn($object1); + $prophecy2->reveal()->willReturn($object2); + + $this->reveal(array( + array('item' => $prophecy2), + $prophecy1 + ))->shouldReturn(array( + array('item' => $object2), + $object1 + )); + } + + function it_does_not_touch_non_prophecy_interface() + { + $this->reveal(42)->shouldReturn(42); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php new file mode 100644 index 0000000..74d5976 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php @@ -0,0 +1,91 @@ +double(null, array())->willReturn($double); + + $this->beConstructedWith($doubler); + } + + function it_constructs_new_prophecy_on_prophesize_call() + { + $prophecy = $this->prophesize(); + $prophecy->shouldBeAnInstanceOf('Prophecy\Prophecy\ObjectProphecy'); + } + + /** + * @param \Prophecy\Prophecy\ProphecySubjectInterface $newDouble + */ + function it_constructs_new_prophecy_with_parent_class_if_specified($doubler, $newDouble) + { + $doubler->double(Argument::any(), array())->willReturn($newDouble); + + $this->prophesize('Prophecy\Prophet')->reveal()->shouldReturn($newDouble); + } + + /** + * @param \Prophecy\Prophecy\ProphecySubjectInterface $newDouble + */ + function it_constructs_new_prophecy_with_interface_if_specified($doubler, $newDouble) + { + $doubler->double(null, Argument::any())->willReturn($newDouble); + + $this->prophesize('ArrayAccess')->reveal()->shouldReturn($newDouble); + } + + function it_exposes_all_created_prophecies_through_getter() + { + $prophecy1 = $this->prophesize(); + $prophecy2 = $this->prophesize(); + + $this->getProphecies()->shouldReturn(array($prophecy1, $prophecy2)); + } + + function it_does_nothing_during_checkPredictions_call_if_no_predictions_defined() + { + $this->checkPredictions()->shouldReturn(null); + } + + /** + * @param \Prophecy\Prophecy\MethodProphecy $method1 + * @param \Prophecy\Prophecy\MethodProphecy $method2 + * @param \Prophecy\Argument\ArgumentsWildcard $arguments1 + * @param \Prophecy\Argument\ArgumentsWildcard $arguments2 + */ + function it_throws_AggregateException_if_defined_predictions_fail( + $method1, $method2, $arguments1, $arguments2 + ) + { + $method1->getMethodName()->willReturn('getName'); + $method1->getArgumentsWildcard()->willReturn($arguments1); + $method1->checkPrediction()->willReturn(null); + + $method2->getMethodName()->willReturn('isSet'); + $method2->getArgumentsWildcard()->willReturn($arguments2); + $method2->checkPrediction()->willThrow( + 'Prophecy\Exception\Prediction\AggregateException' + ); + + $this->prophesize()->addMethodProphecy($method1); + $this->prophesize()->addMethodProphecy($method2); + + $this->shouldThrow('Prophecy\Exception\Prediction\AggregateException') + ->duringCheckPredictions(); + } + + function it_exposes_doubler_through_getter($doubler) + { + $this->getDoubler()->shouldReturn($doubler); + } +} diff --git a/core/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php b/core/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php new file mode 100644 index 0000000..a4eef59 --- /dev/null +++ b/core/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php @@ -0,0 +1,97 @@ +stringify(42)->shouldReturn('42'); + } + + function it_generates_proper_string_representation_for_string() + { + $this->stringify('some string')->shouldReturn('"some string"'); + } + + function it_generates_single_line_representation_for_multiline_string() + { + $this->stringify("some\nstring")->shouldReturn('"some\\nstring"'); + } + + function it_generates_proper_string_representation_for_double() + { + $this->stringify(42.3)->shouldReturn('42.3'); + } + + function it_generates_proper_string_representation_for_boolean_true() + { + $this->stringify(true)->shouldReturn('true'); + } + + function it_generates_proper_string_representation_for_boolean_false() + { + $this->stringify(false)->shouldReturn('false'); + } + + function it_generates_proper_string_representation_for_null() + { + $this->stringify(null)->shouldReturn('null'); + } + + function it_generates_proper_string_representation_for_empty_array() + { + $this->stringify(array())->shouldReturn('[]'); + } + + function it_generates_proper_string_representation_for_array() + { + $this->stringify(array('zet', 42))->shouldReturn('["zet", 42]'); + } + + function it_generates_proper_string_representation_for_hash_containing_one_value() + { + $this->stringify(array('ever' => 'zet'))->shouldReturn('["ever" => "zet"]'); + } + + function it_generates_proper_string_representation_for_hash() + { + $this->stringify(array('ever' => 'zet', 52 => 'hey', 'num' => 42))->shouldReturn( + '["ever" => "zet", 52 => "hey", "num" => 42]' + ); + } + + function it_generates_proper_string_representation_for_resource() + { + $resource = fopen(__FILE__, 'r'); + $this->stringify($resource)->shouldReturn('stream:'.$resource); + } + + /** + * @param \stdClass $object + */ + function it_generates_proper_string_representation_for_object($object) + { + $objHash = sprintf('%s:%s', + get_class($object->getWrappedObject()), + spl_object_hash($object->getWrappedObject()) + ) . " Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n)"; + + $this->stringify($object)->shouldReturn("$objHash"); + } + + /** + * @param stdClass $object + */ + function it_generates_proper_string_representation_for_object_without_exporting($object) + { + $objHash = sprintf('%s:%s', + get_class($object->getWrappedObject()), + spl_object_hash($object->getWrappedObject()) + ); + + $this->stringify($object, false)->shouldReturn("$objHash"); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument.php new file mode 100644 index 0000000..f2b3364 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument.php @@ -0,0 +1,198 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy; + +use Prophecy\Argument\Token; + +/** + * Argument tokens shortcuts. + * + * @author Konstantin Kudryashov + */ +class Argument +{ + /** + * Checks that argument is exact value or object. + * + * @param mixed $value + * + * @return Token\ExactValueToken + */ + public static function exact($value) + { + return new Token\ExactValueToken($value); + } + + /** + * Checks that argument is of specific type or instance of specific class. + * + * @param string $type Type name (`integer`, `string`) or full class name + * + * @return Token\TypeToken + */ + public static function type($type) + { + return new Token\TypeToken($type); + } + + /** + * Checks that argument object has specific state. + * + * @param string $methodName + * @param mixed $value + * + * @return Token\ObjectStateToken + */ + public static function which($methodName, $value) + { + return new Token\ObjectStateToken($methodName, $value); + } + + /** + * Checks that argument matches provided callback. + * + * @param callable $callback + * + * @return Token\CallbackToken + */ + public static function that($callback) + { + return new Token\CallbackToken($callback); + } + + /** + * Matches any single value. + * + * @return Token\AnyValueToken + */ + public static function any() + { + return new Token\AnyValueToken; + } + + /** + * Matches all values to the rest of the signature. + * + * @return Token\AnyValuesToken + */ + public static function cetera() + { + return new Token\AnyValuesToken; + } + + /** + * Checks that argument matches all tokens + * + * @param mixed ... a list of tokens + * + * @return Token\LogicalAndToken + */ + public static function allOf() + { + return new Token\LogicalAndToken(func_get_args()); + } + + /** + * Checks that argument array or countable object has exact number of elements. + * + * @param integer $value array elements count + * + * @return Token\ArrayCountToken + */ + public static function size($value) + { + return new Token\ArrayCountToken($value); + } + + /** + * Checks that argument array contains (key, value) pair + * + * @param mixed $key exact value or token + * @param mixed $value exact value or token + * + * @return Token\ArrayEntryToken + */ + public static function withEntry($key, $value) + { + return new Token\ArrayEntryToken($key, $value); + } + + /** + * Checks that arguments array entries all match value + * + * @param mixed $value + * + * @return Token\ArrayEveryEntryToken + */ + public static function withEveryEntry($value) + { + return new Token\ArrayEveryEntryToken($value); + } + + /** + * Checks that argument array contains value + * + * @param mixed $value + * + * @return Token\ArrayEntryToken + */ + public static function containing($value) + { + return new Token\ArrayEntryToken(self::any(), $value); + } + + /** + * Checks that argument array has key + * + * @param mixed $key exact value or token + * + * @return Token\ArrayEntryToken + */ + public static function withKey($key) + { + return new Token\ArrayEntryToken($key, self::any()); + } + + /** + * Checks that argument does not match the value|token. + * + * @param mixed $value either exact value or argument token + * + * @return Token\LogicalNotToken + */ + public static function not($value) + { + return new Token\LogicalNotToken($value); + } + + /** + * @param string $value + * + * @return Token\StringContainsToken + */ + public static function containingString($value) + { + return new Token\StringContainsToken($value); + } + + /** + * Checks that argument is identical value. + * + * @param mixed $value + * + * @return Token\IdenticalValueToken + */ + public static function is($value) + { + return new Token\IdenticalValueToken($value); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php new file mode 100644 index 0000000..a088f21 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php @@ -0,0 +1,101 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument; + +/** + * Arguments wildcarding. + * + * @author Konstantin Kudryashov + */ +class ArgumentsWildcard +{ + /** + * @var Token\TokenInterface[] + */ + private $tokens = array(); + private $string; + + /** + * Initializes wildcard. + * + * @param array $arguments Array of argument tokens or values + */ + public function __construct(array $arguments) + { + foreach ($arguments as $argument) { + if (!$argument instanceof Token\TokenInterface) { + $argument = new Token\ExactValueToken($argument); + } + + $this->tokens[] = $argument; + } + } + + /** + * Calculates wildcard match score for provided arguments. + * + * @param array $arguments + * + * @return false|int False OR integer score (higher - better) + */ + public function scoreArguments(array $arguments) + { + if (0 == count($arguments) && 0 == count($this->tokens)) { + return 1; + } + + $arguments = array_values($arguments); + $totalScore = 0; + foreach ($this->tokens as $i => $token) { + $argument = isset($arguments[$i]) ? $arguments[$i] : null; + if (1 >= $score = $token->scoreArgument($argument)) { + return false; + } + + $totalScore += $score; + + if (true === $token->isLast()) { + return $totalScore; + } + } + + if (count($arguments) > count($this->tokens)) { + return false; + } + + return $totalScore; + } + + /** + * Returns string representation for wildcard. + * + * @return string + */ + public function __toString() + { + if (null === $this->string) { + $this->string = implode(', ', array_map(function ($token) { + return (string) $token; + }, $this->tokens)); + } + + return $this->string; + } + + /** + * @return array + */ + public function getTokens() + { + return $this->tokens; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php new file mode 100644 index 0000000..5098811 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php @@ -0,0 +1,52 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Any single value token. + * + * @author Konstantin Kudryashov + */ +class AnyValueToken implements TokenInterface +{ + /** + * Always scores 3 for any argument. + * + * @param $argument + * + * @return int + */ + public function scoreArgument($argument) + { + return 3; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return '*'; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php new file mode 100644 index 0000000..f76b17b --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php @@ -0,0 +1,52 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Any values token. + * + * @author Konstantin Kudryashov + */ +class AnyValuesToken implements TokenInterface +{ + /** + * Always scores 2 for any argument. + * + * @param $argument + * + * @return int + */ + public function scoreArgument($argument) + { + return 2; + } + + /** + * Returns true to stop wildcard from processing other tokens. + * + * @return bool + */ + public function isLast() + { + return true; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return '* [, ...]'; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php new file mode 100644 index 0000000..96b4bef --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php @@ -0,0 +1,86 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Array elements count token. + * + * @author Boris Mikhaylov + */ + +class ArrayCountToken implements TokenInterface +{ + private $count; + + /** + * @param integer $value + */ + public function __construct($value) + { + $this->count = $value; + } + + /** + * Scores 6 when argument has preset number of elements. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + return $this->isCountable($argument) && $this->hasProperCount($argument) ? 6 : false; + } + + /** + * Returns false. + * + * @return boolean + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('count(%s)', $this->count); + } + + /** + * Returns true if object is either array or instance of \Countable + * + * @param $argument + * @return bool + */ + private function isCountable($argument) + { + return (is_array($argument) || $argument instanceof \Countable); + } + + /** + * Returns true if $argument has expected number of elements + * + * @param array|\Countable $argument + * + * @return bool + */ + private function hasProperCount($argument) + { + return $this->count === count($argument); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php new file mode 100644 index 0000000..0305fc7 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php @@ -0,0 +1,143 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use Prophecy\Exception\InvalidArgumentException; + +/** + * Array entry token. + * + * @author Boris Mikhaylov + */ +class ArrayEntryToken implements TokenInterface +{ + /** @var \Prophecy\Argument\Token\TokenInterface */ + private $key; + /** @var \Prophecy\Argument\Token\TokenInterface */ + private $value; + + /** + * @param mixed $key exact value or token + * @param mixed $value exact value or token + */ + public function __construct($key, $value) + { + $this->key = $this->wrapIntoExactValueToken($key); + $this->value = $this->wrapIntoExactValueToken($value); + } + + /** + * Scores half of combined scores from key and value tokens for same entry. Capped at 8. + * If argument implements \ArrayAccess without \Traversable, then key token is restricted to ExactValueToken. + * + * @param array|\ArrayAccess|\Traversable $argument + * + * @throws \Prophecy\Exception\InvalidArgumentException + * @return bool|int + */ + public function scoreArgument($argument) + { + if ($argument instanceof \Traversable) { + $argument = iterator_to_array($argument); + } + + if ($argument instanceof \ArrayAccess) { + $argument = $this->convertArrayAccessToEntry($argument); + } + + if (!is_array($argument) || empty($argument)) { + return false; + } + + $keyScores = array_map(array($this->key,'scoreArgument'), array_keys($argument)); + $valueScores = array_map(array($this->value,'scoreArgument'), $argument); + $scoreEntry = function ($value, $key) { + return $value && $key ? min(8, ($key + $value) / 2) : false; + }; + + return max(array_map($scoreEntry, $valueScores, $keyScores)); + } + + /** + * Returns false. + * + * @return boolean + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('[..., %s => %s, ...]', $this->key, $this->value); + } + + /** + * Returns key + * + * @return TokenInterface + */ + public function getKey() + { + return $this->key; + } + + /** + * Returns value + * + * @return TokenInterface + */ + public function getValue() + { + return $this->value; + } + + /** + * Wraps non token $value into ExactValueToken + * + * @param $value + * @return TokenInterface + */ + private function wrapIntoExactValueToken($value) + { + return $value instanceof TokenInterface ? $value : new ExactValueToken($value); + } + + /** + * Converts instance of \ArrayAccess to key => value array entry + * + * @param \ArrayAccess $object + * + * @return array|null + * @throws \Prophecy\Exception\InvalidArgumentException + */ + private function convertArrayAccessToEntry(\ArrayAccess $object) + { + if (!$this->key instanceof ExactValueToken) { + throw new InvalidArgumentException(sprintf( + 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. + 'But you used `%s`.', + $this->key + )); + } + + $key = $this->key->getValue(); + + return $object->offsetExists($key) ? array($key => $object[$key]) : array(); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php new file mode 100644 index 0000000..5d41fa4 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php @@ -0,0 +1,82 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Array every entry token. + * + * @author Adrien Brault + */ +class ArrayEveryEntryToken implements TokenInterface +{ + /** + * @var TokenInterface + */ + private $value; + + /** + * @param mixed $value exact value or token + */ + public function __construct($value) + { + if (!$value instanceof TokenInterface) { + $value = new ExactValueToken($value); + } + + $this->value = $value; + } + + /** + * {@inheritdoc} + */ + public function scoreArgument($argument) + { + if (!$argument instanceof \Traversable && !is_array($argument)) { + return false; + } + + $scores = array(); + foreach ($argument as $key => $argumentEntry) { + $scores[] = $this->value->scoreArgument($argumentEntry); + } + + if (empty($scores) || in_array(false, $scores, true)) { + return false; + } + + return array_sum($scores) / count($scores); + } + + /** + * {@inheritdoc} + */ + public function isLast() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return sprintf('[%s, ..., %s]', $this->value, $this->value); + } + + /** + * @return TokenInterface + */ + public function getValue() + { + return $this->value; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php new file mode 100644 index 0000000..f45ba20 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php @@ -0,0 +1,75 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use Prophecy\Exception\InvalidArgumentException; + +/** + * Callback-verified token. + * + * @author Konstantin Kudryashov + */ +class CallbackToken implements TokenInterface +{ + private $callback; + + /** + * Initializes token. + * + * @param callable $callback + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($callback) + { + if (!is_callable($callback)) { + throw new InvalidArgumentException(sprintf( + 'Callable expected as an argument to CallbackToken, but got %s.', + gettype($callback) + )); + } + + $this->callback = $callback; + } + + /** + * Scores 7 if callback returns true, false otherwise. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + return call_user_func($this->callback, $argument) ? 7 : false; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return 'callback()'; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php new file mode 100644 index 0000000..ba895ab --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php @@ -0,0 +1,116 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use SebastianBergmann\Comparator\Factory as ComparatorFactory; +use SebastianBergmann\Comparator\ComparisonFailure; +use Prophecy\Util\StringUtil; + +/** + * Exact value token. + * + * @author Konstantin Kudryashov + */ +class ExactValueToken implements TokenInterface +{ + private $value; + private $string; + private $util; + private $comparatorFactory; + + /** + * Initializes token. + * + * @param mixed $value + * @param StringUtil $util + * @param ComparatorFactory $comparatorFactory + */ + public function __construct($value, StringUtil $util = null, ComparatorFactory $comparatorFactory = null) + { + $this->value = $value; + $this->util = $util ?: new StringUtil(); + + $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); + } + + /** + * Scores 10 if argument matches preset value. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + if (is_object($argument) && is_object($this->value)) { + $comparator = $this->comparatorFactory->getComparatorFor( + $argument, $this->value + ); + + try { + $comparator->assertEquals($argument, $this->value); + return 10; + } catch (ComparisonFailure $failure) {} + } + + // If either one is an object it should castable to a string + if (is_object($argument) xor is_object($this->value)) { + if (is_object($argument) && !method_exists($argument, '__toString')) { + return false; + } + + if (is_object($this->value) && !method_exists($this->value, '__toString')) { + return false; + } + } elseif (is_numeric($argument) && is_numeric($this->value)) { + // noop + } elseif (gettype($argument) !== gettype($this->value)) { + return false; + } + + return $argument == $this->value ? 10 : false; + } + + /** + * Returns preset value against which token checks arguments. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + if (null === $this->string) { + $this->string = sprintf('exact(%s)', $this->util->stringify($this->value)); + } + + return $this->string; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php new file mode 100644 index 0000000..0b6d23a --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php @@ -0,0 +1,74 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use Prophecy\Util\StringUtil; + +/** + * Identical value token. + * + * @author Florian Voutzinos + */ +class IdenticalValueToken implements TokenInterface +{ + private $value; + private $string; + private $util; + + /** + * Initializes token. + * + * @param mixed $value + * @param StringUtil $util + */ + public function __construct($value, StringUtil $util = null) + { + $this->value = $value; + $this->util = $util ?: new StringUtil(); + } + + /** + * Scores 11 if argument matches preset value. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + return $argument === $this->value ? 11 : false; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + if (null === $this->string) { + $this->string = sprintf('identical(%s)', $this->util->stringify($this->value)); + } + + return $this->string; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php new file mode 100644 index 0000000..4ee1b25 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php @@ -0,0 +1,80 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Logical AND token. + * + * @author Boris Mikhaylov + */ +class LogicalAndToken implements TokenInterface +{ + private $tokens = array(); + + /** + * @param array $arguments exact values or tokens + */ + public function __construct(array $arguments) + { + foreach ($arguments as $argument) { + if (!$argument instanceof TokenInterface) { + $argument = new ExactValueToken($argument); + } + $this->tokens[] = $argument; + } + } + + /** + * Scores maximum score from scores returned by tokens for this argument if all of them score. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + if (0 === count($this->tokens)) { + return false; + } + + $maxScore = 0; + foreach ($this->tokens as $token) { + $score = $token->scoreArgument($argument); + if (false === $score) { + return false; + } + $maxScore = max($score, $maxScore); + } + + return $maxScore; + } + + /** + * Returns false. + * + * @return boolean + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('bool(%s)', implode(' AND ', $this->tokens)); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php new file mode 100644 index 0000000..623efa5 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php @@ -0,0 +1,73 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Logical NOT token. + * + * @author Boris Mikhaylov + */ +class LogicalNotToken implements TokenInterface +{ + /** @var \Prophecy\Argument\Token\TokenInterface */ + private $token; + + /** + * @param mixed $value exact value or token + */ + public function __construct($value) + { + $this->token = $value instanceof TokenInterface? $value : new ExactValueToken($value); + } + + /** + * Scores 4 when preset token does not match the argument. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + return false === $this->token->scoreArgument($argument) ? 4 : false; + } + + /** + * Returns true if preset token is last. + * + * @return bool|int + */ + public function isLast() + { + return $this->token->isLast(); + } + + /** + * Returns originating token. + * + * @return TokenInterface + */ + public function getOriginatingToken() + { + return $this->token; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('not(%s)', $this->token); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php new file mode 100644 index 0000000..ea38fe1 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php @@ -0,0 +1,104 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use SebastianBergmann\Comparator\Factory as ComparatorFactory; +use SebastianBergmann\Comparator\ComparisonFailure; +use Prophecy\Util\StringUtil; + +/** + * Object state-checker token. + * + * @author Konstantin Kudryashov + */ +class ObjectStateToken implements TokenInterface +{ + private $name; + private $value; + private $util; + private $comparatorFactory; + + /** + * Initializes token. + * + * @param string $methodName + * @param mixed $value Expected return value + * @param null|StringUtil $util + * @param ComparatorFactory $comparatorFactory + */ + public function __construct( + $methodName, + $value, + StringUtil $util = null, + ComparatorFactory $comparatorFactory = null + ) { + $this->name = $methodName; + $this->value = $value; + $this->util = $util ?: new StringUtil; + + $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); + } + + /** + * Scores 8 if argument is an object, which method returns expected value. + * + * @param mixed $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + if (is_object($argument) && method_exists($argument, $this->name)) { + $actual = call_user_func(array($argument, $this->name)); + + $comparator = $this->comparatorFactory->getComparatorFor( + $actual, $this->value + ); + + try { + $comparator->assertEquals($actual, $this->value); + return 8; + } catch (ComparisonFailure $failure) { + return false; + } + } + + if (is_object($argument) && property_exists($argument, $this->name)) { + return $argument->{$this->name} === $this->value ? 8 : false; + } + + return false; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('state(%s(), %s)', + $this->name, + $this->util->stringify($this->value) + ); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php new file mode 100644 index 0000000..24ff8c2 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php @@ -0,0 +1,67 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * String contains token. + * + * @author Peter Mitchell + */ +class StringContainsToken implements TokenInterface +{ + private $value; + + /** + * Initializes token. + * + * @param string $value + */ + public function __construct($value) + { + $this->value = $value; + } + + public function scoreArgument($argument) + { + return strpos($argument, $this->value) !== false ? 6 : false; + } + + /** + * Returns preset value against which token checks arguments. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('contains("%s")', $this->value); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php new file mode 100644 index 0000000..625d3ba --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php @@ -0,0 +1,43 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Argument token interface. + * + * @author Konstantin Kudryashov + */ +interface TokenInterface +{ + /** + * Calculates token match score for provided argument. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument); + + /** + * Returns true if this token prevents check of other tokens (is last one). + * + * @return bool|int + */ + public function isLast(); + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString(); +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php new file mode 100644 index 0000000..cb65132 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php @@ -0,0 +1,76 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use Prophecy\Exception\InvalidArgumentException; + +/** + * Value type token. + * + * @author Konstantin Kudryashov + */ +class TypeToken implements TokenInterface +{ + private $type; + + /** + * @param string $type + */ + public function __construct($type) + { + $checker = "is_{$type}"; + if (!function_exists($checker) && !interface_exists($type) && !class_exists($type)) { + throw new InvalidArgumentException(sprintf( + 'Type or class name expected as an argument to TypeToken, but got %s.', $type + )); + } + + $this->type = $type; + } + + /** + * Scores 5 if argument has the same type this token was constructed with. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + $checker = "is_{$this->type}"; + if (function_exists($checker)) { + return call_user_func($checker, $argument) ? 5 : false; + } + + return $argument instanceof $this->type ? 5 : false; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('type(%s)', $this->type); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php b/core/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php new file mode 100644 index 0000000..2f3fbad --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php @@ -0,0 +1,127 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Call; + +use Exception; + +/** + * Call object. + * + * @author Konstantin Kudryashov + */ +class Call +{ + private $methodName; + private $arguments; + private $returnValue; + private $exception; + private $file; + private $line; + + /** + * Initializes call. + * + * @param string $methodName + * @param array $arguments + * @param mixed $returnValue + * @param Exception $exception + * @param null|string $file + * @param null|int $line + */ + public function __construct($methodName, array $arguments, $returnValue, + Exception $exception = null, $file, $line) + { + $this->methodName = $methodName; + $this->arguments = $arguments; + $this->returnValue = $returnValue; + $this->exception = $exception; + + if ($file) { + $this->file = $file; + $this->line = intval($line); + } + } + + /** + * Returns called method name. + * + * @return string + */ + public function getMethodName() + { + return $this->methodName; + } + + /** + * Returns called method arguments. + * + * @return array + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * Returns called method return value. + * + * @return null|mixed + */ + public function getReturnValue() + { + return $this->returnValue; + } + + /** + * Returns exception that call thrown. + * + * @return null|Exception + */ + public function getException() + { + return $this->exception; + } + + /** + * Returns callee filename. + * + * @return string + */ + public function getFile() + { + return $this->file; + } + + /** + * Returns callee line number. + * + * @return int + */ + public function getLine() + { + return $this->line; + } + + /** + * Returns short notation for callee place. + * + * @return string + */ + public function getCallPlace() + { + if (null === $this->file) { + return 'unknown'; + } + + return sprintf('%s:%d', $this->file, $this->line); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php b/core/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php new file mode 100644 index 0000000..7495855 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php @@ -0,0 +1,152 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Call; + +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Argument\ArgumentsWildcard; +use Prophecy\Util\StringUtil; +use Prophecy\Exception\Call\UnexpectedCallException; + +/** + * Calls receiver & manager. + * + * @author Konstantin Kudryashov + */ +class CallCenter +{ + private $util; + + /** + * @var Call[] + */ + private $recordedCalls = array(); + + /** + * Initializes call center. + * + * @param StringUtil $util + */ + public function __construct(StringUtil $util = null) + { + $this->util = $util ?: new StringUtil; + } + + /** + * Makes and records specific method call for object prophecy. + * + * @param ObjectProphecy $prophecy + * @param string $methodName + * @param array $arguments + * + * @return mixed Returns null if no promise for prophecy found or promise return value. + * + * @throws \Prophecy\Exception\Call\UnexpectedCallException If no appropriate method prophecy found + */ + public function makeCall(ObjectProphecy $prophecy, $methodName, array $arguments) + { + $backtrace = debug_backtrace(); + + $file = $line = null; + if (isset($backtrace[2]) && isset($backtrace[2]['file'])) { + $file = $backtrace[2]['file']; + $line = $backtrace[2]['line']; + } + + // If no method prophecies defined, then it's a dummy, so we'll just return null + if ('__destruct' === $methodName || 0 == count($prophecy->getMethodProphecies())) { + $this->recordedCalls[] = new Call($methodName, $arguments, null, null, $file, $line); + + return null; + } + + // There are method prophecies, so it's a fake/stub. Searching prophecy for this call + $matches = array(); + foreach ($prophecy->getMethodProphecies($methodName) as $methodProphecy) { + if (0 < $score = $methodProphecy->getArgumentsWildcard()->scoreArguments($arguments)) { + $matches[] = array($score, $methodProphecy); + } + } + + // If fake/stub doesn't have method prophecy for this call - throw exception + if (!count($matches)) { + throw $this->createUnexpectedCallException($prophecy, $methodName, $arguments); + } + + // Sort matches by their score value + @usort($matches, function ($match1, $match2) { return $match2[0] - $match1[0]; }); + + // If Highest rated method prophecy has a promise - execute it or return null instead + $returnValue = null; + $exception = null; + if ($promise = $matches[0][1]->getPromise()) { + try { + $returnValue = $promise->execute($arguments, $prophecy, $matches[0][1]); + } catch (\Exception $e) { + $exception = $e; + } + } + + $this->recordedCalls[] = new Call( + $methodName, $arguments, $returnValue, $exception, $file, $line + ); + + if (null !== $exception) { + throw $exception; + } + + return $returnValue; + } + + /** + * Searches for calls by method name & arguments wildcard. + * + * @param string $methodName + * @param ArgumentsWildcard $wildcard + * + * @return Call[] + */ + public function findCalls($methodName, ArgumentsWildcard $wildcard) + { + return array_values( + array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) { + return $methodName === $call->getMethodName() + && 0 < $wildcard->scoreArguments($call->getArguments()) + ; + }) + ); + } + + private function createUnexpectedCallException(ObjectProphecy $prophecy, $methodName, + array $arguments) + { + $classname = get_class($prophecy->reveal()); + $argstring = implode(', ', array_map(array($this->util, 'stringify'), $arguments)); + $expected = implode("\n", array_map(function (MethodProphecy $methodProphecy) { + return sprintf(' - %s(%s)', + $methodProphecy->getMethodName(), + $methodProphecy->getArgumentsWildcard() + ); + }, call_user_func_array('array_merge', $prophecy->getMethodProphecies()))); + + return new UnexpectedCallException( + sprintf( + "Method call:\n". + " - %s(%s)\n". + "on %s was not expected, expected calls were:\n%s", + + $methodName, $argstring, $classname, $expected + ), + $prophecy, $methodName, $arguments + ); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php new file mode 100644 index 0000000..d6b6b1a --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php @@ -0,0 +1,68 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +use ReflectionClass; + +/** + * Cached class doubler. + * Prevents mirroring/creation of the same structure twice. + * + * @author Konstantin Kudryashov + */ +class CachedDoubler extends Doubler +{ + private $classes = array(); + + /** + * {@inheritdoc} + */ + public function registerClassPatch(ClassPatch\ClassPatchInterface $patch) + { + $this->classes[] = array(); + + parent::registerClassPatch($patch); + } + + /** + * {@inheritdoc} + */ + protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) + { + $classId = $this->generateClassId($class, $interfaces); + if (isset($this->classes[$classId])) { + return $this->classes[$classId]; + } + + return $this->classes[$classId] = parent::createDoubleClass($class, $interfaces); + } + + /** + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces + * + * @return string + */ + private function generateClassId(ReflectionClass $class = null, array $interfaces) + { + $parts = array(); + if (null !== $class) { + $parts[] = $class->getName(); + } + foreach ($interfaces as $interface) { + $parts[] = $interface->getName(); + } + sort($parts); + + return md5(implode('', $parts)); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php new file mode 100644 index 0000000..d6d1968 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php @@ -0,0 +1,48 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +/** + * Class patch interface. + * Class patches extend doubles functionality or help + * Prophecy to avoid some internal PHP bugs. + * + * @author Konstantin Kudryashov + */ +interface ClassPatchInterface +{ + /** + * Checks if patch supports specific class node. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node); + + /** + * Applies patch to the specific class node. + * + * @param ClassNode $node + * @return void + */ + public function apply(ClassNode $node); + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority(); +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php new file mode 100644 index 0000000..61998fc --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php @@ -0,0 +1,72 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; + +/** + * Disable constructor. + * Makes all constructor arguments optional. + * + * @author Konstantin Kudryashov + */ +class DisableConstructorPatch implements ClassPatchInterface +{ + /** + * Checks if class has `__construct` method. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + return true; + } + + /** + * Makes all class constructor arguments optional. + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + if (!$node->hasMethod('__construct')) { + $node->addMethod(new MethodNode('__construct', '')); + + return; + } + + $constructor = $node->getMethod('__construct'); + foreach ($constructor->getArguments() as $argument) { + $argument->setDefault(null); + } + + $constructor->setCode(<< + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +/** + * Exception patch for HHVM to remove the stubs from special methods + * + * @author Christophe Coevoet + */ +class HhvmExceptionPatch implements ClassPatchInterface +{ + /** + * Supports exceptions on HHVM. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + if (!defined('HHVM_VERSION')) { + return false; + } + + return 'Exception' === $node->getParentClass() || is_subclass_of($node->getParentClass(), 'Exception'); + } + + /** + * Removes special exception static methods from the doubled methods. + * + * @param ClassNode $node + * + * @return void + */ + public function apply(ClassNode $node) + { + if ($node->hasMethod('setTraceOptions')) { + $node->getMethod('setTraceOptions')->useParentCode(); + } + if ($node->hasMethod('getTraceOptions')) { + $node->getMethod('getTraceOptions')->useParentCode(); + } + } + + /** + * {@inheritdoc} + */ + public function getPriority() + { + return -50; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php new file mode 100644 index 0000000..b0d9793 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php @@ -0,0 +1,135 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +/** + * Remove method functionality from the double which will clash with php keywords. + * + * @author Milan Magudia + */ +class KeywordPatch implements ClassPatchInterface +{ + /** + * Support any class + * + * @param ClassNode $node + * + * @return boolean + */ + public function supports(ClassNode $node) + { + return true; + } + + /** + * Remove methods that clash with php keywords + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + $methodNames = array_keys($node->getMethods()); + $methodsToRemove = array_intersect($methodNames, $this->getKeywords()); + foreach ($methodsToRemove as $methodName) { + $node->removeMethod($methodName); + } + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority() { + return 49; + } + + /** + * Returns array of php keywords. + * + * @return array + */ + private function getKeywords() { + + return array( + '__halt_compiler', + 'abstract', + 'and', + 'array', + 'as', + 'break', + 'callable', + 'case', + 'catch', + 'class', + 'clone', + 'const', + 'continue', + 'declare', + 'default', + 'die', + 'do', + 'echo', + 'else', + 'elseif', + 'empty', + 'enddeclare', + 'endfor', + 'endforeach', + 'endif', + 'endswitch', + 'endwhile', + 'eval', + 'exit', + 'extends', + 'final', + 'finally', + 'for', + 'foreach', + 'function', + 'global', + 'goto', + 'if', + 'implements', + 'include', + 'include_once', + 'instanceof', + 'insteadof', + 'interface', + 'isset', + 'list', + 'namespace', + 'new', + 'or', + 'print', + 'private', + 'protected', + 'public', + 'require', + 'require_once', + 'return', + 'static', + 'switch', + 'throw', + 'trait', + 'try', + 'unset', + 'use', + 'var', + 'while', + 'xor', + 'yield', + ); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php new file mode 100644 index 0000000..da45450 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php @@ -0,0 +1,73 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use phpDocumentor\Reflection\DocBlock; +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; + +/** + * Discover Magical API using "@method" PHPDoc format. + * + * @author Thomas Tourlourat + */ +class MagicCallPatch implements ClassPatchInterface +{ + /** + * Support any class + * + * @param ClassNode $node + * + * @return boolean + */ + public function supports(ClassNode $node) + { + return true; + } + + /** + * Discover Magical API + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + $parentClass = $node->getParentClass(); + $reflectionClass = new \ReflectionClass($parentClass); + + $phpdoc = new DocBlock($reflectionClass->getDocComment()); + + $tagList = $phpdoc->getTagsByName('method'); + + foreach($tagList as $tag) { + $methodName = $tag->getMethodName(); + + if (!$reflectionClass->hasMethod($methodName)) { + $methodNode = new MethodNode($tag->getMethodName()); + $methodNode->setStatic($tag->isStatic()); + + $node->addMethod($methodNode); + } + } + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return integer Priority number (higher - earlier) + */ + public function getPriority() + { + return 50; + } +} + diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php new file mode 100644 index 0000000..ab0bb7c --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php @@ -0,0 +1,98 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; +use Prophecy\Doubler\Generator\Node\ArgumentNode; + +/** + * Add Prophecy functionality to the double. + * This is a core class patch for Prophecy. + * + * @author Konstantin Kudryashov + */ +class ProphecySubjectPatch implements ClassPatchInterface +{ + /** + * Always returns true. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + return true; + } + + /** + * Apply Prophecy functionality to class node. + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface'); + $node->addProperty('objectProphecy', 'private'); + + foreach ($node->getMethods() as $name => $method) { + if ('__construct' === strtolower($name)) { + continue; + } + + $method->setCode( + 'return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());' + ); + } + + $prophecySetter = new MethodNode('setProphecy'); + $prophecyArgument = new ArgumentNode('prophecy'); + $prophecyArgument->setTypeHint('Prophecy\Prophecy\ProphecyInterface'); + $prophecySetter->addArgument($prophecyArgument); + $prophecySetter->setCode('$this->objectProphecy = $prophecy;'); + + $prophecyGetter = new MethodNode('getProphecy'); + $prophecyGetter->setCode('return $this->objectProphecy;'); + + if ($node->hasMethod('__call')) { + $__call = $node->getMethod('__call'); + } else { + $__call = new MethodNode('__call'); + $__call->addArgument(new ArgumentNode('name')); + $__call->addArgument(new ArgumentNode('arguments')); + + $node->addMethod($__call); + } + + $__call->setCode(<<getProphecy(), func_get_arg(0) +); +PHP + ); + + $node->addMethod($prophecySetter); + $node->addMethod($prophecyGetter); + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority() + { + return 0; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php new file mode 100644 index 0000000..9166aee --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php @@ -0,0 +1,57 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +/** + * ReflectionClass::newInstance patch. + * Makes first argument of newInstance optional, since it works but signature is misleading + * + * @author Florian Klein + */ +class ReflectionClassNewInstancePatch implements ClassPatchInterface +{ + /** + * Supports ReflectionClass + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + return 'ReflectionClass' === $node->getParentClass(); + } + + /** + * Updates newInstance's first argument to make it optional + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + foreach ($node->getMethod('newInstance')->getArguments() as $argument) { + $argument->setDefault(null); + } + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher = earlier) + */ + public function getPriority() + { + return 50; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php new file mode 100644 index 0000000..8401159 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php @@ -0,0 +1,85 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; + +/** + * SplFileInfo patch. + * Makes SplFileInfo and derivative classes usable with Prophecy. + * + * @author Konstantin Kudryashov + */ +class SplFileInfoPatch implements ClassPatchInterface +{ + /** + * Supports everything that extends SplFileInfo. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + if (null === $node->getParentClass()) { + return false; + } + + return 'SplFileInfo' === $node->getParentClass() + || is_subclass_of($node->getParentClass(), 'SplFileInfo') + ; + } + + /** + * Updated constructor code to call parent one with dummy file argument. + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + if ($node->hasMethod('__construct')) { + $constructor = $node->getMethod('__construct'); + } else { + $constructor = new MethodNode('__construct'); + $node->addMethod($constructor); + } + + if ($this->nodeIsDirectoryIterator($node)) { + $constructor->setCode('return parent::__construct("' . __DIR__ . '");'); + return; + } + + $constructor->useParentCode(); + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority() + { + return 50; + } + + /** + * @param ClassNode $node + * @return boolean + */ + private function nodeIsDirectoryIterator(ClassNode $node) + { + $parent = $node->getParentClass(); + return 'DirectoryIterator' === $parent + || is_subclass_of($parent, 'DirectoryIterator'); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php new file mode 100644 index 0000000..eea0202 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php @@ -0,0 +1,83 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; + +/** + * Traversable interface patch. + * Forces classes that implement interfaces, that extend Traversable to also implement Iterator. + * + * @author Konstantin Kudryashov + */ +class TraversablePatch implements ClassPatchInterface +{ + /** + * Supports nodetree, that implement Traversable, but not Iterator or IteratorAggregate. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + if (in_array('Iterator', $node->getInterfaces())) { + return false; + } + if (in_array('IteratorAggregate', $node->getInterfaces())) { + return false; + } + + foreach ($node->getInterfaces() as $interface) { + if ('Traversable' !== $interface && !is_subclass_of($interface, 'Traversable')) { + continue; + } + if ('Iterator' === $interface || is_subclass_of($interface, 'Iterator')) { + continue; + } + if ('IteratorAggregate' === $interface || is_subclass_of($interface, 'IteratorAggregate')) { + continue; + } + + return true; + } + + return false; + } + + /** + * Forces class to implement Iterator interface. + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + $node->addInterface('Iterator'); + + $node->addMethod(new MethodNode('current')); + $node->addMethod(new MethodNode('key')); + $node->addMethod(new MethodNode('next')); + $node->addMethod(new MethodNode('rewind')); + $node->addMethod(new MethodNode('valid')); + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority() + { + return 100; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php new file mode 100644 index 0000000..699be3a --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php @@ -0,0 +1,22 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +/** + * Core double interface. + * All doubled classes will implement this one. + * + * @author Konstantin Kudryashov + */ +interface DoubleInterface +{ +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php new file mode 100644 index 0000000..a378ae2 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php @@ -0,0 +1,146 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +use Doctrine\Instantiator\Instantiator; +use Prophecy\Doubler\ClassPatch\ClassPatchInterface; +use Prophecy\Doubler\Generator\ClassMirror; +use Prophecy\Doubler\Generator\ClassCreator; +use Prophecy\Exception\InvalidArgumentException; +use ReflectionClass; + +/** + * Cached class doubler. + * Prevents mirroring/creation of the same structure twice. + * + * @author Konstantin Kudryashov + */ +class Doubler +{ + private $mirror; + private $creator; + private $namer; + + /** + * @var ClassPatchInterface[] + */ + private $patches = array(); + + /** + * @var \Doctrine\Instantiator\Instantiator + */ + private $instantiator; + + /** + * Initializes doubler. + * + * @param ClassMirror $mirror + * @param ClassCreator $creator + * @param NameGenerator $namer + */ + public function __construct(ClassMirror $mirror = null, ClassCreator $creator = null, + NameGenerator $namer = null) + { + $this->mirror = $mirror ?: new ClassMirror; + $this->creator = $creator ?: new ClassCreator; + $this->namer = $namer ?: new NameGenerator; + } + + /** + * Returns list of registered class patches. + * + * @return ClassPatchInterface[] + */ + public function getClassPatches() + { + return $this->patches; + } + + /** + * Registers new class patch. + * + * @param ClassPatchInterface $patch + */ + public function registerClassPatch(ClassPatchInterface $patch) + { + $this->patches[] = $patch; + + @usort($this->patches, function (ClassPatchInterface $patch1, ClassPatchInterface $patch2) { + return $patch2->getPriority() - $patch1->getPriority(); + }); + } + + /** + * Creates double from specific class or/and list of interfaces. + * + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces Array of ReflectionClass instances + * @param array $args Constructor arguments + * + * @return DoubleInterface + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function double(ReflectionClass $class = null, array $interfaces, array $args = null) + { + foreach ($interfaces as $interface) { + if (!$interface instanceof ReflectionClass) { + throw new InvalidArgumentException(sprintf( + "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". + "a second argument to `Doubler::double(...)`, but got %s.", + is_object($interface) ? get_class($interface).' class' : gettype($interface) + )); + } + } + + $classname = $this->createDoubleClass($class, $interfaces); + $reflection = new ReflectionClass($classname); + + if (null !== $args) { + return $reflection->newInstanceArgs($args); + } + if ((null === $constructor = $reflection->getConstructor()) + || ($constructor->isPublic() && !$constructor->isFinal())) { + return $reflection->newInstance(); + } + + if (!$this->instantiator) { + $this->instantiator = new Instantiator(); + } + + return $this->instantiator->instantiate($classname); + } + + /** + * Creates double class and returns its FQN. + * + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces + * + * @return string + */ + protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) + { + $name = $this->namer->name($class, $interfaces); + $node = $this->mirror->reflect($class, $interfaces); + + foreach ($this->patches as $patch) { + if ($patch->supports($node)) { + $patch->apply($node); + } + } + + $this->creator->create($name, $node); + + return $name; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php new file mode 100644 index 0000000..8577ba0 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php @@ -0,0 +1,91 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator; + +/** + * Class code creator. + * Generates PHP code for specific class node tree. + * + * @author Konstantin Kudryashov + */ +class ClassCodeGenerator +{ + /** + * Generates PHP code for class node. + * + * @param string $classname + * @param Node\ClassNode $class + * + * @return string + */ + public function generate($classname, Node\ClassNode $class) + { + $parts = explode('\\', $classname); + $classname = array_pop($parts); + $namespace = implode('\\', $parts); + + $code = sprintf("class %s extends \%s implements %s {\n", + $classname, $class->getParentClass(), implode(', ', + array_map(function ($interface) {return '\\'.$interface;}, $class->getInterfaces()) + ) + ); + + foreach ($class->getProperties() as $name => $visibility) { + $code .= sprintf("%s \$%s;\n", $visibility, $name); + } + $code .= "\n"; + + foreach ($class->getMethods() as $method) { + $code .= $this->generateMethod($method)."\n"; + } + $code .= "\n}"; + + return sprintf("namespace %s {\n%s\n}", $namespace, $code); + } + + private function generateMethod(Node\MethodNode $method) + { + $php = sprintf("%s %s function %s%s(%s) {\n", + $method->getVisibility(), + $method->isStatic() ? 'static' : '', + $method->returnsReference() ? '&':'', + $method->getName(), + implode(', ', $this->generateArguments($method->getArguments())) + ); + $php .= $method->getCode()."\n"; + + return $php.'}'; + } + + private function generateArguments(array $arguments) + { + return array_map(function (Node\ArgumentNode $argument) { + $php = ''; + + if ($hint = $argument->getTypeHint()) { + if ('array' === $hint || 'callable' === $hint) { + $php .= $hint; + } else { + $php .= '\\'.$hint; + } + } + + $php .= ' '.($argument->isPassedByReference() ? '&' : '').'$'.$argument->getName(); + + if ($argument->isOptional()) { + $php .= ' = '.var_export($argument->getDefault(), true); + } + + return $php; + }, $arguments); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php new file mode 100644 index 0000000..882a4a4 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php @@ -0,0 +1,67 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator; + +use Prophecy\Exception\Doubler\ClassCreatorException; + +/** + * Class creator. + * Creates specific class in current environment. + * + * @author Konstantin Kudryashov + */ +class ClassCreator +{ + private $generator; + + /** + * Initializes creator. + * + * @param ClassCodeGenerator $generator + */ + public function __construct(ClassCodeGenerator $generator = null) + { + $this->generator = $generator ?: new ClassCodeGenerator; + } + + /** + * Creates class. + * + * @param string $classname + * @param Node\ClassNode $class + * + * @return mixed + * + * @throws \Prophecy\Exception\Doubler\ClassCreatorException + */ + public function create($classname, Node\ClassNode $class) + { + $code = $this->generator->generate($classname, $class); + $return = eval($code); + + if (!class_exists($classname, false)) { + if (count($class->getInterfaces())) { + throw new ClassCreatorException(sprintf( + 'Could not double `%s` and implement interfaces: [%s].', + $class->getParentClass(), implode(', ', $class->getInterfaces()) + ), $class); + } + + throw new ClassCreatorException( + sprintf('Could not double `%s`.', $class->getParentClass()), + $class + ); + } + + return $return; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php new file mode 100644 index 0000000..c89d002 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php @@ -0,0 +1,202 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator; + +use Prophecy\Exception\InvalidArgumentException; +use Prophecy\Exception\Doubler\ClassMirrorException; +use ReflectionClass; +use ReflectionMethod; +use ReflectionParameter; + +/** + * Class mirror. + * Core doubler class. Mirrors specific class and/or interfaces into class node tree. + * + * @author Konstantin Kudryashov + */ +class ClassMirror +{ + private static $reflectableMethods = array( + '__construct', + '__destruct', + '__sleep', + '__wakeup', + '__toString', + '__call', + ); + + /** + * Reflects provided arguments into class node. + * + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces + * + * @return Node\ClassNode + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function reflect(ReflectionClass $class = null, array $interfaces) + { + $node = new Node\ClassNode; + + if (null !== $class) { + if (true === $class->isInterface()) { + throw new InvalidArgumentException(sprintf( + "Could not reflect %s as a class, because it\n". + "is interface - use the second argument instead.", + $class->getName() + )); + } + + $this->reflectClassToNode($class, $node); + } + + foreach ($interfaces as $interface) { + if (!$interface instanceof ReflectionClass) { + throw new InvalidArgumentException(sprintf( + "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". + "a second argument to `ClassMirror::reflect(...)`, but got %s.", + is_object($interface) ? get_class($interface).' class' : gettype($interface) + )); + } + if (false === $interface->isInterface()) { + throw new InvalidArgumentException(sprintf( + "Could not reflect %s as an interface, because it\n". + "is class - use the first argument instead.", + $interface->getName() + )); + } + + $this->reflectInterfaceToNode($interface, $node); + } + + $node->addInterface('Prophecy\Doubler\Generator\ReflectionInterface'); + + return $node; + } + + private function reflectClassToNode(ReflectionClass $class, Node\ClassNode $node) + { + if (true === $class->isFinal()) { + throw new ClassMirrorException(sprintf( + 'Could not reflect class %s as it is marked final.', $class->getName() + ), $class); + } + + $node->setParentClass($class->getName()); + + foreach ($class->getMethods(ReflectionMethod::IS_ABSTRACT) as $method) { + if (false === $method->isProtected()) { + continue; + } + + $this->reflectMethodToNode($method, $node); + } + + foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { + if (0 === strpos($method->getName(), '_') + && !in_array($method->getName(), self::$reflectableMethods)) { + continue; + } + + if (true === $method->isFinal()) { + continue; + } + + $this->reflectMethodToNode($method, $node); + } + } + + private function reflectInterfaceToNode(ReflectionClass $interface, Node\ClassNode $node) + { + $node->addInterface($interface->getName()); + + foreach ($interface->getMethods() as $method) { + $this->reflectMethodToNode($method, $node); + } + } + + private function reflectMethodToNode(ReflectionMethod $method, Node\ClassNode $classNode) + { + $node = new Node\MethodNode($method->getName()); + + if (true === $method->isProtected()) { + $node->setVisibility('protected'); + } + + if (true === $method->isStatic()) { + $node->setStatic(); + } + + if (true === $method->returnsReference()) { + $node->setReturnsReference(); + } + + if (is_array($params = $method->getParameters()) && count($params)) { + foreach ($params as $param) { + $this->reflectArgumentToNode($param, $node); + } + } + + $classNode->addMethod($node); + } + + private function reflectArgumentToNode(ReflectionParameter $parameter, Node\MethodNode $methodNode) + { + $name = $parameter->getName() == '...' ? '__dot_dot_dot__' : $parameter->getName(); + $node = new Node\ArgumentNode($name); + + $typeHint = $this->getTypeHint($parameter); + $node->setTypeHint($typeHint); + + if (true === $parameter->isDefaultValueAvailable()) { + $node->setDefault($parameter->getDefaultValue()); + } elseif (true === $parameter->isOptional() + || (true === $parameter->allowsNull() && $typeHint)) { + $node->setDefault(null); + } + + if (true === $parameter->isPassedByReference()) { + $node->setAsPassedByReference(); + } + + $methodNode->addArgument($node); + } + + private function getTypeHint(ReflectionParameter $parameter) + { + if (null !== $className = $this->getParameterClassName($parameter)) { + return $className; + } + + if (true === $parameter->isArray()) { + return 'array'; + } + + if (version_compare(PHP_VERSION, '5.4', '>=') && true === $parameter->isCallable()) { + return 'callable'; + } + + return null; + } + + private function getParameterClassName(ReflectionParameter $parameter) + { + try { + return $parameter->getClass() ? $parameter->getClass()->getName() : null; + } catch (\ReflectionException $e) { + preg_match('/\[\s\<\w+?>\s([\w,\\\]+)/s', $parameter, $matches); + + return isset($matches[1]) ? $matches[1] : null; + } + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php new file mode 100644 index 0000000..a6c42a3 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php @@ -0,0 +1,75 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator\Node; + +/** + * Argument node. + * + * @author Konstantin Kudryashov + */ +class ArgumentNode +{ + private $name; + private $typeHint; + private $default; + private $optional = false; + private $byReference = false; + + /** + * @param string $name + */ + public function __construct($name) + { + $this->name = $name; + } + + public function getName() + { + return $this->name; + } + + public function getTypeHint() + { + return $this->typeHint; + } + + public function setTypeHint($typeHint = null) + { + $this->typeHint = $typeHint; + } + + public function getDefault() + { + return $this->default; + } + + public function setDefault($default = null) + { + $this->optional = true; + $this->default = $default; + } + + public function isOptional() + { + return $this->optional; + } + + public function setAsPassedByReference($byReference = true) + { + $this->byReference = $byReference; + } + + public function isPassedByReference() + { + return $this->byReference; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php new file mode 100644 index 0000000..b38cb4e --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php @@ -0,0 +1,130 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator\Node; + +use Prophecy\Exception\InvalidArgumentException; + +/** + * Class node. + * + * @author Konstantin Kudryashov + */ +class ClassNode +{ + private $parentClass = 'stdClass'; + private $interfaces = array(); + private $properties = array(); + + /** + * @var MethodNode[] + */ + private $methods = array(); + + public function getParentClass() + { + return $this->parentClass; + } + + /** + * @param string $class + */ + public function setParentClass($class) + { + $this->parentClass = $class ?: 'stdClass'; + } + + /** + * @return string[] + */ + public function getInterfaces() + { + return $this->interfaces; + } + + /** + * @param string $interface + */ + public function addInterface($interface) + { + if ($this->hasInterface($interface)) { + return; + } + + array_unshift($this->interfaces, $interface); + } + + /** + * @param string $interface + * + * @return bool + */ + public function hasInterface($interface) + { + return in_array($interface, $this->interfaces); + } + + public function getProperties() + { + return $this->properties; + } + + public function addProperty($name, $visibility = 'public') + { + $visibility = strtolower($visibility); + + if (!in_array($visibility, array('public', 'private', 'protected'))) { + throw new InvalidArgumentException(sprintf( + '`%s` property visibility is not supported.', $visibility + )); + } + + $this->properties[$name] = $visibility; + } + + /** + * @return MethodNode[] + */ + public function getMethods() + { + return $this->methods; + } + + public function addMethod(MethodNode $method) + { + $this->methods[$method->getName()] = $method; + } + + public function removeMethod($name) + { + unset($this->methods[$name]); + } + + /** + * @param string $name + * + * @return MethodNode|null + */ + public function getMethod($name) + { + return $this->hasMethod($name) ? $this->methods[$name] : null; + } + + /** + * @param string $name + * + * @return bool + */ + public function hasMethod($name) + { + return isset($this->methods[$name]); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php new file mode 100644 index 0000000..ef303b6 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php @@ -0,0 +1,129 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator\Node; + +use Prophecy\Exception\InvalidArgumentException; + +/** + * Method node. + * + * @author Konstantin Kudryashov + */ +class MethodNode +{ + private $name; + private $code; + private $visibility = 'public'; + private $static = false; + private $returnsReference = false; + + /** + * @var ArgumentNode[] + */ + private $arguments = array(); + + /** + * @param string $name + * @param string $code + */ + public function __construct($name, $code = null) + { + $this->name = $name; + $this->code = $code; + } + + public function getVisibility() + { + return $this->visibility; + } + + /** + * @param string $visibility + */ + public function setVisibility($visibility) + { + $visibility = strtolower($visibility); + + if (!in_array($visibility, array('public', 'private', 'protected'))) { + throw new InvalidArgumentException(sprintf( + '`%s` method visibility is not supported.', $visibility + )); + } + + $this->visibility = $visibility; + } + + public function isStatic() + { + return $this->static; + } + + public function setStatic($static = true) + { + $this->static = (bool) $static; + } + + public function returnsReference() + { + return $this->returnsReference; + } + + public function setReturnsReference() + { + $this->returnsReference = true; + } + + public function getName() + { + return $this->name; + } + + public function addArgument(ArgumentNode $argument) + { + $this->arguments[] = $argument; + } + + /** + * @return ArgumentNode[] + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * @param string $code + */ + public function setCode($code) + { + $this->code = $code; + } + + public function getCode() + { + if ($this->returnsReference) + { + return "throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), '{$this->name}');"; + } + + return (string) $this->code; + } + + public function useParentCode() + { + $this->code = sprintf( + 'return parent::%s(%s);', $this->getName(), implode(', ', + array_map(function (ArgumentNode $arg) { return '$'.$arg->getName(); }, $this->arguments) + ) + ); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php new file mode 100644 index 0000000..d720b15 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php @@ -0,0 +1,22 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator; + +/** + * Reflection interface. + * All reflected classes implement this interface. + * + * @author Konstantin Kudryashov + */ +interface ReflectionInterface +{ +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php new file mode 100644 index 0000000..8a99c4c --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php @@ -0,0 +1,127 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +use Prophecy\Exception\Doubler\DoubleException; +use Prophecy\Exception\Doubler\ClassNotFoundException; +use Prophecy\Exception\Doubler\InterfaceNotFoundException; +use ReflectionClass; + +/** + * Lazy double. + * Gives simple interface to describe double before creating it. + * + * @author Konstantin Kudryashov + */ +class LazyDouble +{ + private $doubler; + private $class; + private $interfaces = array(); + private $arguments = null; + private $double; + + /** + * Initializes lazy double. + * + * @param Doubler $doubler + */ + public function __construct(Doubler $doubler) + { + $this->doubler = $doubler; + } + + /** + * Tells doubler to use specific class as parent one for double. + * + * @param string|ReflectionClass $class + * + * @throws \Prophecy\Exception\Doubler\ClassNotFoundException + * @throws \Prophecy\Exception\Doubler\DoubleException + */ + public function setParentClass($class) + { + if (null !== $this->double) { + throw new DoubleException('Can not extend class with already instantiated double.'); + } + + if (!$class instanceof ReflectionClass) { + if (!class_exists($class)) { + throw new ClassNotFoundException(sprintf('Class %s not found.', $class), $class); + } + + $class = new ReflectionClass($class); + } + + $this->class = $class; + } + + /** + * Tells doubler to implement specific interface with double. + * + * @param string|ReflectionClass $interface + * + * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException + * @throws \Prophecy\Exception\Doubler\DoubleException + */ + public function addInterface($interface) + { + if (null !== $this->double) { + throw new DoubleException( + 'Can not implement interface with already instantiated double.' + ); + } + + if (!$interface instanceof ReflectionClass) { + if (!interface_exists($interface)) { + throw new InterfaceNotFoundException( + sprintf('Interface %s not found.', $interface), + $interface + ); + } + + $interface = new ReflectionClass($interface); + } + + $this->interfaces[] = $interface; + } + + /** + * Sets constructor arguments. + * + * @param array $arguments + */ + public function setArguments(array $arguments = null) + { + $this->arguments = $arguments; + } + + /** + * Creates double instance or returns already created one. + * + * @return DoubleInterface + */ + public function getInstance() + { + if (null === $this->double) { + if (null !== $this->arguments) { + return $this->double = $this->doubler->double( + $this->class, $this->interfaces, $this->arguments + ); + } + + $this->double = $this->doubler->double($this->class, $this->interfaces); + } + + return $this->double; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php new file mode 100644 index 0000000..d67ec6a --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php @@ -0,0 +1,52 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +use ReflectionClass; + +/** + * Name generator. + * Generates classname for double. + * + * @author Konstantin Kudryashov + */ +class NameGenerator +{ + private static $counter = 1; + + /** + * Generates name. + * + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces + * + * @return string + */ + public function name(ReflectionClass $class = null, array $interfaces) + { + $parts = array(); + + if (null !== $class) { + $parts[] = $class->getName(); + } else { + foreach ($interfaces as $interface) { + $parts[] = $interface->getShortName(); + } + } + + if (!count($parts)) { + $parts[] = 'stdClass'; + } + + return sprintf('Double\%s\P%d', implode('\\', $parts), self::$counter++); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php new file mode 100644 index 0000000..48ed225 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php @@ -0,0 +1,40 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Call; + +use Prophecy\Exception\Prophecy\ObjectProphecyException; +use Prophecy\Prophecy\ObjectProphecy; + +class UnexpectedCallException extends ObjectProphecyException +{ + private $methodName; + private $arguments; + + public function __construct($message, ObjectProphecy $objectProphecy, + $methodName, array $arguments) + { + parent::__construct($message, $objectProphecy); + + $this->methodName = $methodName; + $this->arguments = $arguments; + } + + public function getMethodName() + { + return $this->methodName; + } + + public function getArguments() + { + return $this->arguments; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php new file mode 100644 index 0000000..822918a --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php @@ -0,0 +1,31 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +class ClassCreatorException extends \RuntimeException implements DoublerException +{ + private $node; + + public function __construct($message, ClassNode $node) + { + parent::__construct($message); + + $this->node = $node; + } + + public function getClassNode() + { + return $this->node; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php new file mode 100644 index 0000000..8fc53b8 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php @@ -0,0 +1,31 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +use ReflectionClass; + +class ClassMirrorException extends \RuntimeException implements DoublerException +{ + private $class; + + public function __construct($message, ReflectionClass $class) + { + parent::__construct($message); + + $this->class = $class; + } + + public function getReflectedClass() + { + return $this->class; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php new file mode 100644 index 0000000..5bc826d --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php @@ -0,0 +1,33 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +class ClassNotFoundException extends DoubleException +{ + private $classname; + + /** + * @param string $message + * @param string $classname + */ + public function __construct($message, $classname) + { + parent::__construct($message); + + $this->classname = $classname; + } + + public function getClassname() + { + return $this->classname; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php new file mode 100644 index 0000000..6642a58 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +use RuntimeException; + +class DoubleException extends RuntimeException implements DoublerException +{ +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php new file mode 100644 index 0000000..9d6be17 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +use Prophecy\Exception\Exception; + +interface DoublerException extends Exception +{ +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php new file mode 100644 index 0000000..e344dea --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php @@ -0,0 +1,20 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +class InterfaceNotFoundException extends ClassNotFoundException +{ + public function getInterfaceName() + { + return $this->getClassname(); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php new file mode 100644 index 0000000..b113941 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php @@ -0,0 +1,60 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +class MethodNotFoundException extends DoubleException +{ + /** + * @var string + */ + private $classname; + + /** + * @var string + */ + private $methodName; + + /** + * @var array + */ + private $arguments; + + /** + * @param string $message + * @param string $classname + * @param string $methodName + * @param null|Argument\ArgumentsWildcard|array $arguments + */ + public function __construct($message, $classname, $methodName, $arguments = null) + { + parent::__construct($message); + + $this->classname = $classname; + $this->methodName = $methodName; + $this->arguments = $arguments; + } + + public function getClassname() + { + return $this->classname; + } + + public function getMethodName() + { + return $this->methodName; + } + + public function getArguments() + { + return $this->arguments; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php new file mode 100644 index 0000000..6303049 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php @@ -0,0 +1,41 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +class ReturnByReferenceException extends DoubleException +{ + private $classname; + private $methodName; + + /** + * @param string $message + * @param string $classname + * @param string $methodName + */ + public function __construct($message, $classname, $methodName) + { + parent::__construct($message); + + $this->classname = $classname; + $this->methodName = $methodName; + } + + public function getClassname() + { + return $this->classname; + } + + public function getMethodName() + { + return $this->methodName; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php new file mode 100644 index 0000000..ac9fe4d --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php @@ -0,0 +1,26 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception; + +/** + * Core Prophecy exception interface. + * All Prophecy exceptions implement it. + * + * @author Konstantin Kudryashov + */ +interface Exception +{ + /** + * @return string + */ + public function getMessage(); +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..bc91c69 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php @@ -0,0 +1,16 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception; + +class InvalidArgumentException extends \InvalidArgumentException implements Exception +{ +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php new file mode 100644 index 0000000..44b598a --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php @@ -0,0 +1,50 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Prophecy\ObjectProphecy; + +class AggregateException extends \RuntimeException implements PredictionException +{ + private $exceptions = array(); + private $objectProphecy; + + public function append(PredictionException $exception) + { + $message = $exception->getMessage(); + $message = ' '.strtr($message, array("\n" => "\n "))."\n"; + + $this->message = rtrim($this->message.$message); + $this->exceptions[] = $exception; + } + + /** + * @return PredictionException[] + */ + public function getExceptions() + { + return $this->exceptions; + } + + public function setObjectProphecy(ObjectProphecy $objectProphecy) + { + $this->objectProphecy = $objectProphecy; + } + + /** + * @return ObjectProphecy + */ + public function getObjectProphecy() + { + return $this->objectProphecy; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php new file mode 100644 index 0000000..bbbbc3d --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php @@ -0,0 +1,24 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use RuntimeException; + +/** + * Basic failed prediction exception. + * Use it for custom prediction failures. + * + * @author Konstantin Kudryashov + */ +class FailedPredictionException extends RuntimeException implements PredictionException +{ +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php new file mode 100644 index 0000000..05ea4aa --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Exception\Prophecy\MethodProphecyException; + +class NoCallsException extends MethodProphecyException implements PredictionException +{ +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php new file mode 100644 index 0000000..2596b1e --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Exception\Exception; + +interface PredictionException extends Exception +{ +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php new file mode 100644 index 0000000..9d90543 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php @@ -0,0 +1,31 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Prophecy\MethodProphecy; + +class UnexpectedCallsCountException extends UnexpectedCallsException +{ + private $expectedCount; + + public function __construct($message, MethodProphecy $methodProphecy, $count, array $calls) + { + parent::__construct($message, $methodProphecy, $calls); + + $this->expectedCount = intval($count); + } + + public function getExpectedCount() + { + return $this->expectedCount; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php new file mode 100644 index 0000000..7a99c2d --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php @@ -0,0 +1,32 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Exception\Prophecy\MethodProphecyException; + +class UnexpectedCallsException extends MethodProphecyException implements PredictionException +{ + private $calls = array(); + + public function __construct($message, MethodProphecy $methodProphecy, array $calls) + { + parent::__construct($message, $methodProphecy); + + $this->calls = $calls; + } + + public function getCalls() + { + return $this->calls; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php new file mode 100644 index 0000000..1b03eaf --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php @@ -0,0 +1,34 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prophecy; + +use Prophecy\Prophecy\MethodProphecy; + +class MethodProphecyException extends ObjectProphecyException +{ + private $methodProphecy; + + public function __construct($message, MethodProphecy $methodProphecy) + { + parent::__construct($message, $methodProphecy->getObjectProphecy()); + + $this->methodProphecy = $methodProphecy; + } + + /** + * @return MethodProphecy + */ + public function getMethodProphecy() + { + return $this->methodProphecy; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php new file mode 100644 index 0000000..e345402 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php @@ -0,0 +1,34 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prophecy; + +use Prophecy\Prophecy\ObjectProphecy; + +class ObjectProphecyException extends \RuntimeException implements ProphecyException +{ + private $objectProphecy; + + public function __construct($message, ObjectProphecy $objectProphecy) + { + parent::__construct($message); + + $this->objectProphecy = $objectProphecy; + } + + /** + * @return ObjectProphecy + */ + public function getObjectProphecy() + { + return $this->objectProphecy; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php new file mode 100644 index 0000000..9157332 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prophecy; + +use Prophecy\Exception\Exception; + +interface ProphecyException extends Exception +{ +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php new file mode 100644 index 0000000..5bdcdc4 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php @@ -0,0 +1,86 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Argument\ArgumentsWildcard; +use Prophecy\Argument\Token\AnyValuesToken; +use Prophecy\Util\StringUtil; +use Prophecy\Exception\Prediction\NoCallsException; + +/** + * Call prediction. + * + * @author Konstantin Kudryashov + */ +class CallPrediction implements PredictionInterface +{ + private $util; + + /** + * Initializes prediction. + * + * @param StringUtil $util + */ + public function __construct(StringUtil $util = null) + { + $this->util = $util ?: new StringUtil; + } + + /** + * Tests that there was at least one call. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws \Prophecy\Exception\Prediction\NoCallsException + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) + { + if (count($calls)) { + return; + } + + $methodCalls = $object->findProphecyMethodCalls( + $method->getMethodName(), + new ArgumentsWildcard(array(new AnyValuesToken)) + ); + + if (count($methodCalls)) { + throw new NoCallsException(sprintf( + "No calls been made that match:\n". + " %s->%s(%s)\n". + "but expected at least one.\n". + "Recorded `%s(...)` calls:\n%s", + + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard(), + $method->getMethodName(), + $this->util->stringifyCalls($methodCalls) + ), $method); + } + + throw new NoCallsException(sprintf( + "No calls been made that match:\n". + " %s->%s(%s)\n". + "but expected at least one.", + + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard() + ), $method); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php new file mode 100644 index 0000000..31c6c57 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php @@ -0,0 +1,107 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Argument\ArgumentsWildcard; +use Prophecy\Argument\Token\AnyValuesToken; +use Prophecy\Util\StringUtil; +use Prophecy\Exception\Prediction\UnexpectedCallsCountException; + +/** + * Prediction interface. + * Predictions are logical test blocks, tied to `should...` keyword. + * + * @author Konstantin Kudryashov + */ +class CallTimesPrediction implements PredictionInterface +{ + private $times; + private $util; + + /** + * Initializes prediction. + * + * @param int $times + * @param StringUtil $util + */ + public function __construct($times, StringUtil $util = null) + { + $this->times = intval($times); + $this->util = $util ?: new StringUtil; + } + + /** + * Tests that there was exact amount of calls made. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws \Prophecy\Exception\Prediction\UnexpectedCallsCountException + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) + { + if ($this->times == count($calls)) { + return; + } + + $methodCalls = $object->findProphecyMethodCalls( + $method->getMethodName(), + new ArgumentsWildcard(array(new AnyValuesToken)) + ); + + if (count($calls)) { + $message = sprintf( + "Expected exactly %d calls that match:\n". + " %s->%s(%s)\n". + "but %d were made:\n%s", + + $this->times, + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard(), + count($calls), + $this->util->stringifyCalls($calls) + ); + } elseif (count($methodCalls)) { + $message = sprintf( + "Expected exactly %d calls that match:\n". + " %s->%s(%s)\n". + "but none were made.\n". + "Recorded `%s(...)` calls:\n%s", + + $this->times, + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard(), + $method->getMethodName(), + $this->util->stringifyCalls($methodCalls) + ); + } else { + $message = sprintf( + "Expected exactly %d calls that match:\n". + " %s->%s(%s)\n". + "but none were made.", + + $this->times, + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard() + ); + } + + throw new UnexpectedCallsCountException($message, $method, $this->times, $calls); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php new file mode 100644 index 0000000..44bc782 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php @@ -0,0 +1,65 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Exception\InvalidArgumentException; +use Closure; + +/** + * Callback prediction. + * + * @author Konstantin Kudryashov + */ +class CallbackPrediction implements PredictionInterface +{ + private $callback; + + /** + * Initializes callback prediction. + * + * @param callable $callback Custom callback + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($callback) + { + if (!is_callable($callback)) { + throw new InvalidArgumentException(sprintf( + 'Callable expected as an argument to CallbackPrediction, but got %s.', + gettype($callback) + )); + } + + $this->callback = $callback; + } + + /** + * Executes preset callback. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) + { + $callback = $this->callback; + + if ($callback instanceof Closure && method_exists('Closure', 'bind')) { + $callback = Closure::bind($callback, $object); + } + + call_user_func($callback, $calls, $object, $method); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php new file mode 100644 index 0000000..46ac5bf --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php @@ -0,0 +1,68 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Util\StringUtil; +use Prophecy\Exception\Prediction\UnexpectedCallsException; + +/** + * No calls prediction. + * + * @author Konstantin Kudryashov + */ +class NoCallsPrediction implements PredictionInterface +{ + private $util; + + /** + * Initializes prediction. + * + * @param null|StringUtil $util + */ + public function __construct(StringUtil $util = null) + { + $this->util = $util ?: new StringUtil; + } + + /** + * Tests that there were no calls made. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws \Prophecy\Exception\Prediction\UnexpectedCallsException + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) + { + if (!count($calls)) { + return; + } + + $verb = count($calls) === 1 ? 'was' : 'were'; + + throw new UnexpectedCallsException(sprintf( + "No calls expected that match:\n". + " %s->%s(%s)\n". + "but %d %s made:\n%s", + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard(), + count($calls), + $verb, + $this->util->stringifyCalls($calls) + ), $method, $calls); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php new file mode 100644 index 0000000..f7fb06a --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php @@ -0,0 +1,37 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; + +/** + * Prediction interface. + * Predictions are logical test blocks, tied to `should...` keyword. + * + * @author Konstantin Kudryashov + */ +interface PredictionInterface +{ + /** + * Tests that double fulfilled prediction. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws object + * @return void + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method); +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php new file mode 100644 index 0000000..5f406bf --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php @@ -0,0 +1,66 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Exception\InvalidArgumentException; +use Closure; + +/** + * Callback promise. + * + * @author Konstantin Kudryashov + */ +class CallbackPromise implements PromiseInterface +{ + private $callback; + + /** + * Initializes callback promise. + * + * @param callable $callback Custom callback + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($callback) + { + if (!is_callable($callback)) { + throw new InvalidArgumentException(sprintf( + 'Callable expected as an argument to CallbackPromise, but got %s.', + gettype($callback) + )); + } + + $this->callback = $callback; + } + + /** + * Evaluates promise callback. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @return mixed + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) + { + $callback = $this->callback; + + if ($callback instanceof Closure && method_exists('Closure', 'bind')) { + $callback = Closure::bind($callback, $object); + } + + return call_user_func($callback, $args, $object, $method); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php new file mode 100644 index 0000000..382537b --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php @@ -0,0 +1,35 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; + +/** + * Promise interface. + * Promises are logical blocks, tied to `will...` keyword. + * + * @author Konstantin Kudryashov + */ +interface PromiseInterface +{ + /** + * Evaluates promise. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @return mixed + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method); +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php new file mode 100644 index 0000000..a06724b --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php @@ -0,0 +1,61 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Prophecy\Exception\InvalidArgumentException; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; + +/** + * Return argument promise. + * + * @author Konstantin Kudryashov + */ +class ReturnArgumentPromise implements PromiseInterface +{ + /** + * @var int + */ + private $index; + + /** + * Initializes callback promise. + * + * @param int $index The zero-indexed number of the argument to return + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($index = 0) + { + if (!is_int($index) || $index < 0) { + throw new InvalidArgumentException( + 'Zero-based index expected as argument to ReturnArgumentPromise, but got %s.', + $index + ); + } + $this->index = $index; + } + + /** + * Returns nth argument if has one, null otherwise. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @return null|mixed + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) + { + return count($args) > $this->index ? $args[$this->index] : null; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php new file mode 100644 index 0000000..c7d5ac5 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php @@ -0,0 +1,55 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; + +/** + * Return promise. + * + * @author Konstantin Kudryashov + */ +class ReturnPromise implements PromiseInterface +{ + private $returnValues = array(); + + /** + * Initializes promise. + * + * @param array $returnValues Array of values + */ + public function __construct(array $returnValues) + { + $this->returnValues = $returnValues; + } + + /** + * Returns saved values one by one until last one, then continuously returns last value. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @return mixed + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) + { + $value = array_shift($this->returnValues); + + if (!count($this->returnValues)) { + $this->returnValues[] = $value; + } + + return $value; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php new file mode 100644 index 0000000..8007330 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php @@ -0,0 +1,91 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Doctrine\Instantiator\Instantiator; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Exception\InvalidArgumentException; +use ReflectionClass; + +/** + * Throw promise. + * + * @author Konstantin Kudryashov + */ +class ThrowPromise implements PromiseInterface +{ + private $exception; + + /** + * @var \Doctrine\Instantiator\Instantiator + */ + private $instantiator; + + /** + * Initializes promise. + * + * @param string|\Exception $exception Exception class name or instance + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($exception) + { + if (is_string($exception)) { + if (!class_exists($exception) + && 'Exception' !== $exception + && !is_subclass_of($exception, 'Exception')) { + throw new InvalidArgumentException(sprintf( + 'Exception class or instance expected as argument to ThrowPromise, but got %s.', + gettype($exception) + )); + } + } elseif (!$exception instanceof \Exception) { + throw new InvalidArgumentException(sprintf( + 'Exception class or instance expected as argument to ThrowPromise, but got %s.', + gettype($exception) + )); + } + + $this->exception = $exception; + } + + /** + * Throws predefined exception. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws object + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) + { + if (is_string($this->exception)) { + $classname = $this->exception; + $reflection = new ReflectionClass($classname); + $constructor = $reflection->getConstructor(); + + if ($constructor->isPublic() && 0 == $constructor->getNumberOfRequiredParameters()) { + throw $reflection->newInstance(); + } + + if (!$this->instantiator) { + $this->instantiator = new Instantiator(); + } + + throw $this->instantiator->instantiate($classname); + } + + throw $this->exception; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php new file mode 100644 index 0000000..9af03b9 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php @@ -0,0 +1,409 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +use Prophecy\Argument; +use Prophecy\Promise; +use Prophecy\Prediction; +use Prophecy\Exception\Doubler\MethodNotFoundException; +use Prophecy\Exception\InvalidArgumentException; +use Prophecy\Exception\Prophecy\MethodProphecyException; + +/** + * Method prophecy. + * + * @author Konstantin Kudryashov + */ +class MethodProphecy +{ + private $objectProphecy; + private $methodName; + private $argumentsWildcard; + private $promise; + private $prediction; + private $checkedPredictions = array(); + private $bound = false; + + /** + * Initializes method prophecy. + * + * @param ObjectProphecy $objectProphecy + * @param string $methodName + * @param null|Argument\ArgumentsWildcard|array $arguments + * + * @throws \Prophecy\Exception\Doubler\MethodNotFoundException If method not found + */ + public function __construct(ObjectProphecy $objectProphecy, $methodName, $arguments = null) + { + $double = $objectProphecy->reveal(); + if (!method_exists($double, $methodName)) { + throw new MethodNotFoundException(sprintf( + 'Method `%s::%s()` is not defined.', get_class($double), $methodName + ), get_class($double), $methodName, $arguments); + } + + $this->objectProphecy = $objectProphecy; + $this->methodName = $methodName; + + $reflectedMethod = new \ReflectionMethod($double, $methodName); + if ($reflectedMethod->isFinal()) { + throw new MethodProphecyException(sprintf( + "Can not add prophecy for a method `%s::%s()`\n". + "as it is a final method.", + get_class($double), + $methodName + ), $this); + } + + if (null !== $arguments) { + $this->withArguments($arguments); + } + } + + /** + * Sets argument wildcard. + * + * @param array|Argument\ArgumentsWildcard $arguments + * + * @return $this + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function withArguments($arguments) + { + if (is_array($arguments)) { + $arguments = new Argument\ArgumentsWildcard($arguments); + } + + if (!$arguments instanceof Argument\ArgumentsWildcard) { + throw new InvalidArgumentException(sprintf( + "Either an array or an instance of ArgumentsWildcard expected as\n". + 'a `MethodProphecy::withArguments()` argument, but got %s.', + gettype($arguments) + )); + } + + $this->argumentsWildcard = $arguments; + + return $this; + } + + /** + * Sets custom promise to the prophecy. + * + * @param callable|Promise\PromiseInterface $promise + * + * @return $this + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function will($promise) + { + if (is_callable($promise)) { + $promise = new Promise\CallbackPromise($promise); + } + + if (!$promise instanceof Promise\PromiseInterface) { + throw new InvalidArgumentException(sprintf( + 'Expected callable or instance of PromiseInterface, but got %s.', + gettype($promise) + )); + } + + $this->bindToObjectProphecy(); + $this->promise = $promise; + + return $this; + } + + /** + * Sets return promise to the prophecy. + * + * @see Prophecy\Promise\ReturnPromise + * + * @return $this + */ + public function willReturn() + { + return $this->will(new Promise\ReturnPromise(func_get_args())); + } + + /** + * Sets return argument promise to the prophecy. + * + * @param int $index The zero-indexed number of the argument to return + * + * @see Prophecy\Promise\ReturnArgumentPromise + * + * @return $this + */ + public function willReturnArgument($index = 0) + { + return $this->will(new Promise\ReturnArgumentPromise($index)); + } + + /** + * Sets throw promise to the prophecy. + * + * @see Prophecy\Promise\ThrowPromise + * + * @param string|\Exception $exception Exception class or instance + * + * @return $this + */ + public function willThrow($exception) + { + return $this->will(new Promise\ThrowPromise($exception)); + } + + /** + * Sets custom prediction to the prophecy. + * + * @param callable|Prediction\PredictionInterface $prediction + * + * @return $this + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function should($prediction) + { + if (is_callable($prediction)) { + $prediction = new Prediction\CallbackPrediction($prediction); + } + + if (!$prediction instanceof Prediction\PredictionInterface) { + throw new InvalidArgumentException(sprintf( + 'Expected callable or instance of PredictionInterface, but got %s.', + gettype($prediction) + )); + } + + $this->bindToObjectProphecy(); + $this->prediction = $prediction; + + return $this; + } + + /** + * Sets call prediction to the prophecy. + * + * @see Prophecy\Prediction\CallPrediction + * + * @return $this + */ + public function shouldBeCalled() + { + return $this->should(new Prediction\CallPrediction); + } + + /** + * Sets no calls prediction to the prophecy. + * + * @see Prophecy\Prediction\NoCallsPrediction + * + * @return $this + */ + public function shouldNotBeCalled() + { + return $this->should(new Prediction\NoCallsPrediction); + } + + /** + * Sets call times prediction to the prophecy. + * + * @see Prophecy\Prediction\CallTimesPrediction + * + * @param $count + * + * @return $this + */ + public function shouldBeCalledTimes($count) + { + return $this->should(new Prediction\CallTimesPrediction($count)); + } + + /** + * Checks provided prediction immediately. + * + * @param callable|Prediction\PredictionInterface $prediction + * + * @return $this + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function shouldHave($prediction) + { + if (is_callable($prediction)) { + $prediction = new Prediction\CallbackPrediction($prediction); + } + + if (!$prediction instanceof Prediction\PredictionInterface) { + throw new InvalidArgumentException(sprintf( + 'Expected callable or instance of PredictionInterface, but got %s.', + gettype($prediction) + )); + } + + if (null === $this->promise) { + $this->willReturn(); + } + + $calls = $this->getObjectProphecy()->findProphecyMethodCalls( + $this->getMethodName(), + $this->getArgumentsWildcard() + ); + + try { + $prediction->check($calls, $this->getObjectProphecy(), $this); + $this->checkedPredictions[] = $prediction; + } catch (\Exception $e) { + $this->checkedPredictions[] = $prediction; + + throw $e; + } + + return $this; + } + + /** + * Checks call prediction. + * + * @see Prophecy\Prediction\CallPrediction + * + * @return $this + */ + public function shouldHaveBeenCalled() + { + return $this->shouldHave(new Prediction\CallPrediction); + } + + /** + * Checks no calls prediction. + * + * @see Prophecy\Prediction\NoCallsPrediction + * + * @return $this + */ + public function shouldNotHaveBeenCalled() + { + return $this->shouldHave(new Prediction\NoCallsPrediction); + } + + /** + * Checks no calls prediction. + * + * @see Prophecy\Prediction\NoCallsPrediction + * @deprecated + * + * @return $this + */ + public function shouldNotBeenCalled() + { + return $this->shouldNotHaveBeenCalled(); + } + + /** + * Checks call times prediction. + * + * @see Prophecy\Prediction\CallTimesPrediction + * + * @param int $count + * + * @return $this + */ + public function shouldHaveBeenCalledTimes($count) + { + return $this->shouldHave(new Prediction\CallTimesPrediction($count)); + } + + /** + * Checks currently registered [with should(...)] prediction. + */ + public function checkPrediction() + { + if (null === $this->prediction) { + return; + } + + $this->shouldHave($this->prediction); + } + + /** + * Returns currently registered promise. + * + * @return null|Promise\PromiseInterface + */ + public function getPromise() + { + return $this->promise; + } + + /** + * Returns currently registered prediction. + * + * @return null|Prediction\PredictionInterface + */ + public function getPrediction() + { + return $this->prediction; + } + + /** + * Returns predictions that were checked on this object. + * + * @return Prediction\PredictionInterface[] + */ + public function getCheckedPredictions() + { + return $this->checkedPredictions; + } + + /** + * Returns object prophecy this method prophecy is tied to. + * + * @return ObjectProphecy + */ + public function getObjectProphecy() + { + return $this->objectProphecy; + } + + /** + * Returns method name. + * + * @return string + */ + public function getMethodName() + { + return $this->methodName; + } + + /** + * Returns arguments wildcard. + * + * @return Argument\ArgumentsWildcard + */ + public function getArgumentsWildcard() + { + return $this->argumentsWildcard; + } + + private function bindToObjectProphecy() + { + if ($this->bound) { + return; + } + + $this->getObjectProphecy()->addMethodProphecy($this); + $this->bound = true; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php new file mode 100644 index 0000000..e85c9d5 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php @@ -0,0 +1,279 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +use SebastianBergmann\Comparator\Factory as ComparatorFactory; +use SebastianBergmann\Comparator\ComparisonFailure; +use Prophecy\Call\Call; +use Prophecy\Doubler\LazyDouble; +use Prophecy\Argument\ArgumentsWildcard; +use Prophecy\Call\CallCenter; +use Prophecy\Exception\Prophecy\ObjectProphecyException; +use Prophecy\Exception\Prophecy\MethodProphecyException; +use Prophecy\Exception\Prediction\AggregateException; +use Prophecy\Exception\Prediction\PredictionException; + +/** + * Object prophecy. + * + * @author Konstantin Kudryashov + */ +class ObjectProphecy implements ProphecyInterface +{ + private $lazyDouble; + private $callCenter; + private $revealer; + private $comparatorFactory; + + /** + * @var MethodProphecy[][] + */ + private $methodProphecies = array(); + + /** + * Initializes object prophecy. + * + * @param LazyDouble $lazyDouble + * @param CallCenter $callCenter + * @param RevealerInterface $revealer + * @param ComparatorFactory $comparatorFactory + */ + public function __construct( + LazyDouble $lazyDouble, + CallCenter $callCenter = null, + RevealerInterface $revealer = null, + ComparatorFactory $comparatorFactory = null + ) { + $this->lazyDouble = $lazyDouble; + $this->callCenter = $callCenter ?: new CallCenter; + $this->revealer = $revealer ?: new Revealer; + + $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); + } + + /** + * Forces double to extend specific class. + * + * @param string $class + * + * @return $this + */ + public function willExtend($class) + { + $this->lazyDouble->setParentClass($class); + + return $this; + } + + /** + * Forces double to implement specific interface. + * + * @param string $interface + * + * @return $this + */ + public function willImplement($interface) + { + $this->lazyDouble->addInterface($interface); + + return $this; + } + + /** + * Sets constructor arguments. + * + * @param array $arguments + * + * @return $this + */ + public function willBeConstructedWith(array $arguments = null) + { + $this->lazyDouble->setArguments($arguments); + + return $this; + } + + /** + * Reveals double. + * + * @return object + * + * @throws \Prophecy\Exception\Prophecy\ObjectProphecyException If double doesn't implement needed interface + */ + public function reveal() + { + $double = $this->lazyDouble->getInstance(); + + if (null === $double || !$double instanceof ProphecySubjectInterface) { + throw new ObjectProphecyException( + "Generated double must implement ProphecySubjectInterface, but it does not.\n". + 'It seems you have wrongly configured doubler without required ClassPatch.', + $this + ); + } + + $double->setProphecy($this); + + return $double; + } + + /** + * Adds method prophecy to object prophecy. + * + * @param MethodProphecy $methodProphecy + * + * @throws \Prophecy\Exception\Prophecy\MethodProphecyException If method prophecy doesn't + * have arguments wildcard + */ + public function addMethodProphecy(MethodProphecy $methodProphecy) + { + $argumentsWildcard = $methodProphecy->getArgumentsWildcard(); + if (null === $argumentsWildcard) { + throw new MethodProphecyException(sprintf( + "Can not add prophecy for a method `%s::%s()`\n". + "as you did not specify arguments wildcard for it.", + get_class($this->reveal()), + $methodProphecy->getMethodName() + ), $methodProphecy); + } + + $methodName = $methodProphecy->getMethodName(); + + if (!isset($this->methodProphecies[$methodName])) { + $this->methodProphecies[$methodName] = array(); + } + + $this->methodProphecies[$methodName][] = $methodProphecy; + } + + /** + * Returns either all or related to single method prophecies. + * + * @param null|string $methodName + * + * @return MethodProphecy[] + */ + public function getMethodProphecies($methodName = null) + { + if (null === $methodName) { + return $this->methodProphecies; + } + + if (!isset($this->methodProphecies[$methodName])) { + return array(); + } + + return $this->methodProphecies[$methodName]; + } + + /** + * Makes specific method call. + * + * @param string $methodName + * @param array $arguments + * + * @return mixed + */ + public function makeProphecyMethodCall($methodName, array $arguments) + { + $arguments = $this->revealer->reveal($arguments); + $return = $this->callCenter->makeCall($this, $methodName, $arguments); + + return $this->revealer->reveal($return); + } + + /** + * Finds calls by method name & arguments wildcard. + * + * @param string $methodName + * @param ArgumentsWildcard $wildcard + * + * @return Call[] + */ + public function findProphecyMethodCalls($methodName, ArgumentsWildcard $wildcard) + { + return $this->callCenter->findCalls($methodName, $wildcard); + } + + /** + * Checks that registered method predictions do not fail. + * + * @throws \Prophecy\Exception\Prediction\AggregateException If any of registered predictions fail + */ + public function checkProphecyMethodsPredictions() + { + $exception = new AggregateException(sprintf("%s:\n", get_class($this->reveal()))); + $exception->setObjectProphecy($this); + + foreach ($this->methodProphecies as $prophecies) { + foreach ($prophecies as $prophecy) { + try { + $prophecy->checkPrediction(); + } catch (PredictionException $e) { + $exception->append($e); + } + } + } + + if (count($exception->getExceptions())) { + throw $exception; + } + } + + /** + * Creates new method prophecy using specified method name and arguments. + * + * @param string $methodName + * @param array $arguments + * + * @return MethodProphecy + */ + public function __call($methodName, array $arguments) + { + $arguments = new ArgumentsWildcard($this->revealer->reveal($arguments)); + + foreach ($this->getMethodProphecies($methodName) as $prophecy) { + $argumentsWildcard = $prophecy->getArgumentsWildcard(); + $comparator = $this->comparatorFactory->getComparatorFor( + $argumentsWildcard, $arguments + ); + + try { + $comparator->assertEquals($argumentsWildcard, $arguments); + return $prophecy; + } catch (ComparisonFailure $failure) {} + } + + return new MethodProphecy($this, $methodName, $arguments); + } + + /** + * Tries to get property value from double. + * + * @param string $name + */ + public function __get($name) + { + return $this->reveal()->$name; + } + + /** + * Tries to set property value to double. + * + * @param string $name + * @param string $value + */ + public function __set($name, $value) + { + $this->reveal()->$name = $this->revealer->reveal($value); + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php new file mode 100644 index 0000000..462f15a --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php @@ -0,0 +1,27 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +/** + * Core Prophecy interface. + * + * @author Konstantin Kudryashov + */ +interface ProphecyInterface +{ + /** + * Reveals prophecy object (double) . + * + * @return object + */ + public function reveal(); +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php new file mode 100644 index 0000000..2d83958 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php @@ -0,0 +1,34 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +/** + * Controllable doubles interface. + * + * @author Konstantin Kudryashov + */ +interface ProphecySubjectInterface +{ + /** + * Sets subject prophecy. + * + * @param ProphecyInterface $prophecy + */ + public function setProphecy(ProphecyInterface $prophecy); + + /** + * Returns subject prophecy. + * + * @return ProphecyInterface + */ + public function getProphecy(); +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php new file mode 100644 index 0000000..60ecdac --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php @@ -0,0 +1,44 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +/** + * Basic prophecies revealer. + * + * @author Konstantin Kudryashov + */ +class Revealer implements RevealerInterface +{ + /** + * Unwraps value(s). + * + * @param mixed $value + * + * @return mixed + */ + public function reveal($value) + { + if (is_array($value)) { + return array_map(array($this, __FUNCTION__), $value); + } + + if (!is_object($value)) { + return $value; + } + + if ($value instanceof ProphecyInterface) { + $value = $value->reveal(); + } + + return $value; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php new file mode 100644 index 0000000..ffc82bb --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php @@ -0,0 +1,29 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +/** + * Prophecies revealer interface. + * + * @author Konstantin Kudryashov + */ +interface RevealerInterface +{ + /** + * Unwraps value(s). + * + * @param mixed $value + * + * @return mixed + */ + public function reveal($value); +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Prophet.php b/core/vendor/phpspec/prophecy/src/Prophecy/Prophet.php new file mode 100644 index 0000000..ac64923 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Prophet.php @@ -0,0 +1,134 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy; + +use Prophecy\Doubler\Doubler; +use Prophecy\Doubler\LazyDouble; +use Prophecy\Doubler\ClassPatch; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\RevealerInterface; +use Prophecy\Prophecy\Revealer; +use Prophecy\Call\CallCenter; +use Prophecy\Util\StringUtil; +use Prophecy\Exception\Prediction\PredictionException; +use Prophecy\Exception\Prediction\AggregateException; + +/** + * Prophet creates prophecies. + * + * @author Konstantin Kudryashov + */ +class Prophet +{ + private $doubler; + private $revealer; + private $util; + + /** + * @var ObjectProphecy[] + */ + private $prophecies = array(); + + /** + * Initializes Prophet. + * + * @param null|Doubler $doubler + * @param null|RevealerInterface $revealer + * @param null|StringUtil $util + */ + public function __construct(Doubler $doubler = null, RevealerInterface $revealer = null, + StringUtil $util = null) + { + if (null === $doubler) { + $doubler = new Doubler; + $doubler->registerClassPatch(new ClassPatch\SplFileInfoPatch); + $doubler->registerClassPatch(new ClassPatch\TraversablePatch); + $doubler->registerClassPatch(new ClassPatch\DisableConstructorPatch); + $doubler->registerClassPatch(new ClassPatch\ProphecySubjectPatch); + $doubler->registerClassPatch(new ClassPatch\ReflectionClassNewInstancePatch); + $doubler->registerClassPatch(new ClassPatch\HhvmExceptionPatch()); + $doubler->registerClassPatch(new ClassPatch\MagicCallPatch); + $doubler->registerClassPatch(new ClassPatch\KeywordPatch); + } + + $this->doubler = $doubler; + $this->revealer = $revealer ?: new Revealer; + $this->util = $util ?: new StringUtil; + } + + /** + * Creates new object prophecy. + * + * @param null|string $classOrInterface Class or interface name + * + * @return ObjectProphecy + */ + public function prophesize($classOrInterface = null) + { + $this->prophecies[] = $prophecy = new ObjectProphecy( + new LazyDouble($this->doubler), + new CallCenter($this->util), + $this->revealer + ); + + if ($classOrInterface && class_exists($classOrInterface)) { + return $prophecy->willExtend($classOrInterface); + } + + if ($classOrInterface && interface_exists($classOrInterface)) { + return $prophecy->willImplement($classOrInterface); + } + + return $prophecy; + } + + /** + * Returns all created object prophecies. + * + * @return ObjectProphecy[] + */ + public function getProphecies() + { + return $this->prophecies; + } + + /** + * Returns Doubler instance assigned to this Prophet. + * + * @return Doubler + */ + public function getDoubler() + { + return $this->doubler; + } + + /** + * Checks all predictions defined by prophecies of this Prophet. + * + * @throws Exception\Prediction\AggregateException If any prediction fails + */ + public function checkPredictions() + { + $exception = new AggregateException("Some predictions failed:\n"); + foreach ($this->prophecies as $prophecy) { + try { + $prophecy->checkProphecyMethodsPredictions(); + } catch (PredictionException $e) { + $exception->append($e); + } + } + + if (count($exception->getExceptions())) { + throw $exception; + } + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php b/core/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php new file mode 100644 index 0000000..54d3832 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php @@ -0,0 +1,185 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Exporting utility. + * + * This class is derived from the PHPUnit testing framework. + * + * @author Sebastiaan Stok + * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License> + */ +class ExportUtil +{ + /** + * Exports a value into a string. + * + * The output of this method is similar to the output of print_r(), but + * improved in various aspects: + * + * - NULL is rendered as "null" (instead of "") + * - true is rendered as "true" (instead of "1") + * - FALSE is rendered as "false" (instead of "") + * - Strings are always quoted with single quotes + * - Carriage returns and newlines are normalized to \n + * - Recursion and repeated rendering is treated properly + * + * @param mixed $value The value to export + * @param integer $indentation The indentation level of the 2nd+ line + * + * @return string + */ + public static function export($value, $indentation = 0) + { + return static::recursiveExport($value, $indentation); + } + + /** + * Converts an object to an array containing all of its private, protected + * and public properties. + * + * @param object $object + * + * @return array + */ + public static function toArray($object) + { + $array = array(); + + foreach ((array) $object as $key => $value) { + // properties are transformed to keys in the following way: + + // private $property => "\0Classname\0property" + // protected $property => "\0*\0property" + // public $property => "property" + + if (preg_match('/^\0.+\0(.+)$/', $key, $matches)) { + $key = $matches[1]; + } + + $array[$key] = $value; + } + + // Some internal classes like SplObjectStorage don't work with the + // above (fast) mechanism nor with reflection + // Format the output similarly to print_r() in this case + if ($object instanceof SplObjectStorage) { + foreach ($object as $key => $value) { + $array[spl_object_hash($value)] = array( + 'obj' => $value, + 'inf' => $object->getInfo(), + ); + } + } + + return $array; + } + + /** + * Recursive implementation of export. + * + * @param mixed $value The value to export + * @param integer $indentation The indentation level of the 2nd+ line + * @param array $processedObjects Contains all objects that were already + * rendered + * + * @return string + */ + protected static function recursiveExport($value, $indentation, &$processedObjects = array()) + { + if ($value === null) { + return 'null'; + } + + if ($value === true) { + return 'true'; + } + + if ($value === false) { + return 'false'; + } + + if (is_string($value)) { + // Match for most non printable chars somewhat taking multibyte chars into account + if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) { + return 'Binary String: 0x' . bin2hex($value); + } + + return "'" . str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) . "'"; + } + + $origValue = $value; + + if (is_object($value)) { + if ($value instanceof ProphecyInterface) { + return sprintf('%s Object (*Prophecy*)', get_class($value)); + } elseif (in_array($value, $processedObjects, true)) { + return sprintf('%s Object (*RECURSION*)', get_class($value)); + } + + $processedObjects[] = $value; + + // Convert object to array + $value = self::toArray($value); + } + + if (is_array($value)) { + $whitespace = str_repeat(' ', $indentation); + + // There seems to be no other way to check arrays for recursion + // http://www.php.net/manual/en/language.types.array.php#73936 + preg_match_all('/\n \[(\w+)\] => Array\s+\*RECURSION\*/', print_r($value, true), $matches); + $recursiveKeys = array_unique($matches[1]); + + // Convert to valid array keys + // Numeric integer strings are automatically converted to integers + // by PHP + foreach ($recursiveKeys as $key => $recursiveKey) { + if ((string) (integer) $recursiveKey === $recursiveKey) { + $recursiveKeys[$key] = (integer) $recursiveKey; + } + } + + $content = ''; + + foreach ($value as $key => $val) { + if (in_array($key, $recursiveKeys, true)) { + $val = 'Array (*RECURSION*)'; + } else { + $val = self::recursiveExport($val, $indentation + 1, $processedObjects); + } + + $content .= $whitespace . ' ' . self::export($key) . ' => ' . $val . "\n"; + } + + if (strlen($content) > 0) { + $content = "\n" . $content . $whitespace; + } + + return sprintf( + "%s (%s)", + is_object($origValue) ? sprintf('%s:%s', get_class($origValue), spl_object_hash($origValue)) . ' Object' : 'Array', $content + ); + } + + if (is_double($value) && (double)(integer) $value === $value) { + return $value . '.0'; + } + + return (string) $value; + } +} diff --git a/core/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php b/core/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php new file mode 100644 index 0000000..bb90156 --- /dev/null +++ b/core/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php @@ -0,0 +1,89 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Util; + +use Prophecy\Call\Call; + +/** + * String utility. + * + * @author Konstantin Kudryashov + */ +class StringUtil +{ + /** + * Stringifies any provided value. + * + * @param mixed $value + * @param boolean $exportObject + * + * @return string + */ + public function stringify($value, $exportObject = true) + { + if (is_array($value)) { + if (range(0, count($value) - 1) === array_keys($value)) { + return '['.implode(', ', array_map(array($this, __FUNCTION__), $value)).']'; + } + + $stringify = array($this, __FUNCTION__); + + return '['.implode(', ', array_map(function ($item, $key) use ($stringify) { + return (is_integer($key) ? $key : '"'.$key.'"'). + ' => '.call_user_func($stringify, $item); + }, $value, array_keys($value))).']'; + } + if (is_resource($value)) { + return get_resource_type($value).':'.$value; + } + if (is_object($value)) { + return $exportObject ? ExportUtil::export($value) : sprintf('%s:%s', get_class($value), spl_object_hash($value)); + } + if (true === $value || false === $value) { + return $value ? 'true' : 'false'; + } + if (is_string($value)) { + $str = sprintf('"%s"', str_replace("\n", '\\n', $value)); + + if (50 <= strlen($str)) { + return substr($str, 0, 50).'"...'; + } + + return $str; + } + if (null === $value) { + return 'null'; + } + + return (string) $value; + } + + /** + * Stringifies provided array of calls. + * + * @param Call[] $calls Array of Call instances + * + * @return string + */ + public function stringifyCalls(array $calls) + { + $self = $this; + + return implode(PHP_EOL, array_map(function (Call $call) use ($self) { + return sprintf(' - %s(%s) @ %s', + $call->getMethodName(), + implode(', ', array_map(array($self, 'stringify'), $call->getArguments())), + str_replace(GETCWD().DIRECTORY_SEPARATOR, '', $call->getCallPlace()) + ); + }, $calls)); + } +} diff --git a/core/vendor/phpunit/php-file-iterator/ChangeLog.markdown b/core/vendor/phpunit/php-file-iterator/ChangeLog.markdown deleted file mode 100644 index fd9ed1b..0000000 --- a/core/vendor/phpunit/php-file-iterator/ChangeLog.markdown +++ /dev/null @@ -1,31 +0,0 @@ -File_Iterator 1.3 -================= - -This is the list of changes for the File_Iterator 1.3 release series. - -File_Iterator 1.3.4 -------------------- - -* Symlinks are now followed. - -File_Iterator 1.3.3 -------------------- - -* No changes. - -File_Iterator 1.3.2 -------------------- - -* No changes. - -File_Iterator 1.3.1 -------------------- - -* Fixed infinite loop in `File_Iterator_Facade::getCommonPath()` for empty directories. - -File_Iterator 1.3.0 -------------------- - -* Added `File_Iterator_Facade` for the most common use case. -* Moved `File_Iterator_Factory::getFilesAsArray()` to `File_Iterator_Facade::getFilesAsArray()`. -* `File_Iterator_Factory` is no longer static. diff --git a/core/vendor/phpunit/php-file-iterator/ChangeLog.md b/core/vendor/phpunit/php-file-iterator/ChangeLog.md new file mode 100644 index 0000000..fa77ced --- /dev/null +++ b/core/vendor/phpunit/php-file-iterator/ChangeLog.md @@ -0,0 +1,10 @@ +# Change Log + +All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). + +## [1.4.0] - 2015-04-02 + +### Added + +* [Added support for wildcards (glob) in exclude](https://github.com/sebastianbergmann/php-file-iterator/pull/23) + diff --git a/core/vendor/phpunit/php-file-iterator/File/Iterator/Autoload.php b/core/vendor/phpunit/php-file-iterator/File/Iterator/Autoload.php deleted file mode 100644 index 5a8c01a..0000000 --- a/core/vendor/phpunit/php-file-iterator/File/Iterator/Autoload.php +++ /dev/null @@ -1,66 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package File - * @author Sebastian Bergmann - * @copyright 2009-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.3.0 - */ - -spl_autoload_register( - function ($class) - { - static $classes = NULL; - static $path = NULL; - - if ($classes === NULL) { - $classes = array( - 'file_iterator' => '/Iterator.php', - 'file_iterator_facade' => '/Iterator/Facade.php', - 'file_iterator_factory' => '/Iterator/Factory.php' - ); - - $path = dirname(dirname(__FILE__)); - } - - $cn = strtolower($class); - - if (isset($classes[$cn])) { - require $path . $classes[$cn]; - } - } -); diff --git a/core/vendor/phpunit/php-file-iterator/File/Iterator/Autoload.php.in b/core/vendor/phpunit/php-file-iterator/File/Iterator/Autoload.php.in deleted file mode 100644 index 56da6c1..0000000 --- a/core/vendor/phpunit/php-file-iterator/File/Iterator/Autoload.php.in +++ /dev/null @@ -1,64 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package File - * @author Sebastian Bergmann - * @copyright 2009-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.3.0 - */ - -spl_autoload_register( - function ($class) - { - static $classes = NULL; - static $path = NULL; - - if ($classes === NULL) { - $classes = array( - ___CLASSLIST___ - ); - - $path = dirname(dirname(__FILE__)); - } - - $cn = strtolower($class); - - if (isset($classes[$cn])) { - require $path . $classes[$cn]; - } - } -); diff --git a/core/vendor/phpunit/php-file-iterator/LICENSE b/core/vendor/phpunit/php-file-iterator/LICENSE index c392d41..6cccbbb 100644 --- a/core/vendor/phpunit/php-file-iterator/LICENSE +++ b/core/vendor/phpunit/php-file-iterator/LICENSE @@ -1,6 +1,6 @@ File_Iterator -Copyright (c) 2009-2013, Sebastian Bergmann . +Copyright (c) 2009-2015, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/vendor/phpunit/php-file-iterator/README.markdown b/core/vendor/phpunit/php-file-iterator/README.markdown deleted file mode 100644 index c8971c2..0000000 --- a/core/vendor/phpunit/php-file-iterator/README.markdown +++ /dev/null @@ -1,23 +0,0 @@ -File_Iterator -============= - -Installation ------------- - -File_Iterator should be installed using the [PEAR Installer](http://pear.php.net/). This installer is the backbone of PEAR, which provides a distribution system for PHP packages, and is shipped with every release of PHP since version 4.3.0. - -The PEAR channel (`pear.phpunit.de`) that is used to distribute File_Iterator needs to be registered with the local PEAR environment: - - sb@ubuntu ~ % pear channel-discover pear.phpunit.de - Adding Channel "pear.phpunit.de" succeeded - Discovery of channel "pear.phpunit.de" succeeded - -This has to be done only once. Now the PEAR Installer can be used to install packages from the PHPUnit channel: - - sb@vmware ~ % pear install phpunit/File_Iterator - downloading File_Iterator-1.1.1.tgz ... - Starting to download File_Iterator-1.1.1.tgz (3,173 bytes) - ....done: 3,173 bytes - install ok: channel://pear.phpunit.de/File_Iterator-1.1.1 - -After the installation you can find the File_Iterator source files inside your local PEAR directory; the path is usually `/usr/lib/php/File`. diff --git a/core/vendor/phpunit/php-file-iterator/README.md b/core/vendor/phpunit/php-file-iterator/README.md new file mode 100644 index 0000000..ef28388 --- /dev/null +++ b/core/vendor/phpunit/php-file-iterator/README.md @@ -0,0 +1,12 @@ +# File_Iterator + +## Installation + +To add File_Iterator as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-file-iterator` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on File_Iterator 1.4: + + { + "require": { + "phpunit/php-file-iterator": "~1.4" + } + } + diff --git a/core/vendor/phpunit/php-file-iterator/build.xml b/core/vendor/phpunit/php-file-iterator/build.xml deleted file mode 100644 index 29d362f..0000000 --- a/core/vendor/phpunit/php-file-iterator/build.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/vendor/phpunit/php-file-iterator/build/PHPCS/Sniffs/ControlStructures/ControlSignatureSniff.php b/core/vendor/phpunit/php-file-iterator/build/PHPCS/Sniffs/ControlStructures/ControlSignatureSniff.php deleted file mode 100644 index bf9d520..0000000 --- a/core/vendor/phpunit/php-file-iterator/build/PHPCS/Sniffs/ControlStructures/ControlSignatureSniff.php +++ /dev/null @@ -1,22 +0,0 @@ -getTokens(); - - if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE || - $tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { - - $phpcsFile->addError( - 'Concatenation operator must be surrounded by whitespace', - $stackPtr - ); - } - } -} diff --git a/core/vendor/phpunit/php-file-iterator/build/PHPCS/ruleset.xml b/core/vendor/phpunit/php-file-iterator/build/PHPCS/ruleset.xml deleted file mode 100644 index 402f214..0000000 --- a/core/vendor/phpunit/php-file-iterator/build/PHPCS/ruleset.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - Sebastian Bergmann's coding standard - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/vendor/phpunit/php-file-iterator/build/phpmd.xml b/core/vendor/phpunit/php-file-iterator/build/phpmd.xml deleted file mode 100644 index 23ecb8b..0000000 --- a/core/vendor/phpunit/php-file-iterator/build/phpmd.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - Sebastian Bergmann's ruleset - - - - - - - - - - - - - - - - - - - diff --git a/core/vendor/phpunit/php-file-iterator/composer.json b/core/vendor/phpunit/php-file-iterator/composer.json index 1ddd5b8..c652794 100644 --- a/core/vendor/phpunit/php-file-iterator/composer.json +++ b/core/vendor/phpunit/php-file-iterator/composer.json @@ -24,10 +24,13 @@ }, "autoload": { "classmap": [ - "File/" + "src/" ] }, - "include-path": [ - "" - ] + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + } } + diff --git a/core/vendor/phpunit/php-file-iterator/package.xml b/core/vendor/phpunit/php-file-iterator/package.xml deleted file mode 100644 index f6ca981..0000000 --- a/core/vendor/phpunit/php-file-iterator/package.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - File_Iterator - pear.phpunit.de - FilterIterator implementation that filters files based on a list of suffixes. - FilterIterator implementation that filters files based on a list of suffixes. - - Sebastian Bergmann - sb - sb@sebastian-bergmann.de - yes - - 2013-10-10 - - 1.3.4 - 1.3.0 - - - stable - stable - - The BSD 3-Clause License - http://github.com/sebastianbergmann/php-file-iterator/tree - - - - - - - - - - - - - - - - - - - - - - - - - - - 5.3.3 - - - 1.9.4 - - - - - diff --git a/core/vendor/phpunit/php-file-iterator/File/Iterator/Facade.php b/core/vendor/phpunit/php-file-iterator/src/Facade.php similarity index 60% rename from core/vendor/phpunit/php-file-iterator/File/Iterator/Facade.php rename to core/vendor/phpunit/php-file-iterator/src/Facade.php index 2b846d0..cf73ba8 100644 --- a/core/vendor/phpunit/php-file-iterator/File/Iterator/Facade.php +++ b/core/vendor/phpunit/php-file-iterator/src/Facade.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. +/* + * This file is part of the File_Iterator package. * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. + * (c) Sebastian Bergmann * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package File - * @author Sebastian Bergmann - * @copyright 2009-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.3.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +15,7 @@ * files is returned as an array. * * @author Sebastian Bergmann - * @copyright 2009-2013 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-file-iterator/tree diff --git a/core/vendor/phpunit/php-file-iterator/File/Iterator/Factory.php b/core/vendor/phpunit/php-file-iterator/src/Factory.php similarity index 51% rename from core/vendor/phpunit/php-file-iterator/File/Iterator/Factory.php rename to core/vendor/phpunit/php-file-iterator/src/Factory.php index 3c0166e..70fc66b 100644 --- a/core/vendor/phpunit/php-file-iterator/File/Iterator/Factory.php +++ b/core/vendor/phpunit/php-file-iterator/src/Factory.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the File_Iterator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package File - * @author Sebastian Bergmann - * @copyright 2009-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.1.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +14,7 @@ * path. * * @author Sebastian Bergmann - * @copyright 2009-2013 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-file-iterator/tree @@ -68,18 +35,8 @@ public function getFileIterator($paths, $suffixes = '', $prefixes = '', array $e $paths = array($paths); } - $_paths = array(); - - foreach ($paths as $path) { - if ($locals = glob($path, GLOB_ONLYDIR)) { - $_paths = array_merge($_paths, $locals); - } else { - $_paths[] = $path; - } - } - - $paths = $_paths; - unset($_paths); + $paths = $this->getPathsAfterResolvingWildcards($paths); + $exclude = $this->getPathsAfterResolvingWildcards($exclude); if (is_string($prefixes)) { if ($prefixes != '') { @@ -117,4 +74,23 @@ public function getFileIterator($paths, $suffixes = '', $prefixes = '', array $e return $iterator; } + + /** + * @param array $paths + * @return array + */ + protected function getPathsAfterResolvingWildcards(array $paths) + { + $_paths = array(); + + foreach ($paths as $path) { + if ($locals = glob($path, GLOB_ONLYDIR)) { + $_paths = array_merge($_paths, $locals); + } else { + $_paths[] = $path; + } + } + + return $_paths; + } } diff --git a/core/vendor/phpunit/php-file-iterator/File/Iterator.php b/core/vendor/phpunit/php-file-iterator/src/Iterator.php similarity index 66% rename from core/vendor/phpunit/php-file-iterator/File/Iterator.php rename to core/vendor/phpunit/php-file-iterator/src/Iterator.php index f898ef5..53720e2 100644 --- a/core/vendor/phpunit/php-file-iterator/File/Iterator.php +++ b/core/vendor/phpunit/php-file-iterator/src/Iterator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. +/* + * This file is part of the File_Iterator package. * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. + * (c) Sebastian Bergmann * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package File - * @author Sebastian Bergmann - * @copyright 2009-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -46,7 +13,7 @@ * suffix(es). Hidden files and files from hidden directories are also filtered. * * @author Sebastian Bergmann - * @copyright 2009-2013 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-file-iterator/tree diff --git a/core/vendor/phpunit/php-token-stream/LICENSE b/core/vendor/phpunit/php-token-stream/LICENSE index 3138cf7..6a176fa 100644 --- a/core/vendor/phpunit/php-token-stream/LICENSE +++ b/core/vendor/phpunit/php-token-stream/LICENSE @@ -1,6 +1,6 @@ PHP_TokenStream -Copyright (c) 2009-2014, Sebastian Bergmann . +Copyright (c) 2009-2015, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/vendor/phpunit/php-token-stream/composer.json b/core/vendor/phpunit/php-token-stream/composer.json index 168f3de..dfde729 100644 --- a/core/vendor/phpunit/php-token-stream/composer.json +++ b/core/vendor/phpunit/php-token-stream/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } } } diff --git a/core/vendor/phpunit/php-token-stream/src/Token.php b/core/vendor/phpunit/php-token-stream/src/Token.php index b9828e3..a795163 100644 --- a/core/vendor/phpunit/php-token-stream/src/Token.php +++ b/core/vendor/phpunit/php-token-stream/src/Token.php @@ -1,51 +1,18 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHP_TokenStream package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHP_TokenStream - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** * A PHP token. * * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/tree @@ -742,3 +709,13 @@ class PHP_Token_YIELD extends PHP_Token {} class PHP_Token_ELLIPSIS extends PHP_Token {} class PHP_Token_POW extends PHP_Token {} class PHP_Token_POW_EQUAL extends PHP_Token {} + + +// Tokens introduced in HackLang +class PHP_Token_TYPELIST_LT extends PHP_Token {} +class PHP_Token_TYPELIST_GT extends PHP_Token {} +class PHP_Token_TYPE extends PHP_Token {} +class PHP_Token_SHAPE extends PHP_Token {} +class PHP_Token_LAMBDA_OP extends PHP_Token {} +class PHP_Token_LAMBDA_CP extends PHP_Token {} +class PHP_Token_LAMBDA_ARROW extends PHP_Token {} diff --git a/core/vendor/phpunit/php-token-stream/src/Token/Stream.php b/core/vendor/phpunit/php-token-stream/src/Token/Stream.php index 654a782..e25cbe2 100644 --- a/core/vendor/phpunit/php-token-stream/src/Token/Stream.php +++ b/core/vendor/phpunit/php-token-stream/src/Token/Stream.php @@ -1,51 +1,18 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. +/* + * This file is part of the PHP_TokenStream package. * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. + * (c) Sebastian Bergmann * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHP_TokenStream - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** * A stream of PHP tokens. * * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/tree diff --git a/core/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php b/core/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php index f5ef618..a80d41a 100644 --- a/core/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php +++ b/core/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php @@ -1,51 +1,18 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. +/* + * This file is part of the PHP_TokenStream package. * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. + * (c) Sebastian Bergmann * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHP_TokenStream - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** * A caching factory for token stream objects. * * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/tree diff --git a/core/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php b/core/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php index afcd1a1..d2a64b6 100644 --- a/core/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php +++ b/core/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHP_TokenStream package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Laurent Laville - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.2 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * @package PHP_TokenStream * @subpackage Tests * @author Laurent Laville - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/ diff --git a/core/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php b/core/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php index 895529a..f1e508c 100644 --- a/core/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php +++ b/core/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHP_TokenStream package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * @package PHP_TokenStream * @subpackage Tests * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/ diff --git a/core/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php b/core/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php index d43abaa..4f23c39 100644 --- a/core/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php +++ b/core/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHP_TokenStream package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * @package PHP_TokenStream * @subpackage Tests * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/ diff --git a/core/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php b/core/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php index 440e1fa..1e43351 100644 --- a/core/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php +++ b/core/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHP_TokenStream package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Laurent Laville - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.2 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -49,7 +15,7 @@ * @package PHP_TokenStream * @subpackage Tests * @author Laurent Laville - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/ diff --git a/core/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php b/core/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php index ebe1f63..56caede 100644 --- a/core/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php +++ b/core/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php @@ -1,46 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the PHP_TokenStream package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @author Laurent Laville - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -50,7 +15,7 @@ * @subpackage Tests * @author Sebastian Bergmann * @author Laurent Laville - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/ diff --git a/core/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php b/core/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php index 7a0bb7c..469f787 100644 --- a/core/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php +++ b/core/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHP_TokenStream package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * @package PHP_TokenStream * @subpackage Tests * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/ diff --git a/core/vendor/phpunit/php-token-stream/tests/TokenTest.php b/core/vendor/phpunit/php-token-stream/tests/TokenTest.php index b0b3d03..67bf79a 100644 --- a/core/vendor/phpunit/php-token-stream/tests/TokenTest.php +++ b/core/vendor/phpunit/php-token-stream/tests/TokenTest.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHP_TokenStream package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * @package PHP_TokenStream * @subpackage Tests * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/php-token-stream/ diff --git a/core/vendor/phpunit/phpunit-mock-objects/.travis.yml b/core/vendor/phpunit/phpunit-mock-objects/.travis.yml index e536e65..127bb65 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/.travis.yml +++ b/core/vendor/phpunit/phpunit-mock-objects/.travis.yml @@ -12,6 +12,7 @@ php: - 5.4 - 5.5 - 5.6 + - 7.0 - hhvm notifications: diff --git a/core/vendor/phpunit/phpunit-mock-objects/LICENSE b/core/vendor/phpunit/phpunit-mock-objects/LICENSE index 6c7e93b..3705d2b 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/LICENSE +++ b/core/vendor/phpunit/phpunit-mock-objects/LICENSE @@ -1,6 +1,6 @@ PHPUnit_MockObject -Copyright (c) 2002-2014, Sebastian Bergmann . +Copyright (c) 2002-2015, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/vendor/phpunit/phpunit-mock-objects/composer.json b/core/vendor/phpunit/phpunit-mock-objects/composer.json index 87f270e..7cbf442 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/composer.json +++ b/core/vendor/phpunit/phpunit-mock-objects/composer.json @@ -22,10 +22,10 @@ "require": { "php": ">=5.3.3", "phpunit/php-text-template": "~1.2", - "doctrine/instantiator": "~1.0,>=1.0.1" + "doctrine/instantiator": "~1.0,>=1.0.2" }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": "~4.4" }, "suggest": { "ext-soap": "*" diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php index 67c2b6c..c963a79 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -52,7 +18,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php index 9b83c17..4a5be92 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -52,7 +18,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php index 4acedd3..4bc48d5 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php index 3576a56..f41c65e 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php index 7b5c702..83db918 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -49,7 +15,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php index 2bd8849..a9b406c 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php index 156e0f8..89c08c6 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php index a0cd1f3..2e34156 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php @@ -1,51 +1,17 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 2.0.6 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://github.com/sebastianbergmann/phpunit-mock-objects * @since Class available since Release 2.0.6 diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php index 8ce99ff..4a3edb4 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 2.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://github.com/sebastianbergmann/phpunit-mock-objects * @since Interface available since Release 2.0.6 diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php index b13ab68..3516fc0 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php @@ -1,51 +1,17 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 2.0.6 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://github.com/sebastianbergmann/phpunit-mock-objects * @since Class available since Release 2.0.6 diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php index 8d9151c..7b18cd0 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ use Doctrine\Instantiator\Instantiator; @@ -58,7 +24,7 @@ function trait_exists($traitname, $autoload = true) * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects @@ -369,8 +335,8 @@ public function getMockForAbstractClass($originalClassName, array $arguments = a $reflector = new ReflectionClass($originalClassName); $methods = $mockedMethods; - foreach ($reflector->getMethods() as $method) { - if ($method->isAbstract() && !in_array($method->getName(), $methods)) { + foreach ($reflector->getMethods(ReflectionMethod::IS_ABSTRACT) as $method) { + if (!in_array($method->getName(), $methods)) { $methods[] = $method->getName(); } } @@ -578,7 +544,7 @@ public function generateClassFromWsdl($wsdlFile, $className, array $methods = ar } if ($this->soapLoaded) { - $options = array_merge($options, array('cache_wsdl'=>FALSE)); + $options = array_merge($options, array('cache_wsdl' => WSDL_CACHE_NONE)); $client = new SoapClient($wsdlFile, $options); $_methods = array_unique($client->__getFunctions()); unset($client); diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php index 992b927..9fe998c 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php index 6cb98e7..a8fdfd1 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php index 862367a..6b570e6 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ use SebastianBergmann\Exporter\Exporter; @@ -49,7 +15,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php index ac40720..e6627e1 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -51,7 +17,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php index e02b2c2..30da9b7 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -50,7 +16,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php index 219c0d0..0443501 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -53,7 +19,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php index cf066da..8d0b00e 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php index e69b65c..ae6cc25 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php index 5c9368b..e7b577c 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -53,7 +20,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php index 7891a7b..470cb29 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php index 0d3a8e8..a4ffe2a 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -54,7 +20,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php index 7723be6..b8caca3 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 2.2.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php index 5b4d36f..a2a9301 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -50,7 +16,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php index b6fee24..3a01596 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 2.2.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php index 848f420..d98eb76 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -52,7 +18,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php index 9a34516..1548ab3 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -50,7 +16,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php index 8b9ec10..11fc499 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -51,7 +17,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php index ebd5c69..4922e62 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -51,7 +17,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php index 3d0283e..fd8fa7a 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -51,7 +17,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php index 3ff8655..f59c23d 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php @@ -1,46 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the PHPUnit_MockObject package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package PHPUnit_MockObject - * @author Giorgio Sironi - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -49,7 +14,7 @@ * @package PHPUnit_MockObject * @author Giorgio Sironi * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://github.com/sebastianbergmann/phpunit-mock-objects * @since File available since Release 1.0.0 diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php index 1fbfeb4..5501762 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -48,7 +14,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php index ca8f262..4e3d06e 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -50,7 +16,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php index 10563c1..05c0faa 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php @@ -1,46 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the PHPUnit_MockObject package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package PHPUnit_MockObject - * @author Patrick Müller - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -49,7 +14,7 @@ * @package PHPUnit_MockObject * @author Patrick Müller * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php index 1a4d476..9203365 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php @@ -1,46 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the PHPUnit_MockObject package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package PHPUnit_MockObject - * @author Oliver Schlicht - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -49,7 +14,7 @@ * @package PHPUnit_MockObject * @author Oliver Schlicht * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php index cfdd6b7..254c164 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php index 9ef71ef..9aea78e 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php index 68f6564..c84f962 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php index a093abf..34318e6 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php index b24bdb5..8cc3473 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php @@ -1,46 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the PHPUnit_MockObject package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @author Kris Wallsmith - * @copyright 2010 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.1.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -49,7 +14,7 @@ * @package PHPUnit_MockObject * @author Sebastian Bergmann * @author Kris Wallsmith - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php index 36e82c6..ddda8e5 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.1.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php index 21ccbf4..376b7fe 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php +++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -47,7 +13,7 @@ * * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://github.com/sebastianbergmann/phpunit-mock-objects diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php b/core/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php index 045b851..8c0a08e 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php +++ b/core/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php @@ -100,7 +100,7 @@ public function testGetMockForAbstractClassExpectingInvalidArgumentException($cl * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass * @expectedException PHPUnit_Framework_MockObject_RuntimeException */ - public function testGetMockForAbstractClassAnstractClassDoesNotExist() + public function testGetMockForAbstractClassAbstractClassDoesNotExist() { $mock = $this->generator->getMockForAbstractClass('Tux'); } diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php b/core/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php index c770e2a..b5a6bb9 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php +++ b/core/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php @@ -1,53 +1,18 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the PHPUnit_MockObject package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package PHPUnit_MockObject - * @author Giorgio Sironi - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** * @package PHPUnit_MockObject * @author Giorgio Sironi * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://github.com/sebastianbergmann/phpunit-mock-objects * @since File available since Release 1.0.0 diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php index f3d8a73..6ad3fd0 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php +++ b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 3.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** @@ -49,7 +15,7 @@ * @author Sebastian Bergmann * @author Patrick Mueller * @author Frank Kleine - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://www.phpunit.de/ diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php b/core/vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php index 3e73521..829621f 100644 --- a/core/vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php +++ b/core/vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php @@ -1,51 +1,17 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the PHPUnit_MockObject package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 2.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ /** * @package PHPUnit_MockObject * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @version Release: @package_version@ * @link http://www.phpunit.de/ diff --git a/core/vendor/phpunit/phpunit/.travis.yml b/core/vendor/phpunit/phpunit/.travis.yml index 79b5a5a..61b7cc9 100644 --- a/core/vendor/phpunit/phpunit/.travis.yml +++ b/core/vendor/phpunit/phpunit/.travis.yml @@ -14,9 +14,13 @@ matrix: - php: hhvm - php: hhvm-nightly +sudo: false + +before_install: + - composer self-update + install: - travis_retry composer install --no-interaction --prefer-source - - if [[ "$TRAVIS_PHP_VERSION" == hhvm* ]]; then echo -e '\nhhvm.libxml.ext_entity_whitelist = "file"' | sudo tee -a /etc/hhvm/php.ini; fi script: - ./phpunit diff --git a/core/vendor/phpunit/phpunit/ChangeLog-4.0.md b/core/vendor/phpunit/phpunit/ChangeLog-4.0.md new file mode 100644 index 0000000..705f221 --- /dev/null +++ b/core/vendor/phpunit/phpunit/ChangeLog-4.0.md @@ -0,0 +1,115 @@ +# Changes in PHPUnit 4.0 + +## PHPUnit 4.0.20 + +* Fixed [#1242](https://github.com/sebastianbergmann/phpunit/issues/1242): `--self-update` uses OpenSSL API that is deprecated in PHP 5.6 + +## PHPUnit 4.0.19 + +* Fixed [#1193](https://github.com/sebastianbergmann/phpunit/issues/1193): Process isolation does not work correctly when PHPUnit is used from PHAR +* Fixed a BC break related to comparing `DOMNode` objects that was introduced in PHPUnit 4.0.18 + +## PHPUnit 4.0.18 + +* Fixed [#1218](https://github.com/sebastianbergmann/phpunit/issues/1218): `--self-update` destroys symlink + +## PHPUnit 4.0.17 + +* [Display a message that the PEAR installation method is no longer supported when PHPUnit was installed using the PEAR Installer](https://github.com/sebastianbergmann/phpunit/commit/70b02c6be0176ab8ad3d3c9ec97480556c5dd63b) + +## PHPUnit 4.0.16 + +* [Fixed handling of the `--report-useless-tests`, `--strict-coverage`, `--disallow-test-output`, and `--enforce-time-limit` options](https://github.com/sebastianbergmann/phpunit/commit/38baa9670711adedfe44ef24a33b568f61f3f045) + +## PHPUnit 4.0.15 + +* New release of PHPUnit as PHAR and PEAR package with updated dependencies + +## PHPUnit 4.0.14 + +* New release of PHPUnit as PHAR and PEAR package with updated dependencies + +## PHPUnit 4.0.13 + +* New release of PHPUnit as PHAR and PEAR package with updated dependencies + +## PHPUnit 4.0.12 + +* [Use blacklist from PHP_CodeCoverage](https://github.com/sebastianbergmann/phpunit/commit/16152ba4b8d0104ce34f60cb71b2b982ba84c898) + +## PHPUnit 4.0.11 + +* [Fixed unintended autoloader invokation triggered by the `@beforeClass` and `@afterClass` annotations](https://github.com/sebastianbergmann/phpunit/commit/f12e10fddc3ccbddb652a04d9036aeb5a6d54bff) + +## PHPUnit 4.0.10 + +* New release of PHPUnit as PHAR and PEAR package with updated dependencies (most notably a [fix](https://github.com/sebastianbergmann/phpunit-mock-objects/commit/c5e6274b8f2bf983cf883bb375cf44f99aff200e) in the mock object generator that caused a [performance regression](https://github.com/sebastianbergmann/phpunit/issues/1187)) + +## PHPUnit 4.0.9 + +* The "No code coverage will be generated." message was displayed even when code coverage reporting was not requested +* Optimized the search for the `@before`, `@after`, `@beforeClass` and `@afterClass` annotations +* Optimized the usage of `SebastianBergmann\Environment\Runtime::canCollectCodeCoverage()` + +## PHPUnit 4.0.8 + +* Fixed [#1186](https://github.com/sebastianbergmann/phpunit/issues/1186): `@before` and `@after` methods are not called in `@dataProvider` methods + +## PHPUnit 4.0.7 + +* Removed dependency on `phpunit/dbunit` in `composer.json` that was unintentionally added in PHPUnit 4.0.6 + +## PHPUnit 4.0.6 + +* New release of PHPUnit as PHAR and PEAR package with updated dependencies + +## PHPUnit 4.0.5 + +* New release of PHPUnit as PHAR and PEAR package with updated dependencies + +## PHPUnit 4.0.4 + +* Fixed stacktrace filtering when PHPUnit is used from a PHAR + +## PHPUnit 4.0.3 + +* New release of PHPUnit as PHAR and PEAR package with updated dependencies + +## PHPUnit 4.0.2 + +* Fixed an issue related to displaying PHPUnit's version number + +## PHPUnit 4.0.1 + +* Fixed collection of code coverage data for tests that use a data provider + +## PHPUnit 4.0.0 + +* Implemented #382: Added the `$options` parameter to `PHPUnit_Framework_TestCase::getMockFromWsdl()` for configuring the `SoapClient` +* Implemented #628: Added `PHPUnit_Framework_Assert::countOf(), a shortcut to get a `PHPUnit_Framework_Constraint_Count` instance +* Implemented #711: `coverage-text` now has an XML `showOnlySummary` option +* Implemented #719: The `--stderr` switch now respects `--colors` and `--debug` +* Implemented #746: Allow identity checking for non-object types in all asserts that depend on `TraversableContains` +* Implemented #758: Show a proper stack trace when @expectedException fails due to a unexpected exception being thrown +* Implemented #773: Recursive and repeated arrays are more gracefully when comparison differences are exported +* Implemented #813: Added `@before`, `@after`, `@beforeClass` and `@afterClass` annotations +* Implemented #834: Added the `@requires OS` annotation +* Implemented #835: Printers that extend `PHPUnit_TextUI_ResultPrinter` should have similar construction +* Implemented #838: Added a base test listener +* Implemented #859: Added PHP label validation to attribute assertions +* Implemented #869: Added support for the adjacent sibling selector (+) to `PHPUnit_Util_XML::findNodes()` +* Implemented #871: Add Comparator for DateTime objects +* Implemented #877: Added new HTML5 tags to `PHPUnit_Util_XML::findNodes()` +* Added `--coverage-crap4j` switch to generate code coverage report in Crap4J XML format +* `assertCount()`, `assertNotCount()`, `assertSameSize()`, and `assertNotSameSize()` now support all objects that implement the `Traversable` interface +* A test will now fail in strict mode when it uses the `@covers` annotation and code that is not expected to be covered is executed +* All relative paths in a configuration file are now resolved relative to that configuration file +* Fixed #240: XML strings are escaped by removing invalid characters +* Fixed #261: `setUp()` and `setUpBeforeClass()` are run before filters are applied +* Fixed #541: Excluded groups are counted towards total number of tests being executed +* Fixed #789: PHP INI settings would not be passed to child processes +* Fixed #806: Array references are now properly displayed in error output +* Fixed #808: Resources are now reported as `resource(13) of type (stream)` instead of `NULL` +* Fixed #873: PHPUnit suppresses exceptions thrown outside of test case function +* Fixed: `phpt` test cases now use the correct php binary when executed through wrapper scripts + diff --git a/core/vendor/phpunit/phpunit/ChangeLog-4.1.md b/core/vendor/phpunit/phpunit/ChangeLog-4.1.md new file mode 100644 index 0000000..cf18a30 --- /dev/null +++ b/core/vendor/phpunit/phpunit/ChangeLog-4.1.md @@ -0,0 +1,44 @@ +# Changes in PHPUnit 4.1 + +## PHPUnit 4.1.6 + +* Fixed [#1380](https://github.com/sebastianbergmann/phpunit/issues/1380): `assertMatch()` returns `Unexpected end tag : hr` +* Fixed [#1390](https://github.com/sebastianbergmann/phpunit/issues/1390): Licensing issue with third-party components bundled in PHAR distribution + +## PHPUnit 4.1.5 + +* Implemented [#1330](https://github.com/sebastianbergmann/phpunit/issues/1330): Allow non-ambiguous shortened long options +* Fixed [#529](https://github.com/sebastianbergmann/phpunit/issues/529): Tests missed in execution when another test extends from it +* Fixed [#1149](https://github.com/sebastianbergmann/phpunit/issues/1149): Test swallows output buffer when run in a separate process +* Fixed [#1336](https://github.com/sebastianbergmann/phpunit/issues/1336): Problem in process isolation with global variables that contain an object which contains a string which contains multiple backslashes +* Fixed [#1337](https://github.com/sebastianbergmann/phpunit/issues/1337): Data Provider with `\` at the end of the name breaks with process isolation +* Fixed [#1345](https://github.com/sebastianbergmann/phpunit/issues/1345): Process isolation blocks infinitely upon fatal error in child process +* Fixed [#1354](https://github.com/sebastianbergmann/phpunit/issues/1354): PHPUnit test suite fails on Windows +* Fixed [#1369](https://github.com/sebastianbergmann/phpunit/issues/1369): Performance of `TestSuite::addTestFile()` and missing documentation +* Fixed [#1374](https://github.com/sebastianbergmann/phpunit/issues/1374): `tearDown()` is called despite unmet requirements + +## PHPUnit 4.1.4 + +* Fixed [#1265](https://github.com/sebastianbergmann/phpunit/issues/1265): `PHPUnit_Runner_StandardTestSuiteLoader` could not be configured as loader +* Fixed [#1311](https://github.com/sebastianbergmann/phpunit/issues/1311): Incomplete XML Schema for PHPUnit XML configuration file +* Fixed [#1314](https://github.com/sebastianbergmann/phpunit/issues/1314): Bug in configuration parser + +## PHPUnit 4.1.3 + +* New release of PHPUnit as PHP Archive (PHAR) with updated dependencies + +## PHPUnit 4.1.2 + +* New release of PHPUnit as PHP Archive (PHAR) with updated dependencies + +## PHPUnit 4.1.1 + +* Added `--selfupdate` alias for `--self-update` +* Fixed the constructor argument for `SebastianBergmann\Version` +* Improved the fix for [#1133](https://github.com/sebastianbergmann/phpunit/issues/1133) + +## PHPUnit 4.1.0 + +* The code to compare PHP values for equality (in `assertEquals()`, for instance) has been factored out into a [separate component](https://github.com/sebastianbergmann/comparator) +* [The mock object generator is now created lazily](https://github.com/sebastianbergmann/phpunit/pull/1165) + diff --git a/core/vendor/phpunit/phpunit/ChangeLog-4.2.md b/core/vendor/phpunit/phpunit/ChangeLog-4.2.md new file mode 100644 index 0000000..2a8ae17 --- /dev/null +++ b/core/vendor/phpunit/phpunit/ChangeLog-4.2.md @@ -0,0 +1,31 @@ +# Changes in PHPUnit 4.2 + +## PHPUnit 4.2.5 + +* New release of PHPUnit as PHP Archive (PHAR) with updated dependencies + +## PHPUnit 4.2.4 + +* Fixed [#1413](https://github.com/sebastianbergmann/phpunit/issues/1413): `assertCount()` hangs in infinite loop on HHVM + +## PHPUnit 4.2.3 + +* Fixed [#1403](https://github.com/sebastianbergmann/phpunit/issues/1403): `phpunit --self-update` does not work + +## PHPUnit 4.2.2 + +* Fixed [#1399](https://github.com/sebastianbergmann/phpunit/issues/1399): `enforceTimeLimit` configuration option is not handled + +## PHPUnit 4.2.1 + +* Fixed [#1380](https://github.com/sebastianbergmann/phpunit/issues/1380): `assertMatch()` returns `Unexpected end tag : hr` +* Fixed [#1390](https://github.com/sebastianbergmann/phpunit/issues/1390): Licensing issue with third-party components bundled in PHAR distribution + +## PHPUnit 4.2.0 + +* Tests annotated with `@todo` will now be reported as risky when the `--disallow-todo-tests` option is used or `beStrictAboutTodoAnnotatedTests=true` is set in the configuration file +* The `atLeast()` and `atMost()` invocation count matchers were added +* The `assertTag()` and `assertSelect*()` assertion methods have been deprecated in favor of the [phpunit-dom-assertions](https://github.com/phpunit/phpunit-dom-assertions) extension; these methods will be removed in PHPUnit 5.0 +* `trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);` is used now to indicate that a PHPUnit API method is deprecated; the old "system" for deprecating methods has been removed +* The PHP Archive (PHAR) distribution of PHPUnit can now be used as a library; `include()`ing or `require()`ing it will not execute the CLI test runner + diff --git a/core/vendor/phpunit/phpunit/ChangeLog-4.3.md b/core/vendor/phpunit/phpunit/ChangeLog-4.3.md new file mode 100644 index 0000000..e9d4496 --- /dev/null +++ b/core/vendor/phpunit/phpunit/ChangeLog-4.3.md @@ -0,0 +1,32 @@ +# Changes in PHPUnit 4.3 + +## PHPUnit 4.3.5 + +* Merged [#1484](https://github.com/sebastianbergmann/phpunit/issues/1484): Removed `lazymap` from blacklist as it is not longer used +* Merged [#1489](https://github.com/sebastianbergmann/phpunit/issues/1489): Do not send output from tests in process isolation when testing output + +## PHPUnit 4.3.4 + +* Fixed [#1428](https://github.com/sebastianbergmann/phpunit/issues/1428): Issue with Composer dependencies +* Fixed [#1447](https://github.com/sebastianbergmann/phpunit/issues/1447): PHPT tests treat line endings inconsistently + +## PHPUnit 4.3.3 + +* Fixed [#1471](https://github.com/sebastianbergmann/phpunit/issues/1471): Output made while test is running is printed although `expectOutputString()` is used when an assertion fails + +## PHPUnit 4.3.2 + +* Fixed [#1468](https://github.com/sebastianbergmann/phpunit/issues/1468): Incomplete and `@todo` annotated tests are counted twice + +## PHPUnit 4.3.1 + +* New release of PHPUnit as PHP Archive (PHAR) with updated dependencies + +## PHPUnit 4.3.0 + +* Merged [#1358](https://github.com/sebastianbergmann/phpunit/issues/1358): Implement `@expectedExceptionMessageRegExp` annotation +* Merged [#1360](https://github.com/sebastianbergmann/phpunit/issues/1360): Allow a test to identify whether it runs in isolation +* Fixed [#1216](https://github.com/sebastianbergmann/phpunit/issues/1216): Bootstrap does not have global variables set when `--bootstrap` is specified on commandline +* Fixed [#1351](https://github.com/sebastianbergmann/phpunit/issues/1351): `TestResult` object contains serialized test class upon test failure/exception in process isolation +* Fixed [#1437](https://github.com/sebastianbergmann/phpunit/issues/1437): Risky test messages mask failures + diff --git a/core/vendor/phpunit/phpunit/ChangeLog-4.4.md b/core/vendor/phpunit/phpunit/ChangeLog-4.4.md new file mode 100644 index 0000000..6b541c3 --- /dev/null +++ b/core/vendor/phpunit/phpunit/ChangeLog-4.4.md @@ -0,0 +1,32 @@ +# Changes in PHPUnit 4.4 + +## PHPUnit 4.4.5 + +* Fixed [#1592](https://github.com/sebastianbergmann/phpunit/issues/1592): Incorrect dependency information + +## PHPUnit 4.4.4 + +* Fixed [#1587](https://github.com/sebastianbergmann/phpunit/issues/1587): Class `SebastianBergmann\Exporter\Context` not found + +## PHPUnit 4.4.3 + +* New PHAR release due to updated dependencies + +## PHPUnit 4.4.2 + +* Merged [#1567](https://github.com/sebastianbergmann/phpunit/issues/1567): `coverage-crap4j` missing in XSD for PHPUnit XML configuration +* Merged [#1573](https://github.com/sebastianbergmann/phpunit/issues/1573): Updates for the XSD for PHPUnit XML configuration +* Fixed [#1570](https://github.com/sebastianbergmann/phpunit/issues/1570): Test that prints output is marked as failure and not as risky when `--disallow-test-output` is used +* Fixed `--stderr` with `--tap` or `--testdox` options + +## PHPUnit 4.4.1 + +* Merged [#1528](https://github.com/sebastianbergmann/phpunit/issues/1528): Add `expectedCount()` to `toString()` return value + +## PHPUnit 4.4.0 + +* Merged [#1371](https://github.com/sebastianbergmann/phpunit/issues/1371): Implement `assertArraySubset()` assertion +* Merged [#1427](https://github.com/sebastianbergmann/phpunit/issues/1427): Improve failure output for tests when provided data is binary +* Merged [#1439](https://github.com/sebastianbergmann/phpunit/issues/1439): Add support for `double` to `assertInternalType()` +* Merged [#1458](https://github.com/sebastianbergmann/phpunit/issues/1458): Only enable colors when PHPUnit is run on a console (and output is not sent to a file) + diff --git a/core/vendor/phpunit/phpunit/ChangeLog-4.5.md b/core/vendor/phpunit/phpunit/ChangeLog-4.5.md new file mode 100644 index 0000000..2b280da --- /dev/null +++ b/core/vendor/phpunit/phpunit/ChangeLog-4.5.md @@ -0,0 +1,10 @@ +# Changes in PHPUnit 4.5 + +## PHPUnit 4.5.0 + +* Added out-of-the-box support for [Prophecy](https://github.com/phpspec/prophecy) +* Implemented [#137](https://github.com/sebastianbergmann/phpunit/issues/137): Add support for variable number of tests shown per line in default result printer +* Merged [#1478](https://github.com/sebastianbergmann/phpunit/issues/1478): Improve the performance of `PHPUnit_Framework_Constraint_IsEqual` (which is used by `assertEquals()`, for instance) for the most common case +* Fixed [#1474](https://github.com/sebastianbergmann/phpunit/issues/1474): Allow the registration of custom comparators for `assertEquals()` et al. (again) +* [Deprecated](https://github.com/sebastianbergmann/phpunit/commit/7abe7796f77b13fdf3cfc506fb987d6c2ab477f5) the `--strict` commandline option and the XML configuration's `strict` attribute + diff --git a/core/vendor/phpunit/phpunit/ChangeLog-4.6.md b/core/vendor/phpunit/phpunit/ChangeLog-4.6.md new file mode 100644 index 0000000..943228d --- /dev/null +++ b/core/vendor/phpunit/phpunit/ChangeLog-4.6.md @@ -0,0 +1,14 @@ +# Changes in PHPUnit 4.6 + +## PHPUnit 4.6.1 + +* Fixed [#1665](https://github.com/sebastianbergmann/phpunit/issues/1665): PHPUnit 4.6.0 PHAR does not work when renamed to `phpunit` + +## PHPUnit 4.6.0 + +* Added the `--strict-global-state` command-line option and the `beStrictAboutChangesToGlobalState` configuration setting for enabling a check that global variabes, super-global variables, and static attributes in user-defined classes are not modified during a test +* Merged [#1527](https://github.com/sebastianbergmann/phpunit/issues/1527) and [#1529](https://github.com/sebastianbergmann/phpunit/issues/1529): Allow to define options for displaying colors +* Merged [#1528](https://github.com/sebastianbergmann/phpunit/issues/1528): Improve message when `PHPUnit_Framework_Constraint_Count` is used with logical operators +* Merged [#1537](https://github.com/sebastianbergmann/phpunit/issues/1537): Fix problem of `--stderr` with `--tap` and `--testdox` +* Fixed [#1599](https://github.com/sebastianbergmann/phpunit/issues/1599): The PHAR build of PHPUnit no longer uses an autoloader to load PHPUnit's own classes and instead statically loads all classes on startup + diff --git a/core/vendor/phpunit/phpunit/README.md b/core/vendor/phpunit/phpunit/README.md index c0c0d7a..585cc02 100644 --- a/core/vendor/phpunit/phpunit/README.md +++ b/core/vendor/phpunit/phpunit/README.md @@ -3,8 +3,8 @@ PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. [![Latest Stable Version](https://poser.pugx.org/phpunit/phpunit/v/stable.png)](https://packagist.org/packages/phpunit/phpunit) -[![Build Status](https://travis-ci.org/sebastianbergmann/phpunit.png?branch=master)](https://travis-ci.org/sebastianbergmann/phpunit) -[![Dependency Status](https://www.versioneye.com/php/phpunit:phpunit/dev-master/badge.png)](https://www.versioneye.com/php/phpunit:phpunit/dev-master) +[![Build Status](https://travis-ci.org/sebastianbergmann/phpunit.svg?branch=4.6)](https://travis-ci.org/sebastianbergmann/phpunit) +[![Dependency Status](https://www.versioneye.com/php/phpunit:phpunit/4.6/badge.png)](https://www.versioneye.com/php/phpunit:phpunit/dev-master) [![Reference Status](https://www.versioneye.com/php/phpunit:phpunit/reference_badge.svg)](https://www.versioneye.com/php/phpunit:phpunit/references) ## Installation @@ -26,8 +26,6 @@ Alternatively, you may use [Composer](http://getcomposer.org/) to download and i Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects. -The development of PHPUnit is discussed on the [dev@phpunit.de](mailto:dev-subscribe@phpunit.de) mailing list as well as on the [#phpunit channel on the Freenode IRC network](irc://irc.freenode.net/phpunit). - ## List of Contributors Thanks to everyone who has contributed to PHPUnit! You can find a detailed list of contributors on every PHPUnit related package on GitHub. This list shows only the major components: @@ -36,7 +34,7 @@ Thanks to everyone who has contributed to PHPUnit! You can find a detailed list * [PHP_CodeCoverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors) * [PHPUnit_MockObject](https://github.com/sebastianbergmann/phpunit-mock-objects/graphs/contributors) -A very special thanks to everyone who has contributed to the documentation and helps maintaining the translations: +A very special thanks to everyone who has contributed to the documentation and helps maintain the translations: * [PHPUnit Documentation](https://github.com/sebastianbergmann/phpunit-documentation/graphs/contributors) diff --git a/core/vendor/phpunit/phpunit/build.xml b/core/vendor/phpunit/phpunit/build.xml index 482e499..32ee1a0 100644 --- a/core/vendor/phpunit/phpunit/build.xml +++ b/core/vendor/phpunit/phpunit/build.xml @@ -223,7 +223,7 @@ - + @@ -289,6 +289,14 @@ + + + + + + + + @@ -339,6 +347,20 @@ + + + + + + + + + + + + + + @@ -355,13 +377,12 @@ + - - diff --git a/core/vendor/phpunit/phpunit/build/phar-autoload.php.in b/core/vendor/phpunit/phpunit/build/phar-autoload.php.in index 62d8f49..56b46fc 100644 --- a/core/vendor/phpunit/phpunit/build/phar-autoload.php.in +++ b/core/vendor/phpunit/phpunit/build/phar-autoload.php.in @@ -12,27 +12,11 @@ if (__FILE__ == realpath($GLOBALS['_SERVER']['SCRIPT_NAME'])) { define('__PHPUNIT_PHAR__', str_replace(DIRECTORY_SEPARATOR, '/', $phar)); define('__PHPUNIT_PHAR_ROOT__', 'phar://___PHAR___'); -spl_autoload_register( - function ($class) - { - static $classes = NULL; - - if ($classes === NULL) { - $classes = array( - ___CLASSLIST___ - ); - } - - $class = strtolower($class); - - if (isset($classes[$class])) { - require __PHPUNIT_PHAR_ROOT__ . $classes[$class]; - } - } -); - Phar::mapPhar('___PHAR___'); +___FILELIST___ +require __PHPUNIT_PHAR_ROOT__ . '/phpunit/Framework/Assert/Functions.php'; + if ($execute) { if (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == '--manifest') { print file_get_contents(__PHPUNIT_PHAR_ROOT__ . '/manifest.txt'); diff --git a/core/vendor/phpunit/phpunit/build/phar-manifest.php b/core/vendor/phpunit/phpunit/build/phar-manifest.php old mode 100755 new mode 100644 index 50608fb..474686b --- a/core/vendor/phpunit/phpunit/build/phar-manifest.php +++ b/core/vendor/phpunit/phpunit/build/phar-manifest.php @@ -25,4 +25,3 @@ print "\n"; } - diff --git a/core/vendor/phpunit/phpunit/build/phar-version.php b/core/vendor/phpunit/phpunit/build/phar-version.php old mode 100755 new mode 100644 diff --git a/core/vendor/phpunit/phpunit/composer.json b/core/vendor/phpunit/phpunit/composer.json index 756e1ff..67d7cd3 100644 --- a/core/vendor/phpunit/phpunit/composer.json +++ b/core/vendor/phpunit/phpunit/composer.json @@ -22,16 +22,17 @@ }, "require": { "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3.2", + "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-code-coverage": "~2.0", - "phpunit/php-timer": "~1.0.2", + "phpunit/php-code-coverage": "~2.0,>=2.0.11", + "phpunit/php-timer": "~1.0", "phpunit/phpunit-mock-objects": "~2.3", - "symfony/yaml": "~2.0", - "sebastian/comparator": "~1.0", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.1", - "sebastian/exporter": "~1.0", + "phpspec/prophecy": "~1.3,>=1.3.1", + "symfony/yaml": "~2.1|~3.0", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.2", + "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", "sebastian/version": "~1.0", "ext-dom": "*", @@ -52,6 +53,9 @@ "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "autoload-dev": { @@ -59,13 +63,12 @@ "tests/" ], "files": [ - "src/Framework/Assert/Functions.php", "tests/_files/CoveredFunction.php" ] }, "extra": { "branch-alias": { - "dev-master": "4.4.x-dev" + "dev-master": "4.6.x-dev" } } } diff --git a/core/vendor/phpunit/phpunit/phpunit.xsd b/core/vendor/phpunit/phpunit/phpunit.xsd index 6307822..9c723ec 100644 --- a/core/vendor/phpunit/phpunit/phpunit.xsd +++ b/core/vendor/phpunit/phpunit/phpunit.xsd @@ -1,8 +1,8 @@ - - This Schema file defines the rules by which the XML configuration file of PHPUnit 4.4 may be structured. + + This Schema file defines the rules by which the XML configuration file of PHPUnit 4.6 may be structured. @@ -190,6 +190,7 @@ + @@ -207,6 +208,7 @@ + diff --git a/core/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php b/core/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php index 9cf23b2..7b91e73 100644 --- a/core/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php +++ b/core/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php @@ -48,7 +48,8 @@ public function __construct(PHPUnit_Framework_TestSuite $suite, array $groups) foreach ($tests as $test) { if ($test instanceof PHPUnit_Framework_TestCase) { $testGroups = PHPUnit_Util_Test::getGroups( - get_class($test), $test->getName(false) + get_class($test), + $test->getName(false) ); foreach ($groups as $group) { diff --git a/core/vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php b/core/vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php index 0e05af7..d2dd446 100644 --- a/core/vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php +++ b/core/vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php @@ -60,7 +60,8 @@ public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1, $pro $this->timesRepeat = $timesRepeat; } else { throw PHPUnit_Util_InvalidArgumentHelper::factory( - 2, 'positive integer' + 2, + 'positive integer' ); } diff --git a/core/vendor/phpunit/phpunit/src/Framework/Assert.php b/core/vendor/phpunit/phpunit/src/Framework/Assert.php index 9543893..54cdd53 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/Assert.php +++ b/core/vendor/phpunit/phpunit/src/Framework/Assert.php @@ -68,13 +68,15 @@ public static function assertArraySubset($subset, $array, $strict = false, $mess { if (!is_array($subset)) { throw PHPUnit_Util_InvalidArgumentHelper::factory( - 1, 'array or ArrayAccess' + 1, + 'array or ArrayAccess' ); } if (!is_array($array)) { throw PHPUnit_Util_InvalidArgumentHelper::factory( - 2, 'array or ArrayAccess' + 2, + 'array or ArrayAccess' ); } @@ -985,8 +987,8 @@ public static function assertClassHasAttribute($attributeName, $className, $mess throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name'); } - if (!is_string($className) || !class_exists($className, false)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name'); + if (!is_string($className) || !class_exists($className)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name', $className); } $constraint = new PHPUnit_Framework_Constraint_ClassHasAttribute( @@ -1014,8 +1016,8 @@ public static function assertClassNotHasAttribute($attributeName, $className, $m throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name'); } - if (!is_string($className) || !class_exists($className, false)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name'); + if (!is_string($className) || !class_exists($className)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name', $className); } $constraint = new PHPUnit_Framework_Constraint_Not( @@ -1043,8 +1045,8 @@ public static function assertClassHasStaticAttribute($attributeName, $className, throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name'); } - if (!is_string($className) || !class_exists($className, false)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name'); + if (!is_string($className) || !class_exists($className)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name', $className); } $constraint = new PHPUnit_Framework_Constraint_ClassHasStaticAttribute( @@ -1072,8 +1074,8 @@ public static function assertClassNotHasStaticAttribute($attributeName, $classNa throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name'); } - if (!is_string($className) || !class_exists($className, false)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name'); + if (!is_string($className) || !class_exists($className)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'class name', $className); } $constraint = new PHPUnit_Framework_Constraint_Not( diff --git a/core/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php b/core/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php index f520c8e..cdd0602 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php +++ b/core/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php @@ -47,7 +47,7 @@ protected function matches($other) $match = PHPUnit_Util_Regex::pregMatchSafe($this->expectedMessageRegExp, $other->getMessage()); if (false === $match) { - throw new PHPUnit_Framework_Exception ( + throw new PHPUnit_Framework_Exception( "Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'" ); } diff --git a/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php b/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php index 185b211..ecc9b96 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php +++ b/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php @@ -112,7 +112,14 @@ public function __construct($value, $delta = 0.0, $maxDepth = 10, $canonicalize */ public function evaluate($other, $description = '', $returnResult = false) { - $comparatorFactory = new SebastianBergmann\Comparator\Factory; + // If $this->value and $other are identical, they are also equal. + // This is the most common path and will allow us to skip + // initialization of all the comparators. + if ($this->value === $other) { + return true; + } + + $comparatorFactory = SebastianBergmann\Comparator\Factory::getInstance(); try { $comparator = $comparatorFactory->getComparatorFor( diff --git a/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php b/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php index 3355f9c..6f682c5 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php +++ b/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php @@ -129,7 +129,7 @@ protected function matches($other) } case 'resource': { - return is_resource($other); + return is_resource($other) || is_string(@get_resource_type($other)); } case 'scalar': { diff --git a/core/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php b/core/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php index 6ac5156..4228381 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php +++ b/core/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php @@ -63,8 +63,8 @@ protected function additionalFailureDescription($other) } } - $this->string = join("\n", $from); - $other = join("\n", $to); + $this->string = implode("\n", $from); + $other = implode("\n", $to); $differ = new Differ("--- Expected\n+++ Actual\n"); diff --git a/core/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php b/core/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php index 225acb6..2985316 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php +++ b/core/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php @@ -52,6 +52,8 @@ class PHPUnit_Framework_IncompleteTestCase extends PHPUnit_Framework_TestCase protected $useOutputBuffering = false; /** + * @param string $className + * @param string $methodName * @param string $message */ public function __construct($className, $methodName, $message = '') diff --git a/core/vendor/phpunit/phpunit/src/Framework/TestCase.php b/core/vendor/phpunit/phpunit/src/Framework/TestCase.php index dcec654..75c3d12 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/TestCase.php +++ b/core/vendor/phpunit/phpunit/src/Framework/TestCase.php @@ -11,8 +11,10 @@ use SebastianBergmann\GlobalState\Snapshot; use SebastianBergmann\GlobalState\Restorer; use SebastianBergmann\GlobalState\Blacklist; -use SebastianBergmann\Exporter\Context; +use SebastianBergmann\Diff\Differ; use SebastianBergmann\Exporter\Exporter; +use Prophecy\Exception\Prediction\PredictionException; +use Prophecy\Prophet; /** * A TestCase defines the fixture to run multiple tests. @@ -259,6 +261,16 @@ private $snapshot; /** + * @var Prophecy\Prophet + */ + private $prophet; + + /** + * @var boolean + */ + private $disallowChangesToGlobalState = false; + + /** * Constructs a test case with the given name. * * @param string $name @@ -740,6 +752,9 @@ public function runBare() $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED; $this->statusMessage = $e->getMessage(); } catch (PHPUnit_Framework_AssertionFailedError $e) { + $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE; + $this->statusMessage = $e->getMessage(); + } catch (PredictionException $e) { $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE; $this->statusMessage = $e->getMessage(); } catch (Exception $e) { @@ -749,6 +764,7 @@ public function runBare() // Clean up the mock objects. $this->mockObjects = array(); + $this->prophet = null; // Tear down the fixture. An exception raised in tearDown() will be // caught and passed on when no exception was raised before. @@ -813,6 +829,10 @@ public function runBare() // Workaround for missing "finally". if (isset($e)) { + if ($e instanceof PredictionException) { + $e = new PHPUnit_Framework_AssertionFailedError($e->getMessage()); + } + $this->onNotSuccessfulTest($e); } } @@ -931,6 +951,26 @@ protected function verifyMockObjects() $mockObject->__phpunit_verify(); } + + if ($this->prophet !== null) { + try { + $this->prophet->checkPredictions(); + } catch (Exception $e) { + /** Intentionally left empty */ + } + + foreach ($this->prophet->getProphecies() as $objectProphecy) { + foreach ($objectProphecy->getMethodProphecies() as $methodProphecies) { + foreach ($methodProphecies as $methodProphecy) { + $this->numAssertions += count($methodProphecy->getCheckedPredictions()); + } + } + } + + if (isset($e)) { + throw $e; + } + } } /** @@ -977,6 +1017,15 @@ public function setDependencyInput(array $dependencyInput) } /** + * @param boolean $disallowChangesToGlobalState + * @since Method available since Release 4.6.0 + */ + public function setDisallowChangesToGlobalState($disallowChangesToGlobalState) + { + $this->disallowChangesToGlobalState = $disallowChangesToGlobalState; + } + + /** * Calling this method in setUp() has no effect! * * @param boolean $backupGlobals @@ -1175,7 +1224,7 @@ protected function setLocale() $this->locale[$category] = setlocale($category, null); - $result = call_user_func_array( 'setlocale', $args ); + $result = call_user_func_array('setlocale', $args); if ($result === false) { throw new PHPUnit_Framework_Exception( @@ -1405,6 +1454,17 @@ protected function getObjectForTrait($traitName, array $arguments = array(), $tr } /** + * @param string|null $classOrInterface + * @return \Prophecy\Prophecy\ObjectProphecy + * @throws \LogicException + * @since Method available since Release 4.5.0 + */ + protected function prophesize($classOrInterface = null) + { + return $this->getProphet()->prophesize($classOrInterface); + } + + /** * Adds a value to the assertion counter. * * @param integer $count @@ -1618,45 +1678,6 @@ public static function onConsecutiveCalls() } /** - * @param mixed $data The data to export as a string - * @param SebastianBergmann\Exporter\Context $processed Contains all objects and arrays that have previously been processed - * @return string - * @since Method available since Release 3.2.1 - */ - protected function dataToString(&$data, $processed = null) - { - $result = array(); - $exporter = new Exporter(); - - if (!$processed) { - $processed = new Context(); - } - - $processed->add($data); - - foreach ($data as $key => $value) { - if (is_array($value)) { - if ($processed->contains($data[$key]) !== false) { - $result[] = '*RECURSION*'; - } - - else { - $result[] = sprintf( - 'array(%s)', - $this->dataToString($data[$key], $processed) - ); - } - } - - else { - $result[] = $exporter->shortenedExport($value); - } - } - - return join(', ', $result); - } - - /** * Gets the data set description of a TestCase. * * @param boolean $includeData @@ -1674,8 +1695,10 @@ protected function getDataSetAsString($includeData = true) $buffer .= sprintf(' with data set "%s"', $this->dataName); } + $exporter = new Exporter; + if ($includeData) { - $buffer .= sprintf(' (%s)', $this->dataToString($this->data)); + $buffer .= sprintf(' (%s)', $exporter->shortenedRecursiveExport($this->data)); } } @@ -1900,52 +1923,14 @@ private function stopOutputBuffering() private function snapshotGlobalState() { - if ($this->runTestInSeparateProcess || $this->inIsolation) { - return; - } - $backupGlobals = $this->backupGlobals === null || $this->backupGlobals === true; - if ($backupGlobals || $this->backupStaticAttributes) { - $blacklist = new Blacklist; - - if ($backupGlobals) { - foreach ($this->backupGlobalsBlacklist as $globalVariable) { - $blacklist->addGlobalVariable($globalVariable); - } - } - - if ($this->backupStaticAttributes && !defined('PHPUNIT_TESTSUITE')) { - $blacklist->addClassNamePrefix('PHPUnit'); - $blacklist->addClassNamePrefix('File_Iterator'); - $blacklist->addClassNamePrefix('PHP_CodeCoverage'); - $blacklist->addClassNamePrefix('PHP_Invoker'); - $blacklist->addClassNamePrefix('PHP_Timer'); - $blacklist->addClassNamePrefix('PHP_Token'); - $blacklist->addClassNamePrefix('Symfony'); - $blacklist->addClassNamePrefix('Text_Template'); - $blacklist->addClassNamePrefix('Doctrine\Instantiator'); - - foreach ($this->backupStaticAttributesBlacklist as $class => $attributes) { - foreach ($attributes as $attribute) { - $blacklist->addStaticAttribute($class, $attribute); - } - } - } - - $this->snapshot = new Snapshot( - $blacklist, - $backupGlobals, - $this->backupStaticAttributes, - false, - false, - false, - false, - false, - false, - false - ); + if ($this->runTestInSeparateProcess || $this->inIsolation || + (!$backupGlobals && !$this->backupStaticAttributes)) { + return; } + + $this->snapshot = $this->createGlobalStateSnapshot($backupGlobals); } private function restoreGlobalState() @@ -1954,9 +1939,18 @@ private function restoreGlobalState() return; } + $backupGlobals = $this->backupGlobals === null || $this->backupGlobals === true; + + if ($this->disallowChangesToGlobalState) { + $this->compareGlobalStateSnapshots( + $this->snapshot, + $this->createGlobalStateSnapshot($backupGlobals) + ); + } + $restorer = new Restorer; - if ($this->backupGlobals === null || $this->backupGlobals === true) { + if ($backupGlobals) { $restorer->restoreGlobalVariables($this->snapshot); } @@ -1966,4 +1960,116 @@ private function restoreGlobalState() $this->snapshot = null; } + + /** + * @param boolean $backupGlobals + * @return Snapshot + */ + private function createGlobalStateSnapshot($backupGlobals) + { + $blacklist = new Blacklist; + + foreach ($this->backupGlobalsBlacklist as $globalVariable) { + $blacklist->addGlobalVariable($globalVariable); + } + + if (!defined('PHPUNIT_TESTSUITE')) { + $blacklist->addClassNamePrefix('PHPUnit'); + $blacklist->addClassNamePrefix('File_Iterator'); + $blacklist->addClassNamePrefix('PHP_CodeCoverage'); + $blacklist->addClassNamePrefix('PHP_Invoker'); + $blacklist->addClassNamePrefix('PHP_Timer'); + $blacklist->addClassNamePrefix('PHP_Token'); + $blacklist->addClassNamePrefix('Symfony'); + $blacklist->addClassNamePrefix('Text_Template'); + $blacklist->addClassNamePrefix('Doctrine\Instantiator'); + + foreach ($this->backupStaticAttributesBlacklist as $class => $attributes) { + foreach ($attributes as $attribute) { + $blacklist->addStaticAttribute($class, $attribute); + } + } + } + + return new Snapshot( + $blacklist, + $backupGlobals, + $this->backupStaticAttributes, + false, + false, + false, + false, + false, + false, + false + ); + } + + /** + * @param Snapshot $before + * @param Snapshot $after + * @throws PHPUnit_Framework_RiskyTestError + */ + private function compareGlobalStateSnapshots(Snapshot $before, Snapshot $after) + { + $backupGlobals = $this->backupGlobals === null || $this->backupGlobals === true; + + if ($backupGlobals) { + $this->compareGlobalStateSnapshotPart( + $before->globalVariables(), + $after->globalVariables(), + "--- Global variables before the test\n+++ Global variables after the test\n" + ); + + $this->compareGlobalStateSnapshotPart( + $before->superGlobalVariables(), + $after->superGlobalVariables(), + "--- Super-global variables before the test\n+++ Super-global variables after the test\n" + ); + } + + if ($this->backupStaticAttributes) { + $this->compareGlobalStateSnapshotPart( + $before->staticAttributes(), + $after->staticAttributes(), + "--- Static attributes before the test\n+++ Static attributes after the test\n" + ); + } + } + + /** + * @param array $before + * @param array $after + * @param string $header + * @throws PHPUnit_Framework_RiskyTestError + */ + private function compareGlobalStateSnapshotPart(array $before, array $after, $header) + { + if ($before != $after) { + $differ = new Differ($header); + $exporter = new Exporter; + + $diff = $differ->diff( + $exporter->export($before), + $exporter->export($after) + ); + + throw new PHPUnit_Framework_RiskyTestError( + $diff + ); + } + } + + /** + * @return Prophecy\Prophet + * @since Method available since Release 4.5.0 + */ + private function getProphet() + { + if ($this->prophet === null) { + $this->prophet = new Prophet; + } + + return $this->prophet; + } } diff --git a/core/vendor/phpunit/phpunit/src/Framework/TestSuite.php b/core/vendor/phpunit/phpunit/src/Framework/TestSuite.php index 1588a2c..0998316 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/TestSuite.php +++ b/core/vendor/phpunit/phpunit/src/Framework/TestSuite.php @@ -63,6 +63,11 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra /** * @var boolean */ + private $disallowChangesToGlobalState = null; + + /** + * @var boolean + */ protected $runTestInSeparateProcess = false; /** @@ -708,6 +713,7 @@ class_exists($this->name, false) && if ($test instanceof PHPUnit_Framework_TestCase || $test instanceof PHPUnit_Framework_TestSuite) { + $test->setDisallowChangesToGlobalState($this->disallowChangesToGlobalState); $test->setBackupGlobals($this->backupGlobals); $test->setBackupStaticAttributes($this->backupStaticAttributes); $test->setRunTestInSeparateProcess($this->runTestInSeparateProcess); @@ -906,6 +912,17 @@ protected static function incompleteTest($class, $methodName, $message) } /** + * @param boolean $disallowChangesToGlobalState + * @since Method available since Release 4.6.0 + */ + public function setDisallowChangesToGlobalState($disallowChangesToGlobalState) + { + if (is_null($this->disallowChangesToGlobalState) && is_bool($disallowChangesToGlobalState)) { + $this->disallowChangesToGlobalState = $disallowChangesToGlobalState; + } + } + + /** * @param boolean $backupGlobals * @since Method available since Release 3.3.0 */ diff --git a/core/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php b/core/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php index 47c636e..5fa766e 100644 --- a/core/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php +++ b/core/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php @@ -55,7 +55,8 @@ public function getTest($suiteClassName, $suiteClassFile = '', $suffixes = '') !is_file($suiteClassName . '.php') && empty($suiteClassFile)) { $facade = new File_Iterator_Facade; $files = $facade->getFilesAsArray( - $suiteClassName, $suffixes + $suiteClassName, + $suffixes ); $suite = new PHPUnit_Framework_TestSuite($suiteClassName); @@ -66,12 +67,13 @@ public function getTest($suiteClassName, $suiteClassFile = '', $suffixes = '') try { $testClass = $this->loadSuiteClass( - $suiteClassName, $suiteClassFile + $suiteClassName, + $suiteClassFile ); } catch (PHPUnit_Framework_Exception $e) { $this->runFailed($e->getMessage()); - return null; + return; } try { @@ -82,7 +84,7 @@ public function getTest($suiteClassName, $suiteClassFile = '', $suffixes = '') 'suite() method must be static.' ); - return null; + return; } try { @@ -95,7 +97,7 @@ public function getTest($suiteClassName, $suiteClassFile = '', $suffixes = '') ) ); - return null; + return; } } catch (ReflectionException $e) { try { diff --git a/core/vendor/phpunit/phpunit/src/Runner/Filter/Group.php b/core/vendor/phpunit/phpunit/src/Runner/Filter/Group.php index 422c2ca..02fc291 100644 --- a/core/vendor/phpunit/phpunit/src/Runner/Filter/Group.php +++ b/core/vendor/phpunit/phpunit/src/Runner/Filter/Group.php @@ -36,7 +36,8 @@ public function __construct(RecursiveIterator $iterator, array $groups, PHPUnit_ foreach ($suite->getGroupDetails() as $group => $tests) { if (in_array($group, $groups)) { $testHashes = array_map( - function ($test) { return spl_object_hash($test); + function ($test) { + return spl_object_hash($test); }, $tests ); diff --git a/core/vendor/phpunit/phpunit/src/Runner/Filter/Test.php b/core/vendor/phpunit/phpunit/src/Runner/Filter/Test.php index d9f5ee5..2701f21 100644 --- a/core/vendor/phpunit/phpunit/src/Runner/Filter/Test.php +++ b/core/vendor/phpunit/phpunit/src/Runner/Filter/Test.php @@ -82,7 +82,9 @@ protected function setFilter($filter) // Escape delimiters in regular expression. Do NOT use preg_quote, // to keep magic characters. $filter = sprintf('/%s/', str_replace( - '/', '\\/', $filter + '/', + '\\/', + $filter )); } @@ -103,7 +105,7 @@ public function accept() $tmp = PHPUnit_Util_Test::describe($test, false); if ($tmp[0] != '') { - $name = join('::', $tmp); + $name = implode('::', $tmp); } else { $name = $tmp[1]; } diff --git a/core/vendor/phpunit/phpunit/src/Runner/Version.php b/core/vendor/phpunit/phpunit/src/Runner/Version.php index 1680c15..c6ce34d 100644 --- a/core/vendor/phpunit/phpunit/src/Runner/Version.php +++ b/core/vendor/phpunit/phpunit/src/Runner/Version.php @@ -36,7 +36,7 @@ public static function id() } if (self::$version === null) { - $version = new SebastianBergmann\Version('4.4.2', dirname(dirname(__DIR__))); + $version = new SebastianBergmann\Version('4.6.1', dirname(dirname(__DIR__))); self::$version = $version->getVersion(); } @@ -48,7 +48,7 @@ public static function id() */ public static function getVersionString() { - return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann.'; + return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.'; } /** diff --git a/core/vendor/phpunit/phpunit/src/TextUI/Command.php b/core/vendor/phpunit/phpunit/src/TextUI/Command.php index d69b925..d453342 100644 --- a/core/vendor/phpunit/phpunit/src/TextUI/Command.php +++ b/core/vendor/phpunit/phpunit/src/TextUI/Command.php @@ -40,8 +40,9 @@ class PHPUnit_TextUI_Command * @var array */ protected $longOptions = array( - 'colors' => null, + 'colors==' => null, 'bootstrap=' => null, + 'columns=' => null, 'configuration=' => null, 'coverage-clover=' => null, 'coverage-crap4j=' => null, @@ -74,6 +75,7 @@ class PHPUnit_TextUI_Command 'disallow-test-output' => null, 'enforce-time-limit' => null, 'disallow-todo-tests' => null, + 'strict-global-state' => null, 'strict' => null, 'tap' => null, 'testdox' => null, @@ -244,7 +246,7 @@ protected function handleArguments(array $argv) foreach ($this->options[0] as $option) { switch ($option[0]) { case '--colors': { - $this->arguments['colors'] = true; + $this->arguments['colors'] = $option[1] ?: PHPUnit_TextUI_ResultPrinter::COLOR_AUTO; } break; @@ -253,6 +255,15 @@ protected function handleArguments(array $argv) } break; + case '--columns': { + if (is_numeric($option[1])) { + $this->arguments['columns'] = (int) $option[1]; + } elseif ($option[1] == 'max') { + $this->arguments['columns'] = 'max'; + } + } + break; + case 'c': case '--configuration': { $this->arguments['configuration'] = $option[1]; @@ -481,6 +492,11 @@ protected function handleArguments(array $argv) } break; + case '--strict-global-state': { + $this->arguments['disallowChangesToGlobalState'] = true; + } + break; + case '--disallow-test-output': { $this->arguments['disallowTestOutput'] = true; } @@ -502,6 +518,7 @@ protected function handleArguments(array $argv) $this->arguments['disallowTestOutput'] = true; $this->arguments['enforceTimeLimit'] = true; $this->arguments['disallowTodoAnnotatedTests'] = true; + $this->arguments['deprecatedStrictModeOption'] = true; } break; @@ -893,16 +910,18 @@ protected function showHelp() --report-useless-tests Be strict about tests that do not test anything. --strict-coverage Be strict about unintentionally covered code. + --strict-global-state Be strict about changes to global state --disallow-test-output Be strict about output during tests. --enforce-time-limit Enforce time limit based on test size. --disallow-todo-tests Disallow @todo-annotated tests. - --strict Run tests in strict mode (enables all of the above). --process-isolation Run each test in a separate PHP process. --no-globals-backup Do not backup and restore \$GLOBALS for each test. --static-backup Backup and restore static attributes for each test. - --colors Use colors in output. + --colors= Use colors in output ("never", "auto" or "always"). + --columns Number of columns to use for progress output. + --columns max Use maximum number of columns for progress output. --stderr Write to STDERR instead of STDOUT. --stop-on-error Stop execution upon first error. --stop-on-failure Stop execution upon first error or failure. diff --git a/core/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php b/core/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php index 2cf5300..93a7c11 100644 --- a/core/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php +++ b/core/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php @@ -28,6 +28,11 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn const EVENT_TESTSUITE_START = 2; const EVENT_TESTSUITE_END = 3; + const COLOR_NEVER = 'never'; + const COLOR_AUTO = 'auto'; + const COLOR_ALWAYS = 'always'; + const COLOR_DEFAULT = self::COLOR_NEVER; + /** * @var array */ @@ -94,37 +99,61 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn protected $verbose = false; /** + * @var integer + */ + private $numberOfColumns; + + /** * Constructor. * * @param mixed $out * @param boolean $verbose - * @param boolean $colors + * @param string $colors * @param boolean $debug + * @param integer|string $numberOfColumns * @throws PHPUnit_Framework_Exception * @since Method available since Release 3.0.0 */ - public function __construct($out = null, $verbose = false, $colors = false, $debug = false) + public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80) { parent::__construct($out); - if (is_bool($verbose)) { - $this->verbose = $verbose; - } else { + if (!is_bool($verbose)) { throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'boolean'); } - if (is_bool($colors)) { - $console = new Console; + $availableColors = array(self::COLOR_NEVER, self::COLOR_AUTO, self::COLOR_ALWAYS); + if (!in_array($colors, $availableColors)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory( + 3, + vsprintf('value from "%s", "%s" or "%s"', $availableColors) + ); + } - $this->colors = $colors && $console->hasColorSupport(); - } else { - throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'boolean'); + if (!is_bool($debug)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(4, 'boolean'); + } + + if (!is_int($numberOfColumns) && $numberOfColumns != 'max') { + throw PHPUnit_Util_InvalidArgumentHelper::factory(5, 'integer or "max"'); } - if (is_bool($debug)) { - $this->debug = $debug; + $console = new Console; + + $maxNumberOfColumns = $console->getNumberOfColumns(); + + if ($numberOfColumns == 'max' || $numberOfColumns > $maxNumberOfColumns) { + $numberOfColumns = $maxNumberOfColumns; + } + + $this->numberOfColumns = $numberOfColumns; + $this->verbose = $verbose; + $this->debug = $debug; + + if ($colors === self::COLOR_AUTO && $console->hasColorSupport()) { + $this->colors = true; } else { - throw PHPUnit_Util_InvalidArgumentHelper::factory(4, 'boolean'); + $this->colors = (self::COLOR_ALWAYS === $colors); } } @@ -325,13 +354,16 @@ protected function printFooter(PHPUnit_Framework_TestResult $result) count($result), $this->numAssertions, $this->getCountString( - $result->notImplementedCount(), 'Incomplete' + $result->notImplementedCount(), + 'Incomplete' ), $this->getCountString( - $result->skippedCount(), 'Skipped' + $result->skippedCount(), + 'Skipped' ), $this->getCountString( - $result->riskyCount(), 'Risky' + $result->riskyCount(), + 'Risky' ) ) ); @@ -346,7 +378,8 @@ protected function printFooter(PHPUnit_Framework_TestResult $result) $this->getCountString($result->failureCount(), 'Failures'), $this->getCountString($result->errorCount(), 'Errors'), $this->getCountString( - $result->notImplementedCount(), 'Incomplete' + $result->notImplementedCount(), + 'Incomplete' ), $this->getCountString($result->skippedCount(), 'Skipped') ) @@ -460,7 +493,7 @@ public function startTestSuite(PHPUnit_Framework_TestSuite $suite) if ($this->numTests == -1) { $this->numTests = count($suite); $this->numTestsWidth = strlen((string) $this->numTests); - $this->maxColumn = 69 - (2 * $this->numTestsWidth); + $this->maxColumn = $this->numberOfColumns - strlen(' / (XXX%)') - (2 * $this->numTestsWidth); } } @@ -484,7 +517,8 @@ public function startTest(PHPUnit_Framework_Test $test) if ($this->debug) { $this->write( sprintf( - "\nStarting test '%s'.\n", PHPUnit_Util_Test::describe($test) + "\nStarting test '%s'.\n", + PHPUnit_Util_Test::describe($test) ) ); } diff --git a/core/vendor/phpunit/phpunit/src/TextUI/TestRunner.php b/core/vendor/phpunit/phpunit/src/TextUI/TestRunner.php index 5ad6b67..35bfd13 100644 --- a/core/vendor/phpunit/phpunit/src/TextUI/TestRunner.php +++ b/core/vendor/phpunit/phpunit/src/TextUI/TestRunner.php @@ -166,6 +166,10 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array()) $suite->setBackupStaticAttributes(true); } + if ($arguments['disallowChangesToGlobalState'] === true) { + $suite->setDisallowChangesToGlobalState(true); + } + if (is_integer($arguments['repeat'])) { $test = new PHPUnit_Extensions_RepeatedTest( $suite, @@ -217,6 +221,7 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array()) $this->printer = $arguments['printer']; } else { $printerClass = 'PHPUnit_TextUI_ResultPrinter'; + if (isset($arguments['printer']) && is_string($arguments['printer']) && class_exists($arguments['printer'], false)) { @@ -231,7 +236,8 @@ class_exists($arguments['printer'], false)) { isset($arguments['stderr']) ? 'php://stderr' : null, $arguments['verbose'], $arguments['colors'], - $arguments['debug'] + $arguments['debug'], + $arguments['columns'] ); } } @@ -251,6 +257,14 @@ class_exists($arguments['printer'], false)) { ) ); } + + if (isset($arguments['deprecatedStrictModeOption'])) { + print "Deprecated option \"--strict\" used\n\n"; + } + + if (isset($arguments['deprecatedStrictModeSetting'])) { + print "Deprecated configuration setting \"strict\" used\n\n"; + } } foreach ($arguments['listeners'] as $listener) { @@ -304,11 +318,13 @@ class_exists($arguments['printer'], false)) { if ($codeCoverageReports > 0 && (!extension_loaded('tokenizer') || !$this->canCollectCodeCoverage)) { if (!extension_loaded('tokenizer')) { $this->showExtensionNotLoadedMessage( - 'tokenizer', 'No code coverage will be generated.' + 'tokenizer', + 'No code coverage will be generated.' ); } elseif (!extension_loaded('Xdebug')) { $this->showExtensionNotLoadedMessage( - 'Xdebug', 'No code coverage will be generated.' + 'Xdebug', + 'No code coverage will be generated.' ); } @@ -317,7 +333,8 @@ class_exists($arguments['printer'], false)) { if ($codeCoverageReports > 0) { $codeCoverage = new PHP_CodeCoverage( - null, $this->codeCoverageFilter + null, + $this->codeCoverageFilter ); $codeCoverage->setAddUncoveredFilesFromWhitelist( @@ -368,7 +385,8 @@ class_exists($arguments['printer'], false)) { if (isset($arguments['junitLogfile'])) { $result->addListener( new PHPUnit_Util_Log_JUnit( - $arguments['junitLogfile'], $arguments['logIncompleteSkipped'] + $arguments['junitLogfile'], + $arguments['logIncompleteSkipped'] ) ); } @@ -454,7 +472,7 @@ class_exists($arguments['printer'], false)) { if (isset($arguments['coverageText'])) { if ($arguments['coverageText'] == 'php://stdout') { $outputStream = $this->printer; - $colors = (bool) $arguments['colors']; + $colors = $arguments['colors']; } else { $outputStream = new PHPUnit_Util_Printer($arguments['coverageText']); $colors = false; @@ -562,6 +580,10 @@ protected function handleConfiguration(array &$arguments) $phpunitConfiguration = $arguments['configuration']->getPHPUnitConfiguration(); + if (isset($phpunitConfiguration['deprecatedStrictModeSetting'])) { + $arguments['deprecatedStrictModeSetting'] = true; + } + if (isset($phpunitConfiguration['backupGlobals']) && !isset($arguments['backupGlobals'])) { $arguments['backupGlobals'] = $phpunitConfiguration['backupGlobals']; @@ -572,6 +594,11 @@ protected function handleConfiguration(array &$arguments) $arguments['backupStaticAttributes'] = $phpunitConfiguration['backupStaticAttributes']; } + if (isset($phpunitConfiguration['disallowChangesToGlobalState']) && + !isset($arguments['disallowChangesToGlobalState'])) { + $arguments['disallowChangesToGlobalState'] = $phpunitConfiguration['disallowChangesToGlobalState']; + } + if (isset($phpunitConfiguration['bootstrap']) && !isset($arguments['bootstrap'])) { $arguments['bootstrap'] = $phpunitConfiguration['bootstrap']; @@ -767,7 +794,8 @@ protected function handleConfiguration(array &$arguments) if (isset($loggingConfiguration['plain'])) { $arguments['listeners'][] = new PHPUnit_TextUI_ResultPrinter( - $loggingConfiguration['plain'], true + $loggingConfiguration['plain'], + true ); } @@ -821,7 +849,10 @@ protected function handleConfiguration(array &$arguments) foreach ($filterConfiguration['blacklist']['include']['directory'] as $dir) { $this->codeCoverageFilter->addDirectoryToBlacklist( - $dir['path'], $dir['suffix'], $dir['prefix'], $dir['group'] + $dir['path'], + $dir['suffix'], + $dir['prefix'], + $dir['group'] ); } @@ -831,7 +862,10 @@ protected function handleConfiguration(array &$arguments) foreach ($filterConfiguration['blacklist']['exclude']['directory'] as $dir) { $this->codeCoverageFilter->removeDirectoryFromBlacklist( - $dir['path'], $dir['suffix'], $dir['prefix'], $dir['group'] + $dir['path'], + $dir['suffix'], + $dir['prefix'], + $dir['group'] ); } @@ -842,7 +876,9 @@ protected function handleConfiguration(array &$arguments) foreach ($filterConfiguration['whitelist']['include']['directory'] as $dir) { $this->codeCoverageFilter->addDirectoryToWhitelist( - $dir['path'], $dir['suffix'], $dir['prefix'] + $dir['path'], + $dir['suffix'], + $dir['prefix'] ); } @@ -852,7 +888,9 @@ protected function handleConfiguration(array &$arguments) foreach ($filterConfiguration['whitelist']['exclude']['directory'] as $dir) { $this->codeCoverageFilter->removeDirectoryFromWhitelist( - $dir['path'], $dir['suffix'], $dir['prefix'] + $dir['path'], + $dir['suffix'], + $dir['prefix'] ); } @@ -866,8 +904,10 @@ protected function handleConfiguration(array &$arguments) $arguments['processUncoveredFilesFromWhitelist'] = isset($arguments['processUncoveredFilesFromWhitelist']) ? $arguments['processUncoveredFilesFromWhitelist'] : false; $arguments['backupGlobals'] = isset($arguments['backupGlobals']) ? $arguments['backupGlobals'] : null; $arguments['backupStaticAttributes'] = isset($arguments['backupStaticAttributes']) ? $arguments['backupStaticAttributes'] : null; + $arguments['disallowChangesToGlobalState'] = isset($arguments['disallowChangesToGlobalState']) ? $arguments['disallowChangesToGlobalState'] : null; $arguments['cacheTokens'] = isset($arguments['cacheTokens']) ? $arguments['cacheTokens'] : false; - $arguments['colors'] = isset($arguments['colors']) ? $arguments['colors'] : false; + $arguments['columns'] = isset($arguments['columns']) ? $arguments['columns'] : 80; + $arguments['colors'] = isset($arguments['colors']) ? $arguments['colors'] : PHPUnit_TextUI_ResultPrinter::COLOR_DEFAULT; $arguments['convertErrorsToExceptions'] = isset($arguments['convertErrorsToExceptions']) ? $arguments['convertErrorsToExceptions'] : true; $arguments['convertNoticesToExceptions'] = isset($arguments['convertNoticesToExceptions']) ? $arguments['convertNoticesToExceptions'] : true; $arguments['convertWarningsToExceptions'] = isset($arguments['convertWarningsToExceptions']) ? $arguments['convertWarningsToExceptions'] : true; diff --git a/core/vendor/phpunit/phpunit/src/Util/Blacklist.php b/core/vendor/phpunit/phpunit/src/Util/Blacklist.php index 4aaeed0..fb10e0b 100644 --- a/core/vendor/phpunit/phpunit/src/Util/Blacklist.php +++ b/core/vendor/phpunit/phpunit/src/Util/Blacklist.php @@ -41,6 +41,7 @@ class PHPUnit_Util_Blacklist 'SebastianBergmann\Environment\Runtime' => 1, 'SebastianBergmann\Comparator\Comparator' => 1, 'SebastianBergmann\Exporter\Exporter' => 1, + 'SebastianBergmann\RecursionContext\Context' => 1, 'SebastianBergmann\Version' => 1, 'Composer\Autoload\ClassLoader' => 1, 'Doctrine\Instantiator\Instantiator' => 1 diff --git a/core/vendor/phpunit/phpunit/src/Util/Configuration.php b/core/vendor/phpunit/phpunit/src/Util/Configuration.php index 7af6f6e..fb36fbb 100644 --- a/core/vendor/phpunit/phpunit/src/Util/Configuration.php +++ b/core/vendor/phpunit/phpunit/src/Util/Configuration.php @@ -19,6 +19,7 @@ * backupStaticAttributes="false" * bootstrap="/path/to/bootstrap.php" * cacheTokens="false" + * columns="80" * colors="false" * stderr="false" * convertErrorsToExceptions="true" @@ -42,6 +43,7 @@ * beStrictAboutTestSize="false" * beStrictAboutTodoAnnotatedTests="false" * checkForUnintentionallyCoveredCode="false" + * disallowChangesToGlobalState="false" * verbose="false"> * * @@ -324,7 +326,8 @@ public function getListenerConfiguration() if ($listener->getAttribute('file')) { $file = $this->toAbsolutePath( - (string) $listener->getAttribute('file'), true + (string) $listener->getAttribute('file'), + true ); } @@ -539,14 +542,29 @@ public function getPHPUnitConfiguration() if ($root->hasAttribute('cacheTokens')) { $result['cacheTokens'] = $this->getBoolean( - (string) $root->getAttribute('cacheTokens'), false + (string) $root->getAttribute('cacheTokens'), + false ); } + if ($root->hasAttribute('columns')) { + $columns = (string) $root->getAttribute('columns'); + + if ($columns == 'max') { + $result['columns'] = 'max'; + } else { + $result['columns'] = $this->getInteger($columns, 80); + } + } + if ($root->hasAttribute('colors')) { - $result['colors'] = $this->getBoolean( - (string) $root->getAttribute('colors'), false - ); + /* only allow boolean for compatibility with previous versions + 'always' only allowed from command line */ + if ($this->getBoolean($root->getAttribute('colors'), false)) { + $result['colors'] = PHPUnit_TextUI_ResultPrinter::COLOR_AUTO; + } else { + $result['colors'] = PHPUnit_TextUI_ResultPrinter::COLOR_NEVER; + } } /** @@ -554,19 +572,22 @@ public function getPHPUnitConfiguration() */ if ($root->hasAttribute('stderr')) { $result['stderr'] = $this->getBoolean( - (string)$root->getAttribute('stderr'), false + (string)$root->getAttribute('stderr'), + false ); } if ($root->hasAttribute('backupGlobals')) { $result['backupGlobals'] = $this->getBoolean( - (string) $root->getAttribute('backupGlobals'), true + (string) $root->getAttribute('backupGlobals'), + true ); } if ($root->hasAttribute('backupStaticAttributes')) { $result['backupStaticAttributes'] = $this->getBoolean( - (string) $root->getAttribute('backupStaticAttributes'), false + (string) $root->getAttribute('backupStaticAttributes'), + false ); } @@ -578,25 +599,29 @@ public function getPHPUnitConfiguration() if ($root->hasAttribute('convertErrorsToExceptions')) { $result['convertErrorsToExceptions'] = $this->getBoolean( - (string) $root->getAttribute('convertErrorsToExceptions'), true + (string) $root->getAttribute('convertErrorsToExceptions'), + true ); } if ($root->hasAttribute('convertNoticesToExceptions')) { $result['convertNoticesToExceptions'] = $this->getBoolean( - (string) $root->getAttribute('convertNoticesToExceptions'), true + (string) $root->getAttribute('convertNoticesToExceptions'), + true ); } if ($root->hasAttribute('convertWarningsToExceptions')) { $result['convertWarningsToExceptions'] = $this->getBoolean( - (string) $root->getAttribute('convertWarningsToExceptions'), true + (string) $root->getAttribute('convertWarningsToExceptions'), + true ); } if ($root->hasAttribute('forceCoversAnnotation')) { $result['forceCoversAnnotation'] = $this->getBoolean( - (string) $root->getAttribute('forceCoversAnnotation'), false + (string) $root->getAttribute('forceCoversAnnotation'), + false ); } @@ -609,37 +634,43 @@ public function getPHPUnitConfiguration() if ($root->hasAttribute('processIsolation')) { $result['processIsolation'] = $this->getBoolean( - (string) $root->getAttribute('processIsolation'), false + (string) $root->getAttribute('processIsolation'), + false ); } if ($root->hasAttribute('stopOnError')) { $result['stopOnError'] = $this->getBoolean( - (string) $root->getAttribute('stopOnError'), false + (string) $root->getAttribute('stopOnError'), + false ); } if ($root->hasAttribute('stopOnFailure')) { $result['stopOnFailure'] = $this->getBoolean( - (string) $root->getAttribute('stopOnFailure'), false + (string) $root->getAttribute('stopOnFailure'), + false ); } if ($root->hasAttribute('stopOnIncomplete')) { $result['stopOnIncomplete'] = $this->getBoolean( - (string) $root->getAttribute('stopOnIncomplete'), false + (string) $root->getAttribute('stopOnIncomplete'), + false ); } if ($root->hasAttribute('stopOnRisky')) { $result['stopOnRisky'] = $this->getBoolean( - (string) $root->getAttribute('stopOnRisky'), false + (string) $root->getAttribute('stopOnRisky'), + false ); } if ($root->hasAttribute('stopOnSkipped')) { $result['stopOnSkipped'] = $this->getBoolean( - (string) $root->getAttribute('stopOnSkipped'), false + (string) $root->getAttribute('stopOnSkipped'), + false ); } @@ -669,67 +700,85 @@ public function getPHPUnitConfiguration() if ($root->hasAttribute('timeoutForSmallTests')) { $result['timeoutForSmallTests'] = $this->getInteger( - (string) $root->getAttribute('timeoutForSmallTests'), 1 + (string) $root->getAttribute('timeoutForSmallTests'), + 1 ); } if ($root->hasAttribute('timeoutForMediumTests')) { $result['timeoutForMediumTests'] = $this->getInteger( - (string) $root->getAttribute('timeoutForMediumTests'), 10 + (string) $root->getAttribute('timeoutForMediumTests'), + 10 ); } if ($root->hasAttribute('timeoutForLargeTests')) { $result['timeoutForLargeTests'] = $this->getInteger( - (string) $root->getAttribute('timeoutForLargeTests'), 60 + (string) $root->getAttribute('timeoutForLargeTests'), + 60 ); } if ($root->hasAttribute('beStrictAboutTestsThatDoNotTestAnything')) { $result['reportUselessTests'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutTestsThatDoNotTestAnything'), false + (string) $root->getAttribute('beStrictAboutTestsThatDoNotTestAnything'), + false ); } if ($root->hasAttribute('checkForUnintentionallyCoveredCode')) { $result['strictCoverage'] = $this->getBoolean( - (string) $root->getAttribute('checkForUnintentionallyCoveredCode'), false + (string) $root->getAttribute('checkForUnintentionallyCoveredCode'), + false ); } if ($root->hasAttribute('beStrictAboutOutputDuringTests')) { $result['disallowTestOutput'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutOutputDuringTests'), false + (string) $root->getAttribute('beStrictAboutOutputDuringTests'), + false + ); + } + + if ($root->hasAttribute('beStrictAboutChangesToGlobalState')) { + $result['disallowChangesToGlobalState'] = $this->getBoolean( + (string) $root->getAttribute('beStrictAboutChangesToGlobalState'), + false ); } if ($root->hasAttribute('beStrictAboutTestSize')) { $result['enforceTimeLimit'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutTestSize'), false + (string) $root->getAttribute('beStrictAboutTestSize'), + false ); } if ($root->hasAttribute('beStrictAboutTodoAnnotatedTests')) { $result['disallowTodoAnnotatedTests'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutTodoAnnotatedTests'), false + (string) $root->getAttribute('beStrictAboutTodoAnnotatedTests'), + false ); } if ($root->hasAttribute('strict')) { $flag = $this->getBoolean( - (string) $root->getAttribute('strict'), false + (string) $root->getAttribute('strict'), + false ); - $result['reportUselessTests'] = $flag; - $result['strictCoverage'] = $flag; - $result['disallowTestOutput'] = $flag; - $result['enforceTimeLimit'] = $flag; - $result['disallowTodoAnnotatedTests'] = $flag; + $result['reportUselessTests'] = $flag; + $result['strictCoverage'] = $flag; + $result['disallowTestOutput'] = $flag; + $result['enforceTimeLimit'] = $flag; + $result['disallowTodoAnnotatedTests'] = $flag; + $result['deprecatedStrictModeSetting'] = true; } if ($root->hasAttribute('verbose')) { $result['verbose'] = $this->getBoolean( - (string) $root->getAttribute('verbose'), false + (string) $root->getAttribute('verbose'), + false ); } @@ -758,7 +807,8 @@ public function getSeleniumBrowserConfiguration() if ($config->hasAttribute('port')) { $port = $this->getInteger( - (string) $config->getAttribute('port'), 4444 + (string) $config->getAttribute('port'), + 4444 ); } else { $port = 4444; @@ -766,7 +816,8 @@ public function getSeleniumBrowserConfiguration() if ($config->hasAttribute('timeout')) { $timeout = $this->getInteger( - (string) $config->getAttribute('timeout'), 30000 + (string) $config->getAttribute('timeout'), + 30000 ); } else { $timeout = 30000; diff --git a/core/vendor/phpunit/phpunit/src/Util/Fileloader.php b/core/vendor/phpunit/phpunit/src/Util/Fileloader.php index c41e124..8e4b7cf 100644 --- a/core/vendor/phpunit/phpunit/src/Util/Fileloader.php +++ b/core/vendor/phpunit/phpunit/src/Util/Fileloader.php @@ -59,7 +59,8 @@ public static function load($filename) $newVariables = get_defined_vars(); $newVariableNames = array_diff( - array_keys($newVariables), $oldVariableNames + array_keys($newVariables), + $oldVariableNames ); foreach ($newVariableNames as $variableName) { diff --git a/core/vendor/phpunit/phpunit/src/Util/Filter.php b/core/vendor/phpunit/phpunit/src/Util/Filter.php index 8606e95..4f6ce30 100644 --- a/core/vendor/phpunit/phpunit/src/Util/Filter.php +++ b/core/vendor/phpunit/phpunit/src/Util/Filter.php @@ -62,7 +62,8 @@ public static function getFilteredStacktrace(Exception $e, $asString = true) if (!self::frameExists($eTrace, $eFile, $eLine)) { array_unshift( - $eTrace, array('file' => $eFile, 'line' => $eLine) + $eTrace, + array('file' => $eFile, 'line' => $eLine) ); } diff --git a/core/vendor/phpunit/phpunit/src/Util/Getopt.php b/core/vendor/phpunit/phpunit/src/Util/Getopt.php index 56d62d4..c234e68 100644 --- a/core/vendor/phpunit/phpunit/src/Util/Getopt.php +++ b/core/vendor/phpunit/phpunit/src/Util/Getopt.php @@ -58,11 +58,17 @@ public static function getopt(array $args, $short_options, $long_options = null) break; } elseif (strlen($arg) > 1 && $arg[1] == '-') { self::parseLongOption( - substr($arg, 2), $long_options, $opts, $args + substr($arg, 2), + $long_options, + $opts, + $args ); } else { self::parseShortOption( - substr($arg, 1), $short_options, $opts, $args + substr($arg, 1), + $short_options, + $opts, + $args ); } } diff --git a/core/vendor/phpunit/phpunit/src/Util/GlobalState.php b/core/vendor/phpunit/phpunit/src/Util/GlobalState.php index 10766de..87831f5 100644 --- a/core/vendor/phpunit/phpunit/src/Util/GlobalState.php +++ b/core/vendor/phpunit/phpunit/src/Util/GlobalState.php @@ -159,7 +159,8 @@ protected static function getSuperGlobalArrays() { if (ini_get('register_long_arrays') == '1') { return array_merge( - self::$superGlobalArrays, self::$superGlobalArraysLong + self::$superGlobalArrays, + self::$superGlobalArraysLong ); } else { return self::$superGlobalArrays; diff --git a/core/vendor/phpunit/phpunit/src/Util/Log/JUnit.php b/core/vendor/phpunit/phpunit/src/Util/Log/JUnit.php index d50bcb6..299dc4b 100644 --- a/core/vendor/phpunit/phpunit/src/Util/Log/JUnit.php +++ b/core/vendor/phpunit/phpunit/src/Util/Log/JUnit.php @@ -141,7 +141,8 @@ public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) PHPUnit_Util_Filter::getFilteredStacktrace($e); $error = $this->document->createElement( - 'error', PHPUnit_Util_XML::prepareString($buffer) + 'error', + PHPUnit_Util_XML::prepareString($buffer) ); $error->setAttribute('type', get_class($e)); @@ -174,7 +175,8 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser PHPUnit_Util_Filter::getFilteredStacktrace($e); $failure = $this->document->createElement( - 'failure', PHPUnit_Util_XML::prepareString($buffer) + 'failure', + PHPUnit_Util_XML::prepareString($buffer) ); $failure->setAttribute('type', get_class($e)); @@ -316,23 +318,28 @@ public function startTestSuite(PHPUnit_Framework_TestSuite $suite) public function endTestSuite(PHPUnit_Framework_TestSuite $suite) { $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'tests', $this->testSuiteTests[$this->testSuiteLevel] + 'tests', + $this->testSuiteTests[$this->testSuiteLevel] ); $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'assertions', $this->testSuiteAssertions[$this->testSuiteLevel] + 'assertions', + $this->testSuiteAssertions[$this->testSuiteLevel] ); $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'failures', $this->testSuiteFailures[$this->testSuiteLevel] + 'failures', + $this->testSuiteFailures[$this->testSuiteLevel] ); $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'errors', $this->testSuiteErrors[$this->testSuiteLevel] + 'errors', + $this->testSuiteErrors[$this->testSuiteLevel] ); $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'time', sprintf('%F', $this->testSuiteTimes[$this->testSuiteLevel]) + 'time', + sprintf('%F', $this->testSuiteTimes[$this->testSuiteLevel]) ); if ($this->testSuiteLevel > 1) { @@ -389,12 +396,14 @@ public function endTest(PHPUnit_Framework_Test $test, $time) $this->testSuiteAssertions[$this->testSuiteLevel] += $numAssertions; $this->currentTestCase->setAttribute( - 'assertions', $numAssertions + 'assertions', + $numAssertions ); } $this->currentTestCase->setAttribute( - 'time', sprintf('%F', $time) + 'time', + sprintf('%F', $time) ); $this->testSuites[$this->testSuiteLevel]->appendChild( diff --git a/core/vendor/phpunit/phpunit/src/Util/Log/TAP.php b/core/vendor/phpunit/phpunit/src/Util/Log/TAP.php index d54c187..d59f136 100644 --- a/core/vendor/phpunit/phpunit/src/Util/Log/TAP.php +++ b/core/vendor/phpunit/phpunit/src/Util/Log/TAP.php @@ -74,7 +74,8 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser $this->writeNotOk($test, 'Failure'); $message = explode( - "\n", PHPUnit_Framework_TestFailure::exceptionToString($e) + "\n", + PHPUnit_Framework_TestFailure::exceptionToString($e) ); $diagnostic = array( diff --git a/core/vendor/phpunit/phpunit/src/Util/PHP.php b/core/vendor/phpunit/phpunit/src/Util/PHP.php index 146e154..43c607a 100644 --- a/core/vendor/phpunit/phpunit/src/Util/PHP.php +++ b/core/vendor/phpunit/phpunit/src/Util/PHP.php @@ -49,7 +49,10 @@ public function runTestJob($job, PHPUnit_Framework_Test $test, PHPUnit_Framework $_result = $this->runJob($job); $this->processChildResult( - $test, $result, $_result['stdout'], $_result['stderr'] + $test, + $result, + $_result['stdout'], + $_result['stderr'] ); } @@ -95,7 +98,8 @@ private function processChildResult(PHPUnit_Framework_Test $test, PHPUnit_Framew if (!empty($stderr)) { $result->addError( $test, - new PHPUnit_Framework_Exception(trim($stderr)), $time + new PHPUnit_Framework_Exception(trim($stderr)), + $time ); } else { set_error_handler(function ($errno, $errstr, $errfile, $errline) { @@ -113,7 +117,9 @@ private function processChildResult(PHPUnit_Framework_Test $test, PHPUnit_Framew $childResult = false; $result->addError( - $test, new PHPUnit_Framework_Exception(trim($stdout), 0, $e), $time + $test, + new PHPUnit_Framework_Exception(trim($stdout), 0, $e), + $time ); } @@ -142,23 +148,33 @@ private function processChildResult(PHPUnit_Framework_Test $test, PHPUnit_Framew if (!empty($notImplemented)) { $result->addError( - $test, $this->getException($notImplemented[0]), $time + $test, + $this->getException($notImplemented[0]), + $time ); } elseif (!empty($risky)) { $result->addError( - $test, $this->getException($risky[0]), $time + $test, + $this->getException($risky[0]), + $time ); } elseif (!empty($skipped)) { $result->addError( - $test, $this->getException($skipped[0]), $time + $test, + $this->getException($skipped[0]), + $time ); } elseif (!empty($errors)) { $result->addError( - $test, $this->getException($errors[0]), $time + $test, + $this->getException($errors[0]), + $time ); } elseif (!empty($failures)) { $result->addFailure( - $test, $this->getException($failures[0]), $time + $test, + $this->getException($failures[0]), + $time ); } } diff --git a/core/vendor/phpunit/phpunit/src/Util/Printer.php b/core/vendor/phpunit/phpunit/src/Util/Printer.php index e46003d..5c7af11 100644 --- a/core/vendor/phpunit/phpunit/src/Util/Printer.php +++ b/core/vendor/phpunit/phpunit/src/Util/Printer.php @@ -94,7 +94,9 @@ public function flush() file_put_contents( $this->outTarget, tidy_repair_file( - $this->outTarget, array('indent' => true, 'wrap' => 0), 'utf8' + $this->outTarget, + array('indent' => true, 'wrap' => 0), + 'utf8' ) ); } diff --git a/core/vendor/phpunit/phpunit/src/Util/Test.php b/core/vendor/phpunit/phpunit/src/Util/Test.php index ff449c1..1d51df2 100644 --- a/core/vendor/phpunit/phpunit/src/Util/Test.php +++ b/core/vendor/phpunit/phpunit/src/Util/Test.php @@ -40,10 +40,6 @@ class PHPUnit_Util_Test private static $annotationCache = array(); - private static $templateMethods = array( - 'setUp', 'assertPreConditions', 'assertPostConditions', 'tearDown' - ); - private static $hookMethods = array(); /** @@ -366,7 +362,7 @@ public static function getProvidedData($className, $methodName) $dataProviderMethodName = array_pop($leaf); if (!empty($dataProviderMethodNameNamespace)) { - $dataProviderMethodNameNamespace = join('\\', $dataProviderMethodNameNamespace) . '\\'; + $dataProviderMethodNameNamespace = implode('\\', $dataProviderMethodNameNamespace) . '\\'; } else { $dataProviderMethodNameNamespace = ''; } diff --git a/core/vendor/phpunit/phpunit/src/Util/XML.php b/core/vendor/phpunit/phpunit/src/Util/XML.php index 6ac0b7b..070a28b 100644 --- a/core/vendor/phpunit/phpunit/src/Util/XML.php +++ b/core/vendor/phpunit/phpunit/src/Util/XML.php @@ -404,7 +404,7 @@ public static function convertSelectToTag($selector, $content = true) } if ($classes) { - $tag['class'] = join(' ', $classes); + $tag['class'] = implode(' ', $classes); } if ($attrs) { diff --git a/core/vendor/phpunit/phpunit/tests/Framework/AssertTest.php b/core/vendor/phpunit/phpunit/tests/Framework/AssertTest.php index db7be62..4b0c61e 100644 --- a/core/vendor/phpunit/phpunit/tests/Framework/AssertTest.php +++ b/core/vendor/phpunit/phpunit/tests/Framework/AssertTest.php @@ -717,9 +717,9 @@ protected function notEqualValues() $book4 = new stdClass; $book4->author = 'Terry Pratchett'; - $object1 = new SampleClass( 4, 8, 15); + $object1 = new SampleClass(4, 8, 15); $object2 = new SampleClass(16, 23, 42); - $object3 = new SampleClass( 4, 8, 15); + $object3 = new SampleClass(4, 8, 15); $storage1 = new SplObjectStorage; $storage1->attach($object1); $storage2 = new SplObjectStorage; @@ -3479,10 +3479,10 @@ public function testMarkTestSkipped() */ public function testAssertCount() { - $this->assertCount(2, array(1,2)); + $this->assertCount(2, array(1, 2)); try { - $this->assertCount(2, array(1,2,3)); + $this->assertCount(2, array(1, 2, 3)); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3495,10 +3495,10 @@ public function testAssertCount() */ public function testAssertCountTraversable() { - $this->assertCount(2, new ArrayIterator(array(1,2))); + $this->assertCount(2, new ArrayIterator(array(1, 2))); try { - $this->assertCount(2, new ArrayIterator(array(1,2,3))); + $this->assertCount(2, new ArrayIterator(array(1, 2, 3))); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3527,7 +3527,6 @@ public function testAssertCountThrowsExceptionIfExpectedCountIsNoInteger() */ public function testAssertCountThrowsExceptionIfElementIsNotCountable() { - try { $this->assertCount(2, ''); } catch (PHPUnit_Framework_Exception $e) { @@ -3555,10 +3554,10 @@ public function testAssertAttributeCount() */ public function testAssertNotCount() { - $this->assertNotCount(2, array(1,2,3)); + $this->assertNotCount(2, array(1, 2, 3)); try { - $this->assertNotCount(2, array(1,2)); + $this->assertNotCount(2, array(1, 2)); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3600,10 +3599,10 @@ public function testAssertAttributeNotCount() */ public function testAssertSameSize() { - $this->assertSameSize(array(1,2), array(3,4)); + $this->assertSameSize(array(1, 2), array(3, 4)); try { - $this->assertSameSize(array(1,2), array(1,2,3)); + $this->assertSameSize(array(1, 2), array(1, 2, 3)); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3648,10 +3647,10 @@ public function testAssertSameSizeThrowsExceptionIfActualIsNotCountable() */ public function testAssertNotSameSize() { - $this->assertNotSameSize(array(1,2), array(1,2,3)); + $this->assertNotSameSize(array(1, 2), array(1, 2, 3)); try { - $this->assertNotSameSize(array(1,2), array(3,4)); + $this->assertNotSameSize(array(1, 2), array(3, 4)); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } diff --git a/core/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php b/core/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php index b309318..4202143 100644 --- a/core/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php +++ b/core/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php @@ -25,7 +25,7 @@ class CountTest extends PHPUnit_Framework_TestCase public function testCount() { $countConstraint = new PHPUnit_Framework_Constraint_Count(3); - $this->assertTrue($countConstraint->evaluate(array(1,2,3), '', true)); + $this->assertTrue($countConstraint->evaluate(array(1, 2, 3), '', true)); $countConstraint = new PHPUnit_Framework_Constraint_Count(0); $this->assertTrue($countConstraint->evaluate(array(), '', true)); diff --git a/core/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php b/core/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php index 18364ab..c84ac97 100644 --- a/core/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php +++ b/core/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php @@ -37,9 +37,7 @@ public function testConstraintArrayHasKey() try { $constraint->evaluate(array()); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(array(), 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array(0 => 1)); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array(0), 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('foo'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('foo', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate($file); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate($file, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(0); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(0, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(2); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(2, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(0); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(0, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(1); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(1, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(null); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(0); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate($actual, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( "custom message\n$message", $this->trimnl(PHPUnit_Framework_TestFailure::exceptionToString($e)) @@ -935,9 +897,7 @@ public function testConstraintIsNotEqual() try { $constraint->evaluate(1); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(1, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate($b); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate($b, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate('b', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate($a); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate($a, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate('a', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(new stdClass); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(new stdClass, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(new stdClass); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(new stdClass, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(new stdClass); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertStringMatchesFormat(<<evaluate(new stdClass, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertStringMatchesFormat(<<fail(); } + public function resources() + { + $fh = fopen(__FILE__, 'r'); + fclose($fh); + + return array( + 'open resource' => array(fopen(__FILE__, 'r')), + 'closed resource' => array($fh), + ); + } + + /** + * @dataProvider resources + * @covers PHPUnit_Framework_Constraint_IsType + * @covers PHPUnit_Framework_Assert::isType + */ + public function testConstraintIsResourceTypeEvaluatesCorrectlyWithResources($resource) + { + $constraint = PHPUnit_Framework_Assert::isType('resource'); + + $this->assertTrue($constraint->evaluate($resource, '', true)); + + @fclose($resource); + } + /** * @covers PHPUnit_Framework_Constraint_IsType * @covers PHPUnit_Framework_Constraint_Not @@ -1421,9 +1380,7 @@ public function testConstraintIsNotType() try { $constraint->evaluate(''); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(0); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(0, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(null); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(null, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(1); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(1, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(0); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(0, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(2); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('This fails'); @@ -1846,9 +1783,7 @@ public function testConstraintLessThanOrEqual2() try { $constraint->evaluate(2, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(1); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(1, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('stdClass'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('stdClass', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate('ClassWithNonPublicAttributes'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('ClassWithNonPublicAttributes', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate('stdClass'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('stdClass', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate('ClassWithNonPublicAttributes'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('ClassWithNonPublicAttributes', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(new stdClass); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(new stdClass, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(new ClassWithNonPublicAttributes); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(new ClassWithNonPublicAttributes, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate('barbazbar'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('barbazbar', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate('barfoobar'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('barfoobar', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate('foo'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('foo', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('prefixfoo'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('prefixfoo', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('barbazbar'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('barbazbar', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('barfoobar'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('barfoobar', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('foo'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('foo', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('foosuffix'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate('foosuffix', 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array('bar')); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array('bar'), 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array('foo')); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array('foo'), 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(new SplObjectStorage); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertStringMatchesFormat( <<evaluate(new SplObjectStorage, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertStringMatchesFormat( <<evaluate($object); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate($object, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate($object); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate($object, 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array('foo')); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array('foo'), 'custom message'); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<assertTrue($constraint->evaluate(array(1,2,3,4,5), '', true)); - $this->assertFalse($constraint->evaluate(array(1,2,3,4), '', true)); + $this->assertTrue($constraint->evaluate(array(1, 2, 3, 4, 5), '', true)); + $this->assertFalse($constraint->evaluate(array(1, 2, 3, 4), '', true)); } /** @@ -3417,8 +3268,8 @@ public function testConstraintCountWithAnIteratorWhichDoesNotImplementCountable( { $constraint = new PHPUnit_Framework_Constraint_Count(5); - $this->assertTrue($constraint->evaluate(new TestIterator(array(1,2,3,4,5)), '', true)); - $this->assertFalse($constraint->evaluate(new TestIterator(array(1,2,3,4)), '', true)); + $this->assertTrue($constraint->evaluate(new TestIterator(array(1, 2, 3, 4, 5)), '', true)); + $this->assertFalse($constraint->evaluate(new TestIterator(array(1, 2, 3, 4)), '', true)); } /** @@ -3428,8 +3279,8 @@ public function testConstraintCountWithAnObjectImplementingCountable() { $constraint = new PHPUnit_Framework_Constraint_Count(5); - $this->assertTrue($constraint->evaluate(new ArrayObject(array(1,2,3,4,5)), '', true)); - $this->assertFalse($constraint->evaluate(new ArrayObject(array(1,2,3,4)), '', true)); + $this->assertTrue($constraint->evaluate(new ArrayObject(array(1, 2, 3, 4, 5)), '', true)); + $this->assertFalse($constraint->evaluate(new ArrayObject(array(1, 2, 3, 4)), '', true)); } /** @@ -3441,10 +3292,8 @@ public function testConstraintCountFailing() $constraint = new PHPUnit_Framework_Constraint_Count(5); try { - $constraint->evaluate(array(1,2)); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + $constraint->evaluate(array(1, 2)); + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array(1,2)); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + $constraint->evaluate(array(1, 2)); + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<assertTrue($constraint->evaluate(array(6,7,8,9,10), '', true)); - $this->assertFalse($constraint->evaluate(array(1,2,3,4), '', true)); + $this->assertTrue($constraint->evaluate(array(6, 7, 8, 9, 10), '', true)); + $this->assertFalse($constraint->evaluate(array(1, 2, 3, 4), '', true)); } /** @@ -3508,10 +3355,10 @@ public function testConstraintSameSizeWithAnArray() */ public function testConstraintSameSizeWithAnIteratorWhichDoesNotImplementCountable() { - $constraint = new PHPUnit_Framework_Constraint_SameSize(new TestIterator(array(1,2,3,4,5))); + $constraint = new PHPUnit_Framework_Constraint_SameSize(new TestIterator(array(1, 2, 3, 4, 5))); - $this->assertTrue($constraint->evaluate(new TestIterator(array(6,7,8,9,10)), '', true)); - $this->assertFalse($constraint->evaluate(new TestIterator(array(1,2,3,4)), '', true)); + $this->assertTrue($constraint->evaluate(new TestIterator(array(6, 7, 8, 9, 10)), '', true)); + $this->assertFalse($constraint->evaluate(new TestIterator(array(1, 2, 3, 4)), '', true)); } /** @@ -3519,10 +3366,10 @@ public function testConstraintSameSizeWithAnIteratorWhichDoesNotImplementCountab */ public function testConstraintSameSizeWithAnObjectImplementingCountable() { - $constraint = new PHPUnit_Framework_Constraint_SameSize(new ArrayObject(array(1,2,3,4,5))); + $constraint = new PHPUnit_Framework_Constraint_SameSize(new ArrayObject(array(1, 2, 3, 4, 5))); - $this->assertTrue($constraint->evaluate(new ArrayObject(array(6,7,8,9,10)), '', true)); - $this->assertFalse($constraint->evaluate(new ArrayObject(array(1,2,3,4)), '', true)); + $this->assertTrue($constraint->evaluate(new ArrayObject(array(6, 7, 8, 9, 10)), '', true)); + $this->assertFalse($constraint->evaluate(new ArrayObject(array(1, 2, 3, 4)), '', true)); } /** @@ -3531,13 +3378,11 @@ public function testConstraintSameSizeWithAnObjectImplementingCountable() */ public function testConstraintSameSizeFailing() { - $constraint = new PHPUnit_Framework_Constraint_SameSize(array(1,2,3,4,5)); + $constraint = new PHPUnit_Framework_Constraint_SameSize(array(1, 2, 3, 4, 5)); try { - $constraint->evaluate(array(1,2)); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + $constraint->evaluate(array(1, 2)); + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array(3,4)); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + $constraint->evaluate(array(3, 4)); + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate($exception); - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { + } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<addTestFile($dir.'InheritanceB.php'); $result = $suite->run(); $this->assertEquals(2, count($result)); - } } diff --git a/core/vendor/phpunit/phpunit/tests/Regression/1021.phpt b/core/vendor/phpunit/phpunit/tests/Regression/1021.phpt index 2f31e73..cae0705 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/1021.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/1021.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/Regression/523.phpt b/core/vendor/phpunit/phpunit/tests/Regression/523.phpt index 339570f..6f2dd26 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/523.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/523.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/Regression/578.phpt b/core/vendor/phpunit/phpunit/tests/Regression/578.phpt index 4a4d3e0..4f12821 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/578.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/578.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. EEE diff --git a/core/vendor/phpunit/phpunit/tests/Regression/684.phpt b/core/vendor/phpunit/phpunit/tests/Regression/684.phpt index 139b3f9..e3f8360 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/684.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/684.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. F diff --git a/core/vendor/phpunit/phpunit/tests/Regression/783.phpt b/core/vendor/phpunit/phpunit/tests/Regression/783.phpt index 84f00f6..920bf93 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/783.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/783.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt index 7d9dfcf..01525dc 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .1.2 diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt index c269f36..004d440 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt @@ -14,7 +14,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Configuration read from %s diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt index 1255664..ae86561 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Configuration read from %s diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt index af02df1..747ea5a 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Configuration read from %s diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt index de467f6..31b8e05 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ............ diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php index 307ef66..218cf7e 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php @@ -5,62 +5,62 @@ */ class Issue1335Test extends PHPUnit_Framework_TestCase { - function testGlobalString() + public function testGlobalString() { $this->assertEquals("Hello", $GLOBALS['globalString']); } - function testGlobalIntTruthy() + public function testGlobalIntTruthy() { $this->assertEquals(1, $GLOBALS['globalIntTruthy']); } - function testGlobalIntFalsey() + public function testGlobalIntFalsey() { $this->assertEquals(0, $GLOBALS['globalIntFalsey']); } - function testGlobalFloat() + public function testGlobalFloat() { $this->assertEquals(1.123, $GLOBALS['globalFloat']); } - function testGlobalBoolTrue() + public function testGlobalBoolTrue() { $this->assertEquals(true, $GLOBALS['globalBoolTrue']); } - function testGlobalBoolFalse() + public function testGlobalBoolFalse() { $this->assertEquals(false, $GLOBALS['globalBoolFalse']); } - function testGlobalNull() + public function testGlobalNull() { $this->assertEquals(null, $GLOBALS['globalNull']); } - function testGlobalArray() + public function testGlobalArray() { $this->assertEquals(array("foo"), $GLOBALS['globalArray']); } - function testGlobalNestedArray() + public function testGlobalNestedArray() { $this->assertEquals(array(array("foo")), $GLOBALS['globalNestedArray']); } - function testGlobalObject() + public function testGlobalObject() { $this->assertEquals((object)array("foo"=>"bar"), $GLOBALS['globalObject']); } - function testGlobalObjectWithBackSlashString() + public function testGlobalObjectWithBackSlashString() { $this->assertEquals((object)array("foo"=>"back\\slash"), $GLOBALS['globalObjectWithBackSlashString']); } - function testGlobalObjectWithDoubleBackSlashString() + public function testGlobalObjectWithDoubleBackSlashString() { $this->assertEquals((object)array("foo"=>"back\\\\slash"), $GLOBALS['globalObjectWithDoubleBackSlashString']); } diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt index 17ee08e..d97ba4f 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1340.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1340.phpt index 4e1cd1f..0778f97 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1340.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1340.phpt @@ -4,14 +4,16 @@ GH-1340: Process isolation blocks infinitely upon fatal error --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. %A .E.EE diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1340/Issue1340Test.php b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1340/Issue1340Test.php index f003125..19c4fbd 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1340/Issue1340Test.php +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1340/Issue1340Test.php @@ -18,7 +18,7 @@ public function testLargeStderrOutputDoesNotBlock() // STDERR of a phpt test is not caught/validated at this point, so this // error output does not cause this test to fail. // @see https://github.com/sebastianbergmann/phpunit/issues/1169 - error_log("\n" . __FUNCTION__ . ": stderr:" . self::get4KB() . "\n", 4); + error_log("\n" . __FUNCTION__ . ": stderr:" . self::get4KB() . "\n"); $this->assertTrue(true); } @@ -27,7 +27,7 @@ public function testLargeStderrOutputDoesNotBlock() */ public function testLargeStderrOutputDoesNotBlockInIsolation() { - error_log("\n" . __FUNCTION__ . ": stderr:" . self::get4KB() . "\n", 4); + error_log("\n" . __FUNCTION__ . ": stderr:" . self::get4KB() . "\n"); $this->assertTrue(true); } @@ -65,6 +65,6 @@ public function testFatalErrorDoesNotPass() public static function onShutdown() { echo "\nshutdown: stdout:", self::get4KB(), "\n"; - error_log("\nshutdown: stderr:" . self::get4KB(), 4); + error_log("\nshutdown: stderr:" . self::get4KB()); } } diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt index eae3c22..e1892ba 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt @@ -9,7 +9,7 @@ if (defined('HHVM_VERSION')) --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . STDOUT does not break test result @@ -32,4 +32,4 @@ There was 1 error: PHPUnit_Framework_Exception: STDERR works as usual. FAILURES! -Tests: 2, Assertions: 1, Errors: 1. \ No newline at end of file +Tests: 2, Assertions: 1, Errors: 1. diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt index ab96268..da285fe 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt @@ -18,7 +18,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. F.E.E diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt index 9ec7e3c..c994f56 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. S diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt index 08f5107..c3b2e25 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. F diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt index b0b32e1..23c410b 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. I diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1468/Issue1468Test.php b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1468/Issue1468Test.php index 93be777..535b25b 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1468/Issue1468Test.php +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1468/Issue1468Test.php @@ -9,4 +9,3 @@ public function testFailure() $this->markTestIncomplete(); } } - diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt index bc1d585..631d6e6 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. F diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1471/Issue1471Test.php b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1471/Issue1471Test.php index e0cdcbc..6a09416 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1471/Issue1471Test.php +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1471/Issue1471Test.php @@ -10,4 +10,3 @@ public function testFailure() $this->assertTrue(false); } } - diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt index fd62adb..3e605b4 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt @@ -1,5 +1,12 @@ --TEST-- GH-1472: assertEqualXMLStructure modifies the tested elements +--SKIPIF-- + --FILE-- --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt index 35117a9..a94b961 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. R* diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt index 33ec819..29be767 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .FFF diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt index 7fc31c4..1dfa805 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt @@ -15,7 +15,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Configuration read from %s diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt index 9c512d8..de247c4 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ..F diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt index 37e2a86..8041d0b 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt @@ -4,7 +4,7 @@ GH-455: expectOutputString not working in strict mode --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ..F diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt index e2ef876..828995f 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. F diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php index a42c629..2120fab 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php @@ -36,7 +36,6 @@ public function shouldBeTrueDataProvider() public function shouldBeFalseDataProvider() { - throw new Exception("Can't create the data"); return array( array(true), diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt index 6e4c46b..e95506c 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. F diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt index 1ba868a..ba1cf85 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. F diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php index 43ddcb4..394a638 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php @@ -4,8 +4,8 @@ class Issue581Test extends PHPUnit_Framework_TestCase public function testExportingObjectsDoesNotBreakWindowsLineFeeds() { $this->assertEquals( - (object)array(1,2,"Test\r\n",4,5,6,7,8), - (object)array(1,2,"Test\r\n",4,1,6,7,8) + (object)array(1, 2, "Test\r\n", 4, 5, 6, 7, 8), + (object)array(1, 2, "Test\r\n", 4, 1, 6, 7, 8) ); } } diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt index 7005b41..53f4934 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. E diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt index eadcd11..7599661 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .F diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt index 3a3cef0..73ba414 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt index 5a62205..1e0ffbd 100644 --- a/core/vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt +++ b/core/vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ............................................................... 63 / 150 ( 42%) ............................................................... 126 / 150 ( 84%) diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt index 42ff953..8d6c07a 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. F diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt new file mode 100644 index 0000000..0beb8f2 --- /dev/null +++ b/core/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt @@ -0,0 +1,19 @@ +--TEST-- +phpunit --colors=always BankAccountTest ../_files/BankAccountTest.php +--FILE-- + +--EXPECTF-- +PHPUnit %s by Sebastian Bergmann and contributors. + +... + +Time: %s, Memory: %sMb + +%s[30;42mOK (3 tests, 3 assertions)%s[0m diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt index f27530b..f01bd79 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt index fcbd3a4..31ed8a4 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Configuration read from %sconfiguration.custom-printer.xml diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt index fc5f9f4..75a2644 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Configuration read from %sconfiguration.custom-printer.xml diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt index 8fc4c34..c6cfe86 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Starting test 'DataProviderDebugTest::testProvider with data set #0 (null, true, 1, 1.0)'. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt index 5154f42..e1c4571 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ..F. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt index 9854e2f..a14b466 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ..F. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt index b3544c2..75973fe 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. DataProvider [ ] Add diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/debug.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/debug.phpt index 7be7b39..194961a 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/debug.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/debug.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Starting test 'BankAccountTest::testBalanceIsInitiallyZero'. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt index 210cdfb..c52156c 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/default.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/default.phpt index 73da915..a5ccc38 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/default.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/default.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt index 08817b8..eac3eb7 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ...FSS diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt index d95bacc..5e60f18 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ...FSS diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt index 45c2d60..bd88351 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt index 5fe5f39..d05b79d 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt index 7981df0..37d2e63 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt index 4b7ba74..6c5d3b1 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt index 6538c47..3de7055 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. F diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt index 6a078c3..db585bf 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. EE diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt index 01189e1..eee3776 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt index ad3022e..4be3400 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt index 686cfd3..7df4f10 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. FFFFFFFFFFFFF diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/failure.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/failure.phpt index 453f841..23415e9 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/failure.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/failure.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. FFFFFFFFFFFFF diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt index 0a28dc8..b6a4d3c 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. E diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/fatal.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/fatal.phpt index c1bb7bf..e265ea7 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/fatal.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/fatal.phpt @@ -10,7 +10,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Fatal error: Call to undefined function non_existing_function() in %s diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt index 63af89e..3cf4119 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt index e75e87a..c5e2e60 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt index b76bfad..f3cf561 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt index f80e9b1..f19eb12 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt index 364378c..9db7c7e 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt index 8279e81..16b7288 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt index 3937ada..cefb087 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt index 8317b45..c96a89f 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt index a753566..192637a 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt index a868011..0a546ae 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt index ec2a8fa..16f0332 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt index 496ed23..919fb82 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt index f1467b9..846475a 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt index 759e120..ee8f629 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt index 136e056..1987e2c 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt index 5db30b1..b4482c5 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. .. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt index 521a58e..3bed821 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt index bbf955f..a823881 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt index 9183bf4..cb61922 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-sensitive-no-result.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-sensitive-no-result.phpt index 0f4aedb..bf1a974 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-sensitive-no-result.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-sensitive-no-result.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt index 643c8da..4009065 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt index ec3e0a0..c5cb650 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt index 853a87a..8ead7b9 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt index fc79220..4e68d65 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/group.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/group.phpt index 56f488f..f0c0735 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/group.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/group.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/help.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/help.phpt index 9290205..4c1d945 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/help.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/help.phpt @@ -8,7 +8,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Usage: phpunit [options] UnitTest [UnitTest.php] phpunit [options] @@ -45,16 +45,18 @@ Test Execution Options: --report-useless-tests Be strict about tests that do not test anything. --strict-coverage Be strict about unintentionally covered code. + --strict-global-state Be strict about changes to global state --disallow-test-output Be strict about output during tests. --enforce-time-limit Enforce time limit based on test size. --disallow-todo-tests Disallow @todo-annotated tests. - --strict Run tests in strict mode (enables all of the above). --process-isolation Run each test in a separate PHP process. --no-globals-backup Do not backup and restore $GLOBALS for each test. --static-backup Backup and restore static attributes for each test. - --colors Use colors in output. + --colors= Use colors in output ("never", "auto" or "always"). + --columns Number of columns to use for progress output. + --columns max Use maximum number of columns for progress output. --stderr Write to STDERR instead of STDOUT. --stop-on-error Stop execution upon first error. --stop-on-failure Stop execution upon first error or failure. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/help2.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/help2.phpt index 1615e29..7134862 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/help2.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/help2.phpt @@ -9,7 +9,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Usage: phpunit [options] UnitTest [UnitTest.php] phpunit [options] @@ -46,16 +46,18 @@ Test Execution Options: --report-useless-tests Be strict about tests that do not test anything. --strict-coverage Be strict about unintentionally covered code. + --strict-global-state Be strict about changes to global state --disallow-test-output Be strict about output during tests. --enforce-time-limit Enforce time limit based on test size. --disallow-todo-tests Disallow @todo-annotated tests. - --strict Run tests in strict mode (enables all of the above). --process-isolation Run each test in a separate PHP process. --no-globals-backup Do not backup and restore $GLOBALS for each test. --static-backup Backup and restore static attributes for each test. - --colors Use colors in output. + --colors= Use colors in output ("never", "auto" or "always"). + --columns Number of columns to use for progress output. + --columns max Use maximum number of columns for progress output. --stderr Write to STDERR instead of STDOUT. --stop-on-error Stop execution upon first error. --stop-on-failure Stop execution upon first error or failure. diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt index 824da27..ee002df 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt @@ -13,7 +13,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt index f95d779..85f2906 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. Available test group(s): - Sebastian Bergmann diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt index c00af02..abdbb2f 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt @@ -18,7 +18,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. {"event":"suiteStart","suite":"BankAccountTest","tests":3}{"event":"testStart","suite":"BankAccountTest","test":"BankAccountTest::testBalanceIsInitiallyZero"}.{"event":"test","suite":"BankAccountTest","test":"BankAccountTest::testBalanceIsInitiallyZero","status":"pass","time":%f,"trace":[],"message":"","output":""}{"event":"testStart","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative"}.{"event":"test","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative","status":"pass","time":%f,"trace":[],"message":"","output":""}{"event":"testStart","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative2"}.{"event":"test","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative2","status":"pass","time":%f,"trace":[],"message":"","output":""} diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt index e04f2c7..e9ab24d 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt @@ -20,7 +20,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. { "event": "suiteStart", diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt index e1d1173..190c215 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt @@ -20,7 +20,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. { "event": "suiteStart", diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt index 986dbfe..3babdb8 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. TAP version 13 .ok 1 - BankAccountTest::testBalanceIsInitiallyZero diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt index cce87bc..81bcc28 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt index b487910..7783144 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. . diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt index a8dd7e8..a262f63 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ......... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/strict-incomplete.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt similarity index 69% rename from core/vendor/phpunit/phpunit/tests/TextUI/strict-incomplete.phpt rename to core/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt index de99cdd..9bc4c2d 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/strict-incomplete.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt @@ -1,9 +1,9 @@ --TEST-- -phpunit --strict IncompleteTest ../_files/IncompleteTest.php +phpunit --report-useless-tests IncompleteTest ../_files/IncompleteTest.php --FILE-- --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. I diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/strict-isolation.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt similarity index 68% rename from core/vendor/phpunit/phpunit/tests/TextUI/strict-isolation.phpt rename to core/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt index 6a6a7cc..9401b26 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/strict-isolation.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt @@ -1,9 +1,9 @@ --TEST-- -phpunit --strict --process-isolation IncompleteTest ../_files/IncompleteTest.php +phpunit --report-useless-tests --process-isolation IncompleteTest ../_files/IncompleteTest.php --FILE-- --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. R diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/strict.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt similarity index 69% rename from core/vendor/phpunit/phpunit/tests/TextUI/strict.phpt rename to core/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt index d5f2feb..9eb22df 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/strict.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt @@ -1,9 +1,9 @@ --TEST-- -phpunit --strict NothingTest ../_files/NothingTest.php +phpunit --report-useless-tests NothingTest ../_files/NothingTest.php --FILE-- --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. R diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt index 0f81cfd..cf5d577 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ..... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt index db205a2..85f13be 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. ... diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt index f2b3f93..85eaf87 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors.

BankAccount

    ...
  • Balance is initially zero
  • Balance cannot become negative
diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt index 06f34a6..2c09d4e 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt @@ -12,7 +12,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. BankAccount ... [x] Balance is initially zero diff --git a/core/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt b/core/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt index 57e32ff..69fb23a 100644 --- a/core/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt +++ b/core/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt @@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php'; PHPUnit_TextUI_Command::main(); ?> --EXPECTF-- -PHPUnit %s by Sebastian Bergmann. +PHPUnit %s by Sebastian Bergmann and contributors. BankAccount [x] Balance is initially zero diff --git a/core/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php b/core/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php index 0d4a242..b0ec593 100644 --- a/core/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php +++ b/core/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php @@ -39,6 +39,54 @@ public function testExceptionIsThrownForNotExistingConfigurationFile() } /** + * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration + */ + public function testShouldReadColorsWhenTrueInConfigurationfile() + { + $configurationFilename = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration.colors.true.xml'; + $configurationInstance = PHPUnit_Util_Configuration::getInstance($configurationFilename); + $configurationValues = $configurationInstance->getPHPUnitConfiguration(); + + $this->assertEquals(PHPUnit_TextUI_ResultPrinter::COLOR_AUTO, $configurationValues['colors']); + } + + /** + * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration + */ + public function testShouldReadColorsWhenFalseInConfigurationfile() + { + $configurationFilename = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration.colors.false.xml'; + $configurationInstance = PHPUnit_Util_Configuration::getInstance($configurationFilename); + $configurationValues = $configurationInstance->getPHPUnitConfiguration(); + + $this->assertEquals(PHPUnit_TextUI_ResultPrinter::COLOR_NEVER, $configurationValues['colors']); + } + + /** + * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration + */ + public function testShouldReadColorsWhenEmptyInConfigurationfile() + { + $configurationFilename = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration.colors.empty.xml'; + $configurationInstance = PHPUnit_Util_Configuration::getInstance($configurationFilename); + $configurationValues = $configurationInstance->getPHPUnitConfiguration(); + + $this->assertEquals(PHPUnit_TextUI_ResultPrinter::COLOR_NEVER, $configurationValues['colors']); + } + + /** + * @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration + */ + public function testShouldReadColorsWhenInvalidInConfigurationfile() + { + $configurationFilename = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'configuration.colors.invalid.xml'; + $configurationInstance = PHPUnit_Util_Configuration::getInstance($configurationFilename); + $configurationValues = $configurationInstance->getPHPUnitConfiguration(); + + $this->assertEquals(PHPUnit_TextUI_ResultPrinter::COLOR_NEVER, $configurationValues['colors']); + } + + /** * @covers PHPUnit_Util_Configuration::getFilterConfiguration */ public function testFilterConfigurationIsReadCorrectly() @@ -305,9 +353,11 @@ public function testPHPUnitConfigurationIsReadCorrectly() array( 'backupGlobals' => true, 'backupStaticAttributes' => false, + 'disallowChangesToGlobalState' => false, 'bootstrap' => '/path/to/bootstrap.php', 'cacheTokens' => false, - 'colors' => false, + 'columns' => 80, + 'colors' => 'never', 'stderr' => false, 'convertErrorsToExceptions' => true, 'convertNoticesToExceptions' => true, diff --git a/core/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php b/core/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php index 712ef47..9c1b389 100644 --- a/core/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php +++ b/core/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php @@ -38,8 +38,6 @@ public function testIncludedFilesAsStringSkipsVfsProtocols() $this->assertEquals( "require_once '" . $dir . "/ConfigurationTest.php';\n" . "require_once '" . $dir . "/GlobalStateTest.php';\n" . - "require_once 'file://" . $dir . "/XMLTest.php';\n" - , PHPUnit_Util_GlobalState::processIncludedFilesAsString($files)); + "require_once 'file://" . $dir . "/XMLTest.php';\n", PHPUnit_Util_GlobalState::processIncludedFilesAsString($files)); } - -} \ No newline at end of file +} diff --git a/core/vendor/phpunit/phpunit/tests/Util/TestTest.php b/core/vendor/phpunit/phpunit/tests/Util/TestTest.php index 3b5ca16..3047acd 100644 --- a/core/vendor/phpunit/phpunit/tests/Util/TestTest.php +++ b/core/vendor/phpunit/phpunit/tests/Util/TestTest.php @@ -372,7 +372,7 @@ public function testGetLinesToBeCovered4() * @covers PHPUnit_Util_Test::getLinesToBeCovered * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed */ - public function testGetLinesToBeCoveredSkipsNonExistantMethods() + public function testGetLinesToBeCoveredSkipsNonExistentMethods() { $this->assertSame( array(), diff --git a/core/vendor/phpunit/phpunit/tests/Util/XMLTest.php b/core/vendor/phpunit/phpunit/tests/Util/XMLTest.php index 4aa4ae4..b3c73d8 100644 --- a/core/vendor/phpunit/phpunit/tests/Util/XMLTest.php +++ b/core/vendor/phpunit/phpunit/tests/Util/XMLTest.php @@ -102,7 +102,7 @@ public function testConvertAssertSelect() 'title' => 'xerox'), 'child' => array('tag' => 'span', 'adjacent-sibling' => array('tag' => 'h1')))); - $this->assertEquals($tag, $converted); + $this->assertEquals($tag, $converted); } public function testConvertAssertSelectElt() diff --git a/core/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php b/core/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php index 2dd4c44..c181503 100644 --- a/core/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php +++ b/core/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php @@ -4,5 +4,4 @@ class InheritanceA extends InheritanceB { - } diff --git a/core/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceB.php b/core/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceB.php index b7d4a50..24447e2 100644 --- a/core/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceB.php +++ b/core/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceB.php @@ -4,6 +4,5 @@ class InheritanceB extends PHPUnit_Framework_TestCase { public function testSomething() { - } } diff --git a/core/vendor/phpunit/phpunit/tests/_files/NonStatic.php b/core/vendor/phpunit/phpunit/tests/_files/NonStatic.php index 23d7ef7..48bad9a 100644 --- a/core/vendor/phpunit/phpunit/tests/_files/NonStatic.php +++ b/core/vendor/phpunit/phpunit/tests/_files/NonStatic.php @@ -3,6 +3,6 @@ class NonStatic { public function suite() { - return null; + return; } } diff --git a/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.empty.xml b/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.empty.xml new file mode 100644 index 0000000..5f9e055 --- /dev/null +++ b/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.empty.xml @@ -0,0 +1 @@ + diff --git a/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.false.xml b/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.false.xml new file mode 100644 index 0000000..dcd4aa4 --- /dev/null +++ b/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.false.xml @@ -0,0 +1 @@ + diff --git a/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.invalid.xml b/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.invalid.xml new file mode 100644 index 0000000..c5bd699 --- /dev/null +++ b/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.invalid.xml @@ -0,0 +1 @@ + diff --git a/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.true.xml b/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.true.xml new file mode 100644 index 0000000..1efe413 --- /dev/null +++ b/core/vendor/phpunit/phpunit/tests/_files/configuration.colors.true.xml @@ -0,0 +1 @@ + diff --git a/core/vendor/phpunit/phpunit/tests/_files/configuration.xml b/core/vendor/phpunit/phpunit/tests/_files/configuration.xml index 13f5ee9..e83bfd3 100644 --- a/core/vendor/phpunit/phpunit/tests/_files/configuration.xml +++ b/core/vendor/phpunit/phpunit/tests/_files/configuration.xml @@ -4,6 +4,7 @@ backupStaticAttributes="false" bootstrap="/path/to/bootstrap.php" cacheTokens="false" + columns="80" colors="false" stderr="false" convertErrorsToExceptions="true" @@ -22,6 +23,7 @@ beStrictAboutTestSize="false" beStrictAboutTodoAnnotatedTests="false" checkForUnintentionallyCoveredCode="false" + beStrictAboutChangesToGlobalState="false" verbose="false"> diff --git a/core/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml b/core/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml index 902706c..4307629 100644 --- a/core/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml +++ b/core/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml @@ -4,6 +4,7 @@ backupStaticAttributes="false" bootstrap="/path/to/bootstrap.php" cacheTokens="false" + columns="80" colors="false" stderr="false" convertErrorsToExceptions="true" @@ -17,7 +18,12 @@ timeoutForSmallTests="1" timeoutForMediumTests="10" timeoutForLargeTests="60" - strict="false" + beStrictAboutTestsThatDoNotTestAnything="false" + beStrictAboutOutputDuringTests="false" + beStrictAboutTestSize="false" + beStrictAboutTodoAnnotatedTests="false" + checkForUnintentionallyCoveredCode="false" + beStrictAboutChangesToGlobalState="false" verbose="false"> . +Copyright (c) 2002-2015, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/vendor/sebastian/comparator/composer.json b/core/vendor/sebastian/comparator/composer.json index 6bfd2d8..6e133e4 100644 --- a/core/vendor/sebastian/comparator/composer.json +++ b/core/vendor/sebastian/comparator/composer.json @@ -24,11 +24,11 @@ ], "require": { "php": ">=5.3.3", - "sebastian/diff": "~1.1", - "sebastian/exporter": "~1.0" + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.1" + "phpunit/phpunit": "~4.4" }, "autoload": { "classmap": [ @@ -37,7 +37,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } } } diff --git a/core/vendor/sebastian/comparator/src/ArrayComparator.php b/core/vendor/sebastian/comparator/src/ArrayComparator.php index 9c048e9..17a3c85 100644 --- a/core/vendor/sebastian/comparator/src/ArrayComparator.php +++ b/core/vendor/sebastian/comparator/src/ArrayComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/Comparator.php b/core/vendor/sebastian/comparator/src/Comparator.php index 4d2716a..75e8b01 100644 --- a/core/vendor/sebastian/comparator/src/Comparator.php +++ b/core/vendor/sebastian/comparator/src/Comparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -51,7 +18,7 @@ * @package Comparator * @subpackage Framework * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/ComparisonFailure.php b/core/vendor/sebastian/comparator/src/ComparisonFailure.php index e1e053d..a75815d 100644 --- a/core/vendor/sebastian/comparator/src/ComparisonFailure.php +++ b/core/vendor/sebastian/comparator/src/ComparisonFailure.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Comparator package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Comparator - * @author Sebastian Bergmann - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -52,7 +18,7 @@ * @package Comparator * @author Sebastian Bergmann * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/DOMNodeComparator.php b/core/vendor/sebastian/comparator/src/DOMNodeComparator.php index f69bc8f..c76d1c7 100644 --- a/core/vendor/sebastian/comparator/src/DOMNodeComparator.php +++ b/core/vendor/sebastian/comparator/src/DOMNodeComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -51,7 +18,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/DateTimeComparator.php b/core/vendor/sebastian/comparator/src/DateTimeComparator.php index ed2e2ba..65a7744 100644 --- a/core/vendor/sebastian/comparator/src/DateTimeComparator.php +++ b/core/vendor/sebastian/comparator/src/DateTimeComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/DoubleComparator.php b/core/vendor/sebastian/comparator/src/DoubleComparator.php index 9e06ab7..76dd3a2 100644 --- a/core/vendor/sebastian/comparator/src/DoubleComparator.php +++ b/core/vendor/sebastian/comparator/src/DoubleComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/ExceptionComparator.php b/core/vendor/sebastian/comparator/src/ExceptionComparator.php index e45e566..9da557b 100644 --- a/core/vendor/sebastian/comparator/src/ExceptionComparator.php +++ b/core/vendor/sebastian/comparator/src/ExceptionComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/Factory.php b/core/vendor/sebastian/comparator/src/Factory.php index 054ff42..d841ef2 100644 --- a/core/vendor/sebastian/comparator/src/Factory.php +++ b/core/vendor/sebastian/comparator/src/Factory.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ @@ -60,6 +27,11 @@ class Factory private $comparators = array(); /** + * @var Factory + */ + private static $instance; + + /** * Constructs a new factory. */ public function __construct() @@ -79,6 +51,18 @@ public function __construct() } /** + * @return Factory + */ + public static function getInstance() + { + if (self::$instance === null) { + self::$instance = new Factory; + } + + return self::$instance; + } + + /** * Returns the correct comparator for comparing two values. * * @param mixed $expected The first value to compare diff --git a/core/vendor/sebastian/comparator/src/MockObjectComparator.php b/core/vendor/sebastian/comparator/src/MockObjectComparator.php index d9275ed..ecd275e 100644 --- a/core/vendor/sebastian/comparator/src/MockObjectComparator.php +++ b/core/vendor/sebastian/comparator/src/MockObjectComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/NumericComparator.php b/core/vendor/sebastian/comparator/src/NumericComparator.php index 51b8de9..a3453a9 100644 --- a/core/vendor/sebastian/comparator/src/NumericComparator.php +++ b/core/vendor/sebastian/comparator/src/NumericComparator.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Comparator package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Comparator - * @author Bernhard Schussek - * @author Alexander - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -50,7 +16,7 @@ * @package Comparator * @author Bernhard Schussek * @author Alexander - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/ObjectComparator.php b/core/vendor/sebastian/comparator/src/ObjectComparator.php index 3da5231..44375d9 100644 --- a/core/vendor/sebastian/comparator/src/ObjectComparator.php +++ b/core/vendor/sebastian/comparator/src/ObjectComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/ResourceComparator.php b/core/vendor/sebastian/comparator/src/ResourceComparator.php index 38578a1..043a4ce 100644 --- a/core/vendor/sebastian/comparator/src/ResourceComparator.php +++ b/core/vendor/sebastian/comparator/src/ResourceComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/ScalarComparator.php b/core/vendor/sebastian/comparator/src/ScalarComparator.php index 26f13fc..7de108e 100644 --- a/core/vendor/sebastian/comparator/src/ScalarComparator.php +++ b/core/vendor/sebastian/comparator/src/ScalarComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/SplObjectStorageComparator.php b/core/vendor/sebastian/comparator/src/SplObjectStorageComparator.php index 2ff0828..5de7dac 100644 --- a/core/vendor/sebastian/comparator/src/SplObjectStorageComparator.php +++ b/core/vendor/sebastian/comparator/src/SplObjectStorageComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/src/TypeComparator.php b/core/vendor/sebastian/comparator/src/TypeComparator.php index 3c4e870..27a9581 100644 --- a/core/vendor/sebastian/comparator/src/TypeComparator.php +++ b/core/vendor/sebastian/comparator/src/TypeComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/ArrayComparatorTest.php b/core/vendor/sebastian/comparator/tests/ArrayComparatorTest.php index e977ca9..1874e71 100644 --- a/core/vendor/sebastian/comparator/tests/ArrayComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/ArrayComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php b/core/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php index da4e133..7bad48c 100644 --- a/core/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -51,7 +18,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php b/core/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php index b03a539..22672ab 100644 --- a/core/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -51,7 +18,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/DoubleComparatorTest.php b/core/vendor/sebastian/comparator/tests/DoubleComparatorTest.php index 205ac38..8c47101 100644 --- a/core/vendor/sebastian/comparator/tests/DoubleComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/DoubleComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php b/core/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php index f5750da..7150285 100644 --- a/core/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -51,7 +18,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/FactoryTest.php b/core/vendor/sebastian/comparator/tests/FactoryTest.php index 4ae4c72..0964067 100644 --- a/core/vendor/sebastian/comparator/tests/FactoryTest.php +++ b/core/vendor/sebastian/comparator/tests/FactoryTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php b/core/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php index fa696b9..01e0352 100644 --- a/core/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/NumericComparatorTest.php b/core/vendor/sebastian/comparator/tests/NumericComparatorTest.php index 6c119d3..cf121d4 100644 --- a/core/vendor/sebastian/comparator/tests/NumericComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/NumericComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ @@ -67,7 +34,7 @@ public function acceptsSucceedsProvider() array(5, 10), array(8, '0'), array('10', 0), - array(0xf4c3b00c, 42), + array(0x74c3b00c, 42), array(0755, 0777) ); } diff --git a/core/vendor/sebastian/comparator/tests/ObjectComparatorTest.php b/core/vendor/sebastian/comparator/tests/ObjectComparatorTest.php index 39a582d..b11bbe0 100644 --- a/core/vendor/sebastian/comparator/tests/ObjectComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/ObjectComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -50,7 +17,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/ResourceComparatorTest.php b/core/vendor/sebastian/comparator/tests/ResourceComparatorTest.php index 9e7b148..9aea3ee 100644 --- a/core/vendor/sebastian/comparator/tests/ResourceComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/ResourceComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/ScalarComparatorTest.php b/core/vendor/sebastian/comparator/tests/ScalarComparatorTest.php index 3cea113..a37e1c9 100644 --- a/core/vendor/sebastian/comparator/tests/ScalarComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/ScalarComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php b/core/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php index 00b2d66..40be43d 100644 --- a/core/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -51,7 +18,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/TypeComparatorTest.php b/core/vendor/sebastian/comparator/tests/TypeComparatorTest.php index 94f0d0b..57ff39e 100644 --- a/core/vendor/sebastian/comparator/tests/TypeComparatorTest.php +++ b/core/vendor/sebastian/comparator/tests/TypeComparatorTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -50,7 +17,7 @@ * * @package Comparator * @author Jeff Welch - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/_files/Author.php b/core/vendor/sebastian/comparator/tests/_files/Author.php index a39c582..d516955 100644 --- a/core/vendor/sebastian/comparator/tests/_files/Author.php +++ b/core/vendor/sebastian/comparator/tests/_files/Author.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/_files/Book.php b/core/vendor/sebastian/comparator/tests/_files/Book.php index 20de0b5..91b8571 100644 --- a/core/vendor/sebastian/comparator/tests/_files/Book.php +++ b/core/vendor/sebastian/comparator/tests/_files/Book.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/_files/ClassWithToString.php b/core/vendor/sebastian/comparator/tests/_files/ClassWithToString.php index 38ece4e..e8e03bc 100644 --- a/core/vendor/sebastian/comparator/tests/_files/ClassWithToString.php +++ b/core/vendor/sebastian/comparator/tests/_files/ClassWithToString.php @@ -1,44 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; diff --git a/core/vendor/sebastian/comparator/tests/_files/SampleClass.php b/core/vendor/sebastian/comparator/tests/_files/SampleClass.php index 8c1a245..de6476f 100644 --- a/core/vendor/sebastian/comparator/tests/_files/SampleClass.php +++ b/core/vendor/sebastian/comparator/tests/_files/SampleClass.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Sebastian Bergmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Sebastian Bergmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/_files/Struct.php b/core/vendor/sebastian/comparator/tests/_files/Struct.php index 96ffe44..05615af 100644 --- a/core/vendor/sebastian/comparator/tests/_files/Struct.php +++ b/core/vendor/sebastian/comparator/tests/_files/Struct.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Comparator package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Sebastian Bergmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; @@ -48,7 +15,7 @@ * * @package Comparator * @author Sebastian Bergmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/comparator */ diff --git a/core/vendor/sebastian/comparator/tests/_files/TestClass.php b/core/vendor/sebastian/comparator/tests/_files/TestClass.php index a0f711d..e4c9b78 100644 --- a/core/vendor/sebastian/comparator/tests/_files/TestClass.php +++ b/core/vendor/sebastian/comparator/tests/_files/TestClass.php @@ -1,44 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; diff --git a/core/vendor/sebastian/comparator/tests/_files/TestClassComparator.php b/core/vendor/sebastian/comparator/tests/_files/TestClassComparator.php index fbfc92a..52aac3f 100644 --- a/core/vendor/sebastian/comparator/tests/_files/TestClassComparator.php +++ b/core/vendor/sebastian/comparator/tests/_files/TestClassComparator.php @@ -1,44 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Comparator - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/comparator + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; diff --git a/core/vendor/sebastian/diff/.travis.yml b/core/vendor/sebastian/diff/.travis.yml index 4309f78..c5ea677 100644 --- a/core/vendor/sebastian/diff/.travis.yml +++ b/core/vendor/sebastian/diff/.travis.yml @@ -1,8 +1,7 @@ language: php -before_script: - - composer self-update - - composer install --no-interaction --prefer-source --dev +install: + - travis_retry composer install --no-interaction --prefer-source php: - 5.3.3 diff --git a/core/vendor/sebastian/diff/LICENSE b/core/vendor/sebastian/diff/LICENSE index 2f61c4f..0941c06 100644 --- a/core/vendor/sebastian/diff/LICENSE +++ b/core/vendor/sebastian/diff/LICENSE @@ -1,6 +1,6 @@ Diff -Copyright (c) 2002-2014, Sebastian Bergmann . +Copyright (c) 2002-2015, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/vendor/sebastian/diff/composer.json b/core/vendor/sebastian/diff/composer.json index c6dbdfc..3c04952 100644 --- a/core/vendor/sebastian/diff/composer.json +++ b/core/vendor/sebastian/diff/composer.json @@ -27,7 +27,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } } } diff --git a/core/vendor/sebastian/diff/src/Chunk.php b/core/vendor/sebastian/diff/src/Chunk.php index 91ab738..79d13fc 100644 --- a/core/vendor/sebastian/diff/src/Chunk.php +++ b/core/vendor/sebastian/diff/src/Chunk.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Diff package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Diff; @@ -48,7 +14,7 @@ * @package Diff * @author Sebastian Bergmann * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/diff */ diff --git a/core/vendor/sebastian/diff/src/Diff.php b/core/vendor/sebastian/diff/src/Diff.php index 3b5db8f..45aaae6 100644 --- a/core/vendor/sebastian/diff/src/Diff.php +++ b/core/vendor/sebastian/diff/src/Diff.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Diff package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Diff; @@ -48,7 +14,7 @@ * @package Diff * @author Sebastian Bergmann * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/diff */ diff --git a/core/vendor/sebastian/diff/src/Differ.php b/core/vendor/sebastian/diff/src/Differ.php index e7e5204..76630ed 100644 --- a/core/vendor/sebastian/diff/src/Differ.php +++ b/core/vendor/sebastian/diff/src/Differ.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. +/* + * This file is part of the Diff package. * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. + * (c) Sebastian Bergmann * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Diff; @@ -54,7 +20,7 @@ * @package Diff * @author Sebastian Bergmann * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/diff */ @@ -83,6 +49,14 @@ public function __construct($header = "--- Original\n+++ New\n") */ public function diff($from, $to, LongestCommonSubsequence $lcs = null) { + if (!is_array($from) && !is_string($from)) { + $from = (string) $from; + } + + if (!is_array($to) && !is_string($to)) { + $to = (string) $to; + } + $buffer = $this->header; $diff = $this->diffToArray($from, $to, $lcs); diff --git a/core/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php b/core/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php index ed356fd..8036474 100644 --- a/core/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php +++ b/core/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Diff package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Diff\LCS; @@ -50,7 +16,7 @@ * @package Diff * @author Sebastian Bergmann * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/diff */ diff --git a/core/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php b/core/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php index 3abca36..6213607 100644 --- a/core/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php +++ b/core/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Diff package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Diff\LCS; @@ -50,7 +16,7 @@ * @package Diff * @author Sebastian Bergmann * @author Denes Lados - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/diff */ diff --git a/core/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php b/core/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php index a6c0e85..b569586 100644 --- a/core/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php +++ b/core/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. +/* + * This file is part of the Diff package. * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. + * (c) Sebastian Bergmann * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Diff\LCS; @@ -50,7 +16,7 @@ * @package Diff * @author Sebastian Bergmann * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/diff */ @@ -66,24 +32,26 @@ class TimeEfficientImplementation implements LongestCommonSubsequence public function calculate(array $from, array $to) { $common = array(); - $matrix = array(); $fromLength = count($from); $toLength = count($to); + $width = $fromLength + 1; + $matrix = new \SplFixedArray($width * ($toLength + 1)); for ($i = 0; $i <= $fromLength; ++$i) { - $matrix[$i][0] = 0; + $matrix[$i] = 0; } for ($j = 0; $j <= $toLength; ++$j) { - $matrix[0][$j] = 0; + $matrix[$j * $width] = 0; } for ($i = 1; $i <= $fromLength; ++$i) { for ($j = 1; $j <= $toLength; ++$j) { - $matrix[$i][$j] = max( - $matrix[$i-1][$j], - $matrix[$i][$j-1], - $from[$i-1] === $to[$j-1] ? $matrix[$i-1][$j-1] + 1 : 0 + $o = ($j * $width) + $i; + $matrix[$o] = max( + $matrix[$o - 1], + $matrix[$o - $width], + $from[$i - 1] === $to[$j - 1] ? $matrix[$o - $width - 1] + 1 : 0 ); } } @@ -93,16 +61,19 @@ public function calculate(array $from, array $to) while ($i > 0 && $j > 0) { if ($from[$i-1] === $to[$j-1]) { - array_unshift($common, $from[$i-1]); + $common[] = $from[$i-1]; --$i; --$j; - } elseif ($matrix[$i][$j-1] > $matrix[$i-1][$j]) { - --$j; } else { - --$i; + $o = ($j * $width) + $i; + if ($matrix[$o - $width] > $matrix[$o - 1]) { + --$j; + } else { + --$i; + } } } - return $common; + return array_reverse($common); } } diff --git a/core/vendor/sebastian/diff/src/Line.php b/core/vendor/sebastian/diff/src/Line.php index 10455d2..28c66aa 100644 --- a/core/vendor/sebastian/diff/src/Line.php +++ b/core/vendor/sebastian/diff/src/Line.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Diff package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Diff; @@ -48,7 +14,7 @@ * @package Diff * @author Sebastian Bergmann * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/diff */ diff --git a/core/vendor/sebastian/diff/src/Parser.php b/core/vendor/sebastian/diff/src/Parser.php index fc8abdc..79e2413 100644 --- a/core/vendor/sebastian/diff/src/Parser.php +++ b/core/vendor/sebastian/diff/src/Parser.php @@ -1,45 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Diff package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Diff; @@ -50,7 +16,7 @@ * @package Diff * @author Sebastian Bergmann * @author Kore Nordmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/diff */ @@ -80,6 +46,9 @@ public function parse($string) $diff = new Diff($fromMatch['file'], $toMatch['file']); ++$i; } else { + if (preg_match('/^(?:diff --git |index [\da-f\.]+|[+-]{3} [ab])/', $lines[$i])) { + continue; + } $collected[] = $lines[$i]; } } @@ -100,45 +69,34 @@ private function parseFileDiff(Diff $diff, array $lines) { $chunks = array(); - while (count($lines)) { - while (!preg_match('(^@@\\s+-(?P\\d+)(?:,\\s*(?P\\d+))?\\s+\\+(?P\\d+)(?:,\\s*(?P\\d+))?\\s+@@)', $last = array_shift($lines), $match)) { - if ($last === null) { - break 2; - } + foreach ($lines as $line) { + if (preg_match('/^@@\s+-(?P\d+)(?:,\s*(?P\d+))?\s+\+(?P\d+)(?:,\s*(?P\d+))?\s+@@/', $line, $match)) { + $chunk = new Chunk( + $match['start'], + isset($match['startrange']) ? max(1, $match['startrange']) : 1, + $match['end'], + isset($match['endrange']) ? max(1, $match['endrange']) : 1 + ); + + $chunks[] = $chunk; + $diffLines = array(); + continue; } - $chunk = new Chunk( - $match['start'], - isset($match['startrange']) ? max(1, $match['startrange']) : 1, - $match['end'], - isset($match['endrange']) ? max(1, $match['endrange']) : 1 - ); - - $diffLines = array(); - $last = null; - - while (count($lines) && - (preg_match('(^(?P[+ -])?(?P.*))', $last = array_shift($lines), $match) || - (strpos($last, '\\ No newline at end of file') === 0))) { - if (count($match)) { - $type = Line::UNCHANGED; + if (preg_match('/^(?P[+ -])?(?P.*)/', $line, $match)) { + $type = Line::UNCHANGED; - if ($match['type'] == '+') { - $type = Line::ADDED; - } elseif ($match['type'] == '-') { - $type = Line::REMOVED; - } - - $diffLines[] = new Line($type, $match['line']); + if ($match['type'] == '+') { + $type = Line::ADDED; + } elseif ($match['type'] == '-') { + $type = Line::REMOVED; } - } - $chunk->setLines($diffLines); + $diffLines[] = new Line($type, $match['line']); - $chunks[] = $chunk; - - if ($last !== null) { - array_unshift($lines, $last); + if (isset($chunk)) { + $chunk->setLines($diffLines); + } } } diff --git a/core/vendor/sebastian/diff/tests/DifferTest.php b/core/vendor/sebastian/diff/tests/DifferTest.php index 317d54005868d6929ea034717cf9ee3a5261ceae..a786325bc1b8beae1133a7e459df7563585fa218 100644 GIT binary patch literal 11371 zcmeHNZExC05YAWpD^@5{NPq-GAgRgqk|tEGl$IzV_X(+5>?K$Qo3odsxhVhrW_E33 zgN<ec|!-+j4e8k9=IUK@( z{+&LsL!d z%)yK^gFKmh1k_-HYtI~=fg(eoK2j8mPM8aZusL)ec^{2zE6NNM-h8^b2jt&AIzazq zJKw+cn9DB#OIv&o?2a(^uP^WVU)aQUo;$;#shiB=pC@3$1YU$isoXtt!V-BEeN0_f z1cNyUh_D}=S%$j;ukxZ0cy!wW^4rdr?jM~i@*AnQL&FzWS7J~N4|cDSt_BW4{-Xnk zIX(yE{E<2y25;y{{7xP7k#a_M4e%p#JjSVGbEachhBHgYs1ld)`)O%kFiCVMco!p9 zeJ`0ovjri?h@d3={<;hVGL%jTbsYK({Ore6DDps&bNLzb!g?UPL&u&ZeByTS!JwSp zIQFAyFh@%E{}qtv_9Js#gal7QB1qtxhSv1#3q+WS9}{UsDtNLyzt09RcjoTpkQhSa zEt@*b^;54qL{OL1`oL}>XPCo`dlx(tQFE=k(S$8Y?*`7TNJqjCw-X`=Dast)`Ey3c zZYj(d4zLWg=bDlTj*wXqagSh%0@~kCNe4gPn@T{~s zE@v*cC!ZLFqABXf7k1NA)h)ISDo8Es9jPUbPis>6RDQL zM{F&M5#IB2a(>>os zo!*FAqJOxsj62ah38QZiX^h#js;@AkTCI{U^!cVm#{j-uCSTc8-|`JoVXVGv&~md- zQY)k$XHo&1(*ky;(T)!T5*}YF5P~Pt@gYl4;>G86y1g6fK+B_Ppx$Mu@klAe`B>7G zM6jTO`W?!?Qg~4cgNvoVLn@+hkB1*MdODFrk!Q3&LNDk%bJ3tk(& z2v7LNw|ptL9mZ#lCHvu0B=H1abO`e;VR-&Yq^QfrLrwEGCHv8gMpAsFBuM58>>H3= zY*yxJAgLh3m)TKA1T4~mq{!F;Ujp!iVHD^C#5tG6AU&YZV9_AnBz-$J(Ye>x3X(pj z&tMa3iG)Oi31meEHx(y3m^*$gqo^@w$Yd3;MJy0zp|r^8=IjdcX+5(-e#m52tW_Xv zD^`U-Zqq7M6TvTIwJoc%=ingZh)mH+Fl>vK83xOoi6NG3)(K^?kpq#D@p;8a>xJf< z{GYFb#gyhJzMGTT7nhQ6S`^bj3&?bEhrF#!qyqtO zlwqxo_lcOlk?fKP-?p}=gF!5VL@aS`L4*;2>y?=_C z0nK(i18`t1lHS4Jh5ecDi45!2+?DeMYiU;z-mk!FCHE1q7cuGB{EHdipgDzo!`azc zr+ckXP1RmZt=8^p^%JeQVryK~8rqAiH5yuRX9d{~9t9TLt_ITVv2nKIz;jXLLHZ>LCAJ>wRgvf8H z^}vv)fhMo;l;nXUcV9sRU?;gXAP&SIqxe({#-_!DbB+V&B!~DKh>Kc1EyPH+!{J;Y z0NzRlE{Nfl3GSmr5`gwPJgTY|+pp-@l}Yy&M8fac5CIx|1fqKG5H)g!=+%$g#-~~H z4bx1mWtnF!B+fL?PP5H3b)B{J7o_$76Ky!`$1Fy2=F6#{gNX*ISyt6L{E?83b2j%) zt@-N_fs?A?xV7>J=_DVJu++jM3ft+ghvXH1AJMzqA%bF(hkir^O@s|=t>{QLUTf8p zHxyee(ChcK*^8~vd1@5w3kb{{&@4x^41}dJ?{9D4UBAD5_fzNd-BokL0nU0&Z9qk(sZ9A~Ql94}Wzwvw%WS@_ zGh0wxq_nLJWd&7sTPCKRnP){@KGVXMdDWp^Rwn#JHRWS^2%uW5_z>Qw;tH>^n#1fk#dRx_~ zsg6OIk>k02GC(~Da?t>SpTgEzVmgS)Dq5pr20A5gtNfZ7WJ%U>mYeb@)ql}J+B0#E zbWm}+g?9C-c}eMiV1)LtT>LQU)F#{96m=^o2|zVBUS7xj*P!d1Y1RBcSc-oxIEO+XWAmGK%?V~C9>+>(O`#$=8v7D>NT8e`l0r8fl7Z__JQ)l+1P}_sh*5kwk`Y3q zu+!##xs}2`jf8TCKyrH0m(i@v*_Tm(d<@b@PKU;hiljU79Yy1b8i!gC7wAdt`i&z; z!n*+pBqs47f{66c@qJFp5T}~MX&@9=ab7U>1gJVaU+j~iUQa6FMqJln#4solN`k20 zAw3qZFLliyf=}1PC zNYEe*y;gZG)Pr<|{>T`9$nEIUL<{KeIg!)m2Mn~+ADK&Uq9v;c;*n5lGLB>zT%zw& zXrx+U9BlVm#lrxf)*_*rF)%CAHl#z-p@5QTeX!TfVQDlBm{iC}Q>n!z8Yn?<09fY2*{2Rt!#_yRUIn@R@XXUt91SMfC&zmLj7Q-wZ8T%R z7g`={)Qad14?Q^kANQL$`4le=A1jC3h3?}mezTINKHpvcK=)scRytiYSZU~fjRUs8 z?~G?v*P9RB?ryicu^UXbH_44Hm)%29)$M8T`p0W`9rJBN5snzl(3cs155~j+Tzq0w sJZHd5{QukeO=9zIW#-@SPo??cQ0n43TKw_%>sNn%``z!azWMFqUoONlFaQ7m diff --git a/core/vendor/sebastian/diff/tests/LCS/TimeEfficientImplementationTest.php b/core/vendor/sebastian/diff/tests/LCS/TimeEfficientImplementationTest.php new file mode 100644 index 0000000..babc407 --- /dev/null +++ b/core/vendor/sebastian/diff/tests/LCS/TimeEfficientImplementationTest.php @@ -0,0 +1,175 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\Diff\LCS; + +use PHPUnit_Framework_TestCase; + +/** + * Some of these tests are volontary stressfull, in order to give some approximative benchmark hints. + */ +class TimeEfficientImplementationTest extends PHPUnit_Framework_TestCase +{ + private $implementation; + private $memory_limit; + private $stress_sizes = array(1, 2, 3, 100, 500, 1000, 2000); + + protected function setUp() + { + $this->memory_limit = ini_get('memory_limit'); + ini_set('memory_limit', '256M'); + + $this->implementation = new TimeEfficientImplementation; + } + + protected function tearDown() + { + ini_set('memory_limit', $this->memory_limit); + } + + public function testBothEmpty() + { + $from = array(); + $to = array(); + $common = $this->implementation->calculate($from, $to); + + $this->assertEquals(array(), $common); + } + + public function testIsStrictComparison() + { + $from = array( + false, 0, 0.0, '', null, array(), + true, 1, 1.0, 'foo', array('foo', 'bar'), array('foo' => 'bar') + ); + $to = $from; + $common = $this->implementation->calculate($from, $to); + + $this->assertEquals($from, $common); + + $to = array( + false, false, false, false, false, false, + true, true, true, true, true, true + ); + $expected = array( + false, + true, + ); + $common = $this->implementation->calculate($from, $to); + + $this->assertEquals($expected, $common); + } + + public function testEqualSequences() + { + foreach ($this->stress_sizes as $size) { + $range = range(1, $size); + $from = $range; + $to = $range; + $common = $this->implementation->calculate($from, $to); + + $this->assertEquals($range, $common); + } + } + + public function testDistinctSequences() + { + $from = array('A'); + $to = array('B'); + $common = $this->implementation->calculate($from, $to); + $this->assertEquals(array(), $common); + + $from = array('A', 'B', 'C'); + $to = array('D', 'E', 'F'); + $common = $this->implementation->calculate($from, $to); + $this->assertEquals(array(), $common); + + foreach ($this->stress_sizes as $size) { + $from = range(1, $size); + $to = range($size + 1, $size * 2); + $common = $this->implementation->calculate($from, $to); + $this->assertEquals(array(), $common); + } + } + + public function testCommonSubsequence() + { + $from = array('A', 'C', 'E', 'F', 'G' ); + $to = array('A', 'B', 'D', 'E', 'H'); + $expected = array('A', 'E' ); + $common = $this->implementation->calculate($from, $to); + $this->assertEquals($expected, $common); + + $from = array('A', 'C', 'E', 'F', 'G' ); + $to = array( 'B', 'C', 'D', 'E', 'F', 'H'); + $expected = array('C', 'E', 'F' ); + $common = $this->implementation->calculate($from, $to); + $this->assertEquals($expected, $common); + + foreach ($this->stress_sizes as $size) { + $from = $size < 2 ? array(1) : range(1, $size + 1, 2); + $to = $size < 3 ? array(1) : range(1, $size + 1, 3); + $expected = $size < 6 ? array(1) : range(1, $size + 1, 6); + $common = $this->implementation->calculate($from, $to); + + $this->assertEquals($expected, $common); + } + } + + public function testSingleElementSubsequenceAtStart() + { + foreach ($this->stress_sizes as $size) { + $from = range(1, $size); + $to = array_slice($from, 0, 1); + $common = $this->implementation->calculate($from, $to); + + $this->assertEquals($to, $common); + } + } + + public function testSingleElementSubsequenceAtMiddle() + { + foreach ($this->stress_sizes as $size) { + $from = range(1, $size); + $to = array_slice($from, (int) $size / 2, 1); + $common = $this->implementation->calculate($from, $to); + + $this->assertEquals($to, $common); + } + } + + public function testSingleElementSubsequenceAtEnd() + { + foreach ($this->stress_sizes as $size) { + $from = range(1, $size); + $to = array_slice($from, $size - 1, 1); + $common = $this->implementation->calculate($from, $to); + + $this->assertEquals($to, $common); + } + } + + public function testReversedSequences() + { + $from = array('A', 'B'); + $to = array('B', 'A'); + $expected = array('A'); + $common = $this->implementation->calculate($from, $to); + $this->assertEquals($expected, $common); + + foreach ($this->stress_sizes as $size) { + $from = range(1, $size); + $to = array_reverse($from); + $common = $this->implementation->calculate($from, $to); + + $this->assertEquals(array(1), $common); + } + } +} diff --git a/core/vendor/sebastian/diff/tests/ParserTest.php b/core/vendor/sebastian/diff/tests/ParserTest.php new file mode 100644 index 0000000..3a7b972 --- /dev/null +++ b/core/vendor/sebastian/diff/tests/ParserTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\Diff; + +use PHPUnit_Framework_TestCase; + +class ParserTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Parser + */ + private $parser; + + protected function setUp() + { + $this->parser = new Parser; + } + + public function testParse() + { + $content = file_get_contents(__DIR__ . '/fixtures/patch.txt'); + + $diffs = $this->parser->parse($content); + + $this->assertCount(1, $diffs); + + $chunks = $diffs[0]->getChunks(); + $this->assertCount(1, $chunks); + + $this->assertEquals(20, $chunks[0]->getStart()); + + $this->assertCount(5, $chunks[0]->getLines()); + } + + public function testParseWithMultipleChunks() + { + $content = file_get_contents(__DIR__ . '/fixtures/patch2.txt'); + + $diffs = $this->parser->parse($content); + + $this->assertCount(1, $diffs); + + $chunks = $diffs[0]->getChunks(); + $this->assertCount(3, $chunks); + + $this->assertEquals(20, $chunks[0]->getStart()); + $this->assertEquals(320, $chunks[1]->getStart()); + $this->assertEquals(600, $chunks[2]->getStart()); + + $this->assertCount(5, $chunks[0]->getLines()); + $this->assertCount(5, $chunks[1]->getLines()); + $this->assertCount(5, $chunks[2]->getLines()); + } +} diff --git a/core/vendor/sebastian/diff/tests/fixtures/patch.txt b/core/vendor/sebastian/diff/tests/fixtures/patch.txt new file mode 100644 index 0000000..144b61d --- /dev/null +++ b/core/vendor/sebastian/diff/tests/fixtures/patch.txt @@ -0,0 +1,9 @@ +diff --git a/Foo.php b/Foo.php +index abcdefg..abcdefh 100644 +--- a/Foo.php ++++ b/Foo.php +@@ -20,4 +20,5 @@ class Foo + const ONE = 1; + const TWO = 2; ++ const THREE = 3; + const FOUR = 4; diff --git a/core/vendor/sebastian/diff/tests/fixtures/patch2.txt b/core/vendor/sebastian/diff/tests/fixtures/patch2.txt new file mode 100644 index 0000000..41fbc95 --- /dev/null +++ b/core/vendor/sebastian/diff/tests/fixtures/patch2.txt @@ -0,0 +1,21 @@ +diff --git a/Foo.php b/Foo.php +index abcdefg..abcdefh 100644 +--- a/Foo.php ++++ b/Foo.php +@@ -20,4 +20,5 @@ class Foo + const ONE = 1; + const TWO = 2; ++ const THREE = 3; + const FOUR = 4; + +@@ -320,4 +320,5 @@ class Foo + const A = 'A'; + const B = 'B'; ++ const C = 'C'; + const D = 'D'; + +@@ -600,4 +600,5 @@ class Foo + public function doSomething() { + ++ return 'foo'; + } diff --git a/core/vendor/sebastian/environment/LICENSE b/core/vendor/sebastian/environment/LICENSE index f2eec04..08539af 100644 --- a/core/vendor/sebastian/environment/LICENSE +++ b/core/vendor/sebastian/environment/LICENSE @@ -1,6 +1,6 @@ Environment -Copyright (c) 2014, Sebastian Bergmann . +Copyright (c) 2014-2015, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/vendor/sebastian/environment/composer.json b/core/vendor/sebastian/environment/composer.json index 15d8188..fd3ec7d 100644 --- a/core/vendor/sebastian/environment/composer.json +++ b/core/vendor/sebastian/environment/composer.json @@ -14,7 +14,7 @@ "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": "~4.4" }, "autoload": { "classmap": [ @@ -23,7 +23,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } } } diff --git a/core/vendor/sebastian/environment/src/Console.php b/core/vendor/sebastian/environment/src/Console.php index 3c7b7f9..287bce1 100644 --- a/core/vendor/sebastian/environment/src/Console.php +++ b/core/vendor/sebastian/environment/src/Console.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Environment package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Environment - * @author Sebastian Bergmann - * @copyright 2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/environment + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Environment; @@ -52,6 +19,10 @@ */ class Console { + const STDIN = 0; + const STDOUT = 1; + const STDERR = 2; + /** * Returns true if STDOUT supports colorization. * @@ -66,7 +37,11 @@ public function hasColorSupport() return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); } - return function_exists('posix_isatty') && @posix_isatty(STDOUT); + if (!defined('STDOUT')) { + return false; + } + + return $this->isInteractive(STDOUT); } /** @@ -82,6 +57,10 @@ public function getNumberOfColumns() return 79; } + if (!$this->isInteractive(self::STDIN)) { + return 80; + } + if (preg_match('#\d+ (\d+)#', shell_exec('stty size'), $match) === 1) { return (int) $match[1]; } @@ -92,4 +71,16 @@ public function getNumberOfColumns() return 80; } + + /** + * Returns if the file descriptor is an interactive terminal or not. + * + * @param int|resource $fileDescriptor + * + * @return boolean + */ + public function isInteractive($fileDescriptor = self::STDOUT) + { + return function_exists('posix_isatty') && @posix_isatty($fileDescriptor); + } } diff --git a/core/vendor/sebastian/environment/src/Runtime.php b/core/vendor/sebastian/environment/src/Runtime.php index b241ca0..74f6e2c 100644 --- a/core/vendor/sebastian/environment/src/Runtime.php +++ b/core/vendor/sebastian/environment/src/Runtime.php @@ -1,44 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. +/* + * This file is part of the Environment package. * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * (c) Sebastian Bergmann * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Environment - * @author Sebastian Bergmann - * @copyright 2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/environment + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Environment; @@ -48,7 +15,7 @@ * * @package Environment * @author Sebastian Bergmann - * @copyright 2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://www.github.com/sebastianbergmann/environment */ diff --git a/core/vendor/sebastian/environment/tests/ConsoleTest.php b/core/vendor/sebastian/environment/tests/ConsoleTest.php index cb80a62..6b40172 100644 --- a/core/vendor/sebastian/environment/tests/ConsoleTest.php +++ b/core/vendor/sebastian/environment/tests/ConsoleTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Environment - * @author Sebastian Bergmann - * @copyright 2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/environment + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Environment; @@ -58,7 +25,24 @@ protected function setUp() } /** + * @covers \SebastianBergmann\Environment\Console::isInteractive + */ + public function testCanDetectIfStdoutIsInteractiveByDefault() + { + $this->assertInternalType('boolean', $this->console->isInteractive()); + } + + /** + * @covers \SebastianBergmann\Environment\Console::isInteractive + */ + public function testCanDetectIfFileDescriptorIsInteractive() + { + $this->assertInternalType('boolean', $this->console->isInteractive(STDOUT)); + } + + /** * @covers \SebastianBergmann\Environment\Console::hasColorSupport + * @uses \SebastianBergmann\Environment\Console::isInteractive */ public function testCanDetectColorSupport() { @@ -66,7 +50,8 @@ public function testCanDetectColorSupport() } /** - * @covers \SebastianBergmann\Environment\Console::hasColorSupport + * @covers \SebastianBergmann\Environment\Console::getNumberOfColumns + * @uses \SebastianBergmann\Environment\Console::isInteractive */ public function testCanDetectNumberOfColumns() { diff --git a/core/vendor/sebastian/environment/tests/RuntimeTest.php b/core/vendor/sebastian/environment/tests/RuntimeTest.php index e86d6fa..8ea8373 100644 --- a/core/vendor/sebastian/environment/tests/RuntimeTest.php +++ b/core/vendor/sebastian/environment/tests/RuntimeTest.php @@ -1,44 +1,11 @@ . - * All rights reserved. + * (c) Sebastian Bergmann * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Environment - * @author Sebastian Bergmann - * @copyright 2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/environment + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Environment; diff --git a/core/vendor/sebastian/exporter/LICENSE b/core/vendor/sebastian/exporter/LICENSE index 008d9c0..55a13d4 100644 --- a/core/vendor/sebastian/exporter/LICENSE +++ b/core/vendor/sebastian/exporter/LICENSE @@ -1,6 +1,6 @@ Exporter -Copyright (c) 2002-2014, Sebastian Bergmann . +Copyright (c) 2002-2015, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/vendor/sebastian/exporter/composer.json b/core/vendor/sebastian/exporter/composer.json index a418eb7..723596e 100644 --- a/core/vendor/sebastian/exporter/composer.json +++ b/core/vendor/sebastian/exporter/composer.json @@ -27,10 +27,11 @@ } ], "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.4" }, "autoload": { "classmap": [ @@ -39,7 +40,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } } } diff --git a/core/vendor/sebastian/exporter/phpunit.xml.dist b/core/vendor/sebastian/exporter/phpunit.xml.dist index 15fb748..8d85af6 100644 --- a/core/vendor/sebastian/exporter/phpunit.xml.dist +++ b/core/vendor/sebastian/exporter/phpunit.xml.dist @@ -1,16 +1,19 @@ - + tests - + src diff --git a/core/vendor/sebastian/exporter/src/Context.php b/core/vendor/sebastian/exporter/src/Context.php deleted file mode 100644 index 10b1a5f..0000000 --- a/core/vendor/sebastian/exporter/src/Context.php +++ /dev/null @@ -1,199 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Exporter - * @author Sebastian Bergmann - * @author Adam Harvey - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link https://github.com/sebastianbergmann/exporter - */ - -namespace SebastianBergmann\Exporter; - -/** - * A context containing previously rendered arrays and objects when recursively - * exporting a value. - * - * @package Exporter - * @author Sebastian Bergmann - * @author Adam Harvey - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link https://github.com/sebastianbergmann/exporter - */ -class Context { - /** - * Previously seen arrays. - * - * @var array[] $arrays - */ - protected $arrays = array(); - - /** - * Previously seen objects. - * - * @var SplObjectStorage $objects - */ - protected $objects; - - /** Initialises the context. */ - public function __construct() - { - $this->arrays = array(); - $this->objects = new \SplObjectStorage; - } - - /** - * Adds a value to the export context. - * - * @param mixed $value The value to add. - * @return mixed The ID of the stored value, either as a string or integer. - * @throws SebastianBergmann\Exporter\Exception Thrown if $value is not an array or object. - */ - public function add(&$value) - { - if (is_array($value)) { - return $this->addArray($value); - } - - else if (is_object($value)) { - return $this->addObject($value); - } - - throw new Exception( - 'Only arrays and objects are supported' - ); - } - - /** - * Checks if the given value exists within the context. - * - * @param mixed $value The value to check. - * @return mixed The string or integer ID of the stored value if it has - * already been seen, or boolean false if the value is not - * stored. - * @throws SebastianBergmann\Exporter\Exception Thrown if $value is not an array or object. - */ - public function contains(&$value) - { - if (is_array($value)) { - return $this->containsArray($value); - } - - else if (is_object($value)) { - return $this->containsObject($value); - } - - throw new Exception( - 'Only arrays and objects are supported' - ); - } - - /** - * Stores an array within the context. - * - * @param array $value The value to store. - * @return integer The internal ID of the array. - */ - protected function addArray(array &$value) - { - if (($key = $this->containsArray($value)) !== FALSE) { - return $key; - } - - $this->arrays[] = &$value; - - return count($this->arrays) - 1; - } - - /** - * Stores an object within the context. - * - * @param object $value - * @return string The ID of the object. - */ - protected function addObject($value) - { - if (!$this->objects->contains($value)) { - $this->objects->attach($value); - } - - return spl_object_hash($value); - } - - /** - * Checks if the given array exists within the context. - * - * @param array $value The array to check. - * @return mixed The integer ID of the array if it exists, or boolean false - * otherwise. - */ - protected function containsArray(array &$value) - { - $keys = array_keys($this->arrays, $value, TRUE); - $gen = '_Exporter_Key_'.hash('sha512', microtime(TRUE)); - - foreach ($keys as $key) { - $this->arrays[$key][$gen] = $gen; - - if (isset($value[$gen]) && $value[$gen] === $gen) { - unset($this->arrays[$key][$gen]); - return $key; - } - - unset($this->arrays[$key][$gen]); - } - - return FALSE; - } - - /** - * Checks if the given object exists within the context. - * - * @param object $value The object to check. - * @return mixed The string ID of the object if it exists, or boolean false - * otherwise. - */ - protected function containsObject($value) - { - if ($this->objects->contains($value)) { - return spl_object_hash($value); - } - - return FALSE; - } -} diff --git a/core/vendor/sebastian/exporter/src/Exception.php b/core/vendor/sebastian/exporter/src/Exception.php deleted file mode 100644 index c198a38..0000000 --- a/core/vendor/sebastian/exporter/src/Exception.php +++ /dev/null @@ -1,57 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package Exporter - * @author Sebastian Bergmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link https://github.com/sebastianbergmann/exporter - */ - -namespace SebastianBergmann\Exporter; - -/** - * Exception for Exporter runtime errors. - * - * @package Exporter - * @author Sebastian Bergmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link https://github.com/sebastianbergmann/exporter - */ -class Exception extends \RuntimeException -{ -} diff --git a/core/vendor/sebastian/exporter/src/Exporter.php b/core/vendor/sebastian/exporter/src/Exporter.php index b661f9e..47208f3 100644 --- a/core/vendor/sebastian/exporter/src/Exporter.php +++ b/core/vendor/sebastian/exporter/src/Exporter.php @@ -1,48 +1,17 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Exporter package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Exporter - * @author Sebastian Bergmann - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link https://github.com/sebastianbergmann/exporter + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Exporter; +use SebastianBergmann\RecursionContext\Context; + /** * A nifty utility for visualizing PHP variables. * @@ -56,7 +25,7 @@ * * @package Exporter * @author Sebastian Bergmann - * @copyright 2001-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link https://github.com/sebastianbergmann/exporter */ @@ -85,110 +54,41 @@ public function export($value, $indentation = 0) } /** - * Recursive implementation of export - * - * @param mixed $value The value to export - * @param integer $indentation The indentation level of the 2nd+ line - * @param SebastianBergmann\Exporter\Context $processed Contains all objects and arrays that have previously been rendered + * @param mixed $data + * @param Context $context * @return string - * @see SebastianBergmann\Exporter\Exporter::export */ - protected function recursiveExport(&$value, $indentation, $processed = NULL) + public function shortenedRecursiveExport(&$data, Context $context = null) { - if ($value === NULL) { - return 'null'; - } - - if ($value === TRUE) { - return 'true'; - } + $result = array(); + $exporter = new Exporter(); - if ($value === FALSE) { - return 'false'; + if (!$context) { + $context = new Context; } - if (is_float($value) && floatval(intval($value)) === $value) { - return "$value.0"; - } + $context->add($data); - if (is_resource($value)) { - return sprintf( - 'resource(%d) of type (%s)', - $value, - get_resource_type($value) - ); - } - - if (is_string($value)) { - // Match for most non printable chars somewhat taking multibyte chars into account - if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) { - return 'Binary String: 0x' . bin2hex($value); - } - - return "'" . - str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) . - "'"; - } - - $whitespace = str_repeat(' ', 4 * $indentation); - - if (!$processed) { - $processed = new Context; - } - - if (is_array($value)) { - if (($key = $processed->contains($value)) !== FALSE) { - return 'Array &' . $key; - } - - $key = $processed->add($value); - $values = ''; - - if (count($value) > 0) { - foreach ($value as $k => $v) { - $values .= sprintf( - '%s %s => %s' . "\n", - $whitespace, - $this->recursiveExport($k, $indentation), - $this->recursiveExport($value[$k], $indentation + 1, $processed) - ); + foreach ($data as $key => $value) { + if (is_array($value)) { + if ($context->contains($data[$key]) !== false) { + $result[] = '*RECURSION*'; } - $values = "\n" . $values . $whitespace; - } - - return sprintf('Array &%s (%s)', $key, $values); - } - - if (is_object($value)) { - $class = get_class($value); - - if ($hash = $processed->contains($value)) { - return sprintf('%s Object &%s', $class, $hash); - } - - $hash = $processed->add($value); - $values = ''; - - $array = $this->toArray($value); - - if (count($array) > 0) { - foreach ($array as $k => $v) { - $values .= sprintf( - '%s %s => %s' . "\n", - $whitespace, - $this->recursiveExport($k, $indentation), - $this->recursiveExport($v, $indentation + 1, $processed) + else { + $result[] = sprintf( + 'array(%s)', + $this->shortenedRecursiveExport($data[$key], $context) ); } - - $values = "\n" . $values . $whitespace; } - return sprintf('%s Object &%s (%s)', $class, $hash, $values); + else { + $result[] = $exporter->shortenedExport($value); + } } - return var_export($value, TRUE); + return join(', ', $result); } /** @@ -219,16 +119,16 @@ public function shortenedExport($value) if (is_object($value)) { return sprintf( - '%s Object (%s)', - get_class($value), - count($this->toArray($value)) > 0 ? '...' : '' + '%s Object (%s)', + get_class($value), + count($this->toArray($value)) > 0 ? '...' : '' ); } if (is_array($value)) { return sprintf( - 'Array (%s)', - count($value) > 0 ? '...' : '' + 'Array (%s)', + count($value) > 0 ? '...' : '' ); } @@ -252,11 +152,9 @@ public function toArray($value) foreach ((array)$value as $key => $val) { // properties are transformed to keys in the following way: - // private $property => "\0Classname\0property" // protected $property => "\0*\0property" // public $property => "property" - if (preg_match('/^\0.+\0(.+)$/', $key, $matches)) { $key = $matches[1]; } @@ -276,13 +174,15 @@ public function toArray($value) // However, the fast method does work in HHVM, and exposes the // internal implementation. Hide it again. if (property_exists('\SplObjectStorage', '__storage')) { - unset($array['__storage']); - } else if (property_exists('\SplObjectStorage', 'storage')) { - unset($array['storage']); + unset($array['__storage']); + } elseif (property_exists('\SplObjectStorage', 'storage')) { + unset($array['storage']); } + if (property_exists('\SplObjectStorage', '__key')) { - unset($array['__key']); + unset($array['__key']); } + foreach ($value as $key => $val) { $array[spl_object_hash($val)] = array( 'obj' => $val, @@ -293,4 +193,110 @@ public function toArray($value) return $array; } + + /** + * Recursive implementation of export + * + * @param mixed $value The value to export + * @param integer $indentation The indentation level of the 2nd+ line + * @param \SebastianBergmann\RecursionContext\Context $processed Previously processed objects + * @return string + * @see SebastianBergmann\Exporter\Exporter::export + */ + protected function recursiveExport(&$value, $indentation, $processed = null) + { + if ($value === null) { + return 'null'; + } + + if ($value === true) { + return 'true'; + } + + if ($value === false) { + return 'false'; + } + + if (is_float($value) && floatval(intval($value)) === $value) { + return "$value.0"; + } + + if (is_resource($value)) { + return sprintf( + 'resource(%d) of type (%s)', + $value, + get_resource_type($value) + ); + } + + if (is_string($value)) { + // Match for most non printable chars somewhat taking multibyte chars into account + if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) { + return 'Binary String: 0x' . bin2hex($value); + } + + return "'" . + str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) . + "'"; + } + + $whitespace = str_repeat(' ', 4 * $indentation); + + if (!$processed) { + $processed = new Context; + } + + if (is_array($value)) { + if (($key = $processed->contains($value)) !== false) { + return 'Array &' . $key; + } + + $key = $processed->add($value); + $values = ''; + + if (count($value) > 0) { + foreach ($value as $k => $v) { + $values .= sprintf( + '%s %s => %s' . "\n", + $whitespace, + $this->recursiveExport($k, $indentation), + $this->recursiveExport($value[$k], $indentation + 1, $processed) + ); + } + + $values = "\n" . $values . $whitespace; + } + + return sprintf('Array &%s (%s)', $key, $values); + } + + if (is_object($value)) { + $class = get_class($value); + + if ($hash = $processed->contains($value)) { + return sprintf('%s Object &%s', $class, $hash); + } + + $hash = $processed->add($value); + $values = ''; + $array = $this->toArray($value); + + if (count($array) > 0) { + foreach ($array as $k => $v) { + $values .= sprintf( + '%s %s => %s' . "\n", + $whitespace, + $this->recursiveExport($k, $indentation), + $this->recursiveExport($v, $indentation + 1, $processed) + ); + } + + $values = "\n" . $values . $whitespace; + } + + return sprintf('%s Object &%s (%s)', $class, $hash, $values); + } + + return var_export($value, true); + } } diff --git a/core/vendor/sebastian/exporter/tests/ExporterTest.php b/core/vendor/sebastian/exporter/tests/ExporterTest.php index 85d2624..6b590bf 100644 --- a/core/vendor/sebastian/exporter/tests/ExporterTest.php +++ b/core/vendor/sebastian/exporter/tests/ExporterTest.php @@ -1,59 +1,23 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Exporter package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Exporter - * @author Sebastian Bergmann - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link https://github.com/sebastianbergmann/exporter + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann\Exporter; /** - * @package Exporter - * @author Sebastian Bergmann - * @author Bernhard Schussek - * @copyright 2001-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link https://github.com/sebastianbergmann/exporter + * @covers SebastianBergmann\Exporter\Exporter */ class ExporterTest extends \PHPUnit_Framework_TestCase { + /** + * @var Exporter + */ private $exporter; protected function setUp() @@ -70,9 +34,9 @@ public function exportProvider() $obj = new \stdClass; //@codingStandardsIgnoreStart - $obj->null = NULL; + $obj->null = null; //@codingStandardsIgnoreEnd - $obj->boolean = TRUE; + $obj->boolean = true; $obj->integer = 1; $obj->double = 1.2; $obj->string = '1'; @@ -87,15 +51,16 @@ public function exportProvider() $storage->foo = $obj2; return array( - array(NULL, 'null'), - array(TRUE, 'true'), + array(null, 'null'), + array(true, 'true'), + array(false, 'false'), array(1, '1'), array(1.0, '1.0'), array(1.2, '1.2'), array(fopen('php://memory', 'r'), 'resource(%d) of type (stream)'), array('1', "'1'"), array(array(array(1,2,3), array(3,4,5)), -<< Array &1 ( 0 => 1 @@ -112,7 +77,7 @@ public function exportProvider() ), // \n\r and \r is converted to \n array("this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext", -<< null 'boolean' => true @@ -159,7 +124,7 @@ public function exportProvider() ), array(array(), 'Array &%d ()'), array($storage, -<< stdClass Object &%x ( 'foo' => 'bar' @@ -172,7 +137,7 @@ public function exportProvider() EOF ), array($obj3, -<< 1 1 => 2 @@ -210,7 +175,8 @@ public function exportProvider() public function testExport($value, $expected) { $this->assertStringMatchesFormat( - $expected, $this->trimnl($this->exporter->export($value)) + $expected, + $this->trimNewline($this->exporter->export($value)) ); } @@ -225,8 +191,8 @@ public function testExport2() $array = array( 0 => 0, - 'null' => NULL, - 'boolean' => TRUE, + 'null' => null, + 'boolean' => true, 'integer' => 1, 'double' => 1.2, 'string' => '1', @@ -293,7 +259,8 @@ public function testExport2() EOF; $this->assertStringMatchesFormat( - $expected, $this->trimnl($this->exporter->export($array)) + $expected, + $this->trimNewline($this->exporter->export($array)) ); } @@ -307,8 +274,8 @@ public function shortenedExportProvider() ); return array( - array(NULL, 'null'), - array(TRUE, 'true'), + array(null, 'null'), + array(true, 'true'), array(1, '1'), array(1.0, '1.0'), array(1.2, '1.2'), @@ -328,8 +295,8 @@ public function shortenedExportProvider() public function testShortenedExport($value, $expected) { $this->assertSame( - $expected, - $this->trimnl($this->exporter->shortenedExport($value)) + $expected, + $this->trimNewline($this->exporter->shortenedExport($value)) ); } @@ -349,11 +316,17 @@ public function provideNonBinaryMultibyteStrings() public function testNonBinaryStringExport($value, $expectedLength) { $this->assertRegExp( - "~'.{{$expectedLength}}'\$~s", $this->exporter->export($value) + "~'.{{$expectedLength}}'\$~s", + $this->exporter->export($value) ); } - protected function trimnl($string) + public function testNonObjectCanBeReturnedAsArray() + { + $this->assertEquals(array(true), $this->exporter->toArray(true)); + } + + private function trimNewline($string) { return preg_replace('/[ ]*\n/', "\n", $string); } diff --git a/core/vendor/sebastian/recursion-context/.gitignore b/core/vendor/sebastian/recursion-context/.gitignore new file mode 100644 index 0000000..3beb10f --- /dev/null +++ b/core/vendor/sebastian/recursion-context/.gitignore @@ -0,0 +1,9 @@ +.idea +phpunit.xml +composer.lock +composer.phar +vendor/ +cache.properties +build/LICENSE +build/README.md +build/*.tgz diff --git a/core/vendor/sebastian/diff/.travis.yml b/core/vendor/sebastian/recursion-context/.travis.yml similarity index 79% copy from core/vendor/sebastian/diff/.travis.yml copy to core/vendor/sebastian/recursion-context/.travis.yml index 4309f78..f239e93 100644 --- a/core/vendor/sebastian/diff/.travis.yml +++ b/core/vendor/sebastian/recursion-context/.travis.yml @@ -1,9 +1,5 @@ language: php -before_script: - - composer self-update - - composer install --no-interaction --prefer-source --dev - php: - 5.3.3 - 5.3 @@ -11,6 +7,15 @@ php: - 5.5 - 5.6 - hhvm + - hhvm-nightly + +sudo: false + +before_script: + - composer self-update + - composer install --no-interaction --prefer-source --dev + +script: ./vendor/bin/phpunit notifications: email: false diff --git a/core/vendor/phpunit/php-token-stream/LICENSE b/core/vendor/sebastian/recursion-context/LICENSE similarity index 94% copy from core/vendor/phpunit/php-token-stream/LICENSE copy to core/vendor/sebastian/recursion-context/LICENSE index 3138cf7..f8c30c2 100644 --- a/core/vendor/phpunit/php-token-stream/LICENSE +++ b/core/vendor/sebastian/recursion-context/LICENSE @@ -1,6 +1,6 @@ -PHP_TokenStream +Recursion Context -Copyright (c) 2009-2014, Sebastian Bergmann . +Copyright (c) 2002-2015, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/vendor/sebastian/recursion-context/README.md b/core/vendor/sebastian/recursion-context/README.md new file mode 100644 index 0000000..bd43985 --- /dev/null +++ b/core/vendor/sebastian/recursion-context/README.md @@ -0,0 +1,13 @@ +# Recursion Context + +... + +## Installation + +To add Recursion Context as a local, per-project dependency to your project, simply add a dependency on `sebastian/recursion-context` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on Recursion Context 1.0: + + { + "require": { + "sebastian/recursion-context": "~1.0" + } + } diff --git a/core/vendor/sebastian/recursion-context/build.xml b/core/vendor/sebastian/recursion-context/build.xml new file mode 100644 index 0000000..b4fd193 --- /dev/null +++ b/core/vendor/sebastian/recursion-context/build.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/vendor/sebastian/exporter/composer.json b/core/vendor/sebastian/recursion-context/composer.json similarity index 55% copy from core/vendor/sebastian/exporter/composer.json copy to core/vendor/sebastian/recursion-context/composer.json index a418eb7..fed033d 100644 --- a/core/vendor/sebastian/exporter/composer.json +++ b/core/vendor/sebastian/recursion-context/composer.json @@ -1,8 +1,7 @@ { - "name": "sebastian/exporter", - "description": "Provides the functionality to export PHP variables for visualization", - "keywords": ["exporter","export"], - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "name": "sebastian/recursion-context", + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "license": "BSD-3-Clause", "authors": [ { @@ -14,23 +13,15 @@ "email": "whatthejeff@gmail.com" }, { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { "name": "Adam Harvey", "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" } ], "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.4" }, "autoload": { "classmap": [ @@ -43,4 +34,3 @@ } } } - diff --git a/core/vendor/sebastian/recursion-context/phpunit.xml.dist b/core/vendor/sebastian/recursion-context/phpunit.xml.dist new file mode 100644 index 0000000..757e3e6 --- /dev/null +++ b/core/vendor/sebastian/recursion-context/phpunit.xml.dist @@ -0,0 +1,20 @@ + + + + + tests + + + + + src + + + diff --git a/core/vendor/sebastian/recursion-context/src/Context.php b/core/vendor/sebastian/recursion-context/src/Context.php new file mode 100644 index 0000000..b431e07 --- /dev/null +++ b/core/vendor/sebastian/recursion-context/src/Context.php @@ -0,0 +1,158 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\RecursionContext; + +/** + * A context containing previously processed arrays and objects + * when recursively processing a value. + * + * @author Sebastian Bergmann + * @author Adam Harvey + * @copyright Sebastian Bergmann + * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License + * @link https://github.com/sebastianbergmann/recursion-context + */ +final class Context +{ + /** + * @var array[] + */ + private $arrays; + + /** + * @var \SplObjectStorage + */ + private $objects; + + /** + * Initialises the context + */ + public function __construct() + { + $this->arrays = array(); + $this->objects = new \SplObjectStorage; + } + + /** + * Adds a value to the context. + * + * @param array|object $value The value to add. + * @return integer|string The ID of the stored value, either as + * a string or integer. + * @throws InvalidArgumentException Thrown if $value is not an array or + * object + */ + public function add(&$value) + { + if (is_array($value)) { + return $this->addArray($value); + } + + else if (is_object($value)) { + return $this->addObject($value); + } + + throw new InvalidArgumentException( + 'Only arrays and objects are supported' + ); + } + + /** + * Checks if the given value exists within the context. + * + * @param array|object $value The value to check. + * @return integer|string|false The string or integer ID of the stored + * value if it has already been seen, or + * false if the value is not stored. + * @throws InvalidArgumentException Thrown if $value is not an array or + * object + */ + public function contains(&$value) + { + if (is_array($value)) { + return $this->containsArray($value); + } + + else if (is_object($value)) { + return $this->containsObject($value); + } + + throw new InvalidArgumentException( + 'Only arrays and objects are supported' + ); + } + + /** + * @param array $array + * @return bool|int + */ + private function addArray(array &$array) + { + $key = $this->containsArray($array); + + if ($key !== false) { + return $key; + } + + $this->arrays[] = &$array; + + return count($this->arrays) - 1; + } + + /** + * @param object $object + * @return string + */ + private function addObject($object) + { + if (!$this->objects->contains($object)) { + $this->objects->attach($object); + } + + return spl_object_hash($object); + } + + /** + * @param array $array + * @return integer|false + */ + private function containsArray(array &$array) + { + $keys = array_keys($this->arrays, $array, true); + $hash = '_Key_' . hash('sha512', microtime(true)); + + foreach ($keys as $key) { + $this->arrays[$key][$hash] = $hash; + + if (isset($array[$hash]) && $array[$hash] === $hash) { + unset($this->arrays[$key][$hash]); + return $key; + } + + unset($this->arrays[$key][$hash]); + } + + return false; + } + + /** + * @param object $value + * @return string|false + */ + private function containsObject($value) + { + if ($this->objects->contains($value)) { + return spl_object_hash($value); + } + + return false; + } +} diff --git a/core/vendor/sebastian/recursion-context/src/Exception.php b/core/vendor/sebastian/recursion-context/src/Exception.php new file mode 100644 index 0000000..0986cc2 --- /dev/null +++ b/core/vendor/sebastian/recursion-context/src/Exception.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\RecursionContext; + +/** + * @author Sebastian Bergmann + * @author Adam Harvey + * @copyright Sebastian Bergmann + * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License + * @link https://github.com/sebastianbergmann/recursion-context + */ +interface Exception +{ +} diff --git a/core/vendor/sebastian/recursion-context/src/InvalidArgumentException.php b/core/vendor/sebastian/recursion-context/src/InvalidArgumentException.php new file mode 100644 index 0000000..6c1f46b --- /dev/null +++ b/core/vendor/sebastian/recursion-context/src/InvalidArgumentException.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\RecursionContext; + +/** + * @author Sebastian Bergmann + * @author Adam Harvey + * @copyright Sebastian Bergmann + * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License + * @link https://github.com/sebastianbergmann/recursion-context + */ +final class InvalidArgumentException extends \InvalidArgumentException implements Exception +{ +} diff --git a/core/vendor/sebastian/recursion-context/tests/ContextTest.php b/core/vendor/sebastian/recursion-context/tests/ContextTest.php new file mode 100644 index 0000000..8e8cc56 --- /dev/null +++ b/core/vendor/sebastian/recursion-context/tests/ContextTest.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\RecursionContext; + +use PHPUnit_Framework_TestCase; + +/** + * @covers SebastianBergmann\RecursionContext\Context + */ +class ContextTest extends PHPUnit_Framework_TestCase +{ + /** + * @var \SebastianBergmann\RecursionContext\Context + */ + private $context; + + protected function setUp() + { + $this->context = new Context(); + } + + public function failsProvider() + { + return array( + array(true), + array(false), + array(null), + array('string'), + array(1), + array(1.5), + array(fopen('php://memory', 'r')) + ); + } + + public function valuesProvider() + { + $obj2 = new \stdClass(); + $obj2->foo = 'bar'; + + $obj3 = (object) array(1,2,"Test\r\n",4,5,6,7,8); + + $obj = new \stdClass(); + //@codingStandardsIgnoreStart + $obj->null = null; + //@codingStandardsIgnoreEnd + $obj->boolean = true; + $obj->integer = 1; + $obj->double = 1.2; + $obj->string = '1'; + $obj->text = "this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext"; + $obj->object = $obj2; + $obj->objectagain = $obj2; + $obj->array = array('foo' => 'bar'); + $obj->array2 = array(1,2,3,4,5,6); + $obj->array3 = array($obj, $obj2, $obj3); + $obj->self = $obj; + + $storage = new \SplObjectStorage(); + $storage->attach($obj2); + $storage->foo = $obj2; + + return array( + array($obj, spl_object_hash($obj)), + array($obj2, spl_object_hash($obj2)), + array($obj3, spl_object_hash($obj3)), + array($storage, spl_object_hash($storage)), + array($obj->array, 0), + array($obj->array2, 0), + array($obj->array3, 0) + ); + } + + /** + * @covers SebastianBergmann\RecursionContext\Context::add + * @uses SebastianBergmann\RecursionContext\InvalidArgumentException + * @dataProvider failsProvider + */ + public function testAddFails($value) + { + $this->setExpectedException( + 'SebastianBergmann\\RecursionContext\\Exception', + 'Only arrays and objects are supported' + ); + $this->context->add($value); + } + + /** + * @covers SebastianBergmann\RecursionContext\Context::contains + * @uses SebastianBergmann\RecursionContext\InvalidArgumentException + * @dataProvider failsProvider + */ + public function testContainsFails($value) + { + $this->setExpectedException( + 'SebastianBergmann\\RecursionContext\\Exception', + 'Only arrays and objects are supported' + ); + $this->context->contains($value); + } + + /** + * @covers SebastianBergmann\RecursionContext\Context::add + * @dataProvider valuesProvider + */ + public function testAdd($value, $key) + { + $this->assertEquals($key, $this->context->add($value)); + + // Test we get the same key on subsequent adds + $this->assertEquals($key, $this->context->add($value)); + } + + /** + * @covers SebastianBergmann\RecursionContext\Context::contains + * @uses SebastianBergmann\RecursionContext\Context::add + * @depends testAdd + * @dataProvider valuesProvider + */ + public function testContainsFound($value, $key) + { + $this->context->add($value); + $this->assertEquals($key, $this->context->contains($value)); + + // Test we get the same key on subsequent calls + $this->assertEquals($key, $this->context->contains($value)); + } + + /** + * @covers SebastianBergmann\RecursionContext\Context::contains + * @dataProvider valuesProvider + */ + public function testContainsNotFound($value) + { + $this->assertFalse($this->context->contains($value)); + } +} diff --git a/core/vendor/sebastian/version/LICENSE b/core/vendor/sebastian/version/LICENSE index 4f3c283..5b79c41 100644 --- a/core/vendor/sebastian/version/LICENSE +++ b/core/vendor/sebastian/version/LICENSE @@ -1,6 +1,6 @@ Version -Copyright (c) 2013-2014, Sebastian Bergmann . +Copyright (c) 2013-2015, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/vendor/sebastian/version/README.md b/core/vendor/sebastian/version/README.md index 3c72678..be6b687 100644 --- a/core/vendor/sebastian/version/README.md +++ b/core/vendor/sebastian/version/README.md @@ -4,17 +4,8 @@ ## Installation -### Composer - Simply add a dependency on `sebastian/version` to your project's `composer.json` file if you use [Composer](http://getcomposer.org/) to manage the dependencies of your project. -### PEAR Installer - -The following two commands (which you may have to run as `root`) are all that is required to install Version using the PEAR Installer: - - pear config-set auto_discover 1 - pear install pear.phpunit.de/Version - ## Usage The constructor of the `SebastianBergmann\Version` class expects two parameters: diff --git a/core/vendor/sebastian/version/src/Version.php b/core/vendor/sebastian/version/src/Version.php index 3aa589a..0d93741 100644 --- a/core/vendor/sebastian/version/src/Version.php +++ b/core/vendor/sebastian/version/src/Version.php @@ -1,43 +1,11 @@ . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. +/* + * This file is part of the Version package. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * (c) Sebastian Bergmann * - * @package Version - * @author Sebastian Bergmann - * @copyright 2013-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/version - * @since File available since Release 1.0.0 + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ namespace SebastianBergmann; @@ -45,7 +13,7 @@ /** * @package Version * @author Sebastian Bergmann - * @copyright 2013-2014 Sebastian Bergmann + * @copyright Sebastian Bergmann * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License * @link http://github.com/sebastianbergmann/version * @since Class available since Release 1.0.0 @@ -86,7 +54,7 @@ public function getVersion() } else { $git = explode('-', $git); - $this->version = $this->release . '-' . $git[2]; + $this->version = $this->release . '-' . end($git); } } } @@ -106,6 +74,7 @@ private function getGitInformation($path) $dir = getcwd(); chdir($path); + $returnCode = 1; $result = @exec('git describe --tags 2>&1', $output, $returnCode); chdir($dir); diff --git a/core/vendor/sebastian/version/src/autoload.php b/core/vendor/sebastian/version/src/autoload.php index 93a2669..20157ea 100644 --- a/core/vendor/sebastian/version/src/autoload.php +++ b/core/vendor/sebastian/version/src/autoload.php @@ -1,4 +1,13 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + // @codingStandardsIgnoreFile // @codeCoverageIgnoreStart // this is an autogenerated file - do not edit @@ -16,4 +25,4 @@ function($class) { } } ); -// @codeCoverageIgnoreEnd \ No newline at end of file +// @codeCoverageIgnoreEnd