summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcatch2015-10-07 12:23:37 (GMT)
committercatch2015-10-07 12:23:37 (GMT)
commit18a5c7933312fc99c2b94da34310411c7257cb5b (patch)
tree369a8c8cc766f66f32b6844052bc5cff40f6b67e
parentd653aaaa6b34900a6757588594f78e0f13badbfc (diff)
Issue #2581683 by alexpott, hussainweb: Update PHP dependencies pre RC using composer
-rw-r--r--composer.lock106
-rw-r--r--vendor/composer/autoload_psr4.php1
-rw-r--r--vendor/composer/installed.json548
-rw-r--r--vendor/mikey179/vfsStream/CHANGELOG.md7
-rw-r--r--vendor/mikey179/vfsStream/README.md (renamed from vendor/mikey179/vfsStream/readme.md)5
-rw-r--r--vendor/mikey179/vfsStream/composer.json2
-rw-r--r--vendor/mikey179/vfsStream/composer.lock972
-rw-r--r--vendor/mikey179/vfsStream/phpunit.xml.dist43
-rw-r--r--vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php16
-rw-r--r--vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php29
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php318
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/Issue104TestCase.php52
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php118
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/QuotaTestCase.php81
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php58
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php225
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php230
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php326
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php1054
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php89
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php112
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php81
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php335
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php56
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php306
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php29
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php62
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php728
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php195
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php63
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php99
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php73
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php488
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php458
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php315
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php440
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php77
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php224
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php76
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php35
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php770
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperUnregisterTestCase.php75
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php64
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php53
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php99
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php103
-rw-r--r--vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php86
-rw-r--r--vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt1
-rw-r--r--vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt1
-rw-r--r--vendor/phpunit/php-code-coverage/ChangeLog-2.2.md9
-rw-r--r--vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php2
-rw-r--r--vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php2
-rw-r--r--vendor/phpunit/phpunit/ChangeLog-4.8.md11
-rw-r--r--vendor/phpunit/phpunit/src/Framework/Assert.php9
-rw-r--r--vendor/phpunit/phpunit/src/Framework/TestCase.php5
-rw-r--r--vendor/phpunit/phpunit/src/Runner/Version.php2
-rw-r--r--vendor/phpunit/phpunit/src/TextUI/Command.php9
-rw-r--r--vendor/phpunit/phpunit/src/TextUI/TestRunner.php4
-rw-r--r--vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist7
-rw-r--r--vendor/phpunit/phpunit/src/Util/Test.php6
-rw-r--r--vendor/phpunit/phpunit/src/Util/XML.php2
-rw-r--r--vendor/phpunit/phpunit/tests/Util/TestTest.php20
-rw-r--r--vendor/phpunit/phpunit/tests/_files/CoverageNamespacedFunctionTest.php11
-rw-r--r--vendor/phpunit/phpunit/tests/_files/NamespaceCoveredFunction.php7
-rw-r--r--vendor/zendframework/zend-hydrator/CHANGELOG.md39
-rw-r--r--vendor/zendframework/zend-hydrator/CONTRIBUTING.md229
-rw-r--r--vendor/zendframework/zend-hydrator/LICENSE.md28
-rw-r--r--vendor/zendframework/zend-hydrator/README.md11
-rw-r--r--vendor/zendframework/zend-hydrator/composer.json47
-rw-r--r--vendor/zendframework/zend-hydrator/phpcs.xml21
-rw-r--r--vendor/zendframework/zend-hydrator/src/AbstractHydrator.php283
-rw-r--r--vendor/zendframework/zend-hydrator/src/Aggregate/AggregateHydrator.php85
-rw-r--r--vendor/zendframework/zend-hydrator/src/Aggregate/ExtractEvent.php98
-rw-r--r--vendor/zendframework/zend-hydrator/src/Aggregate/HydrateEvent.php84
-rw-r--r--vendor/zendframework/zend-hydrator/src/Aggregate/HydratorListener.php72
-rw-r--r--vendor/zendframework/zend-hydrator/src/ArraySerializable.php81
-rw-r--r--vendor/zendframework/zend-hydrator/src/ClassMethods.php268
-rw-r--r--vendor/zendframework/zend-hydrator/src/DelegatingHydrator.php57
-rw-r--r--vendor/zendframework/zend-hydrator/src/DelegatingHydratorFactory.php29
-rw-r--r--vendor/zendframework/zend-hydrator/src/Exception/BadMethodCallException.php17
-rw-r--r--vendor/zendframework/zend-hydrator/src/Exception/DomainException.php17
-rw-r--r--vendor/zendframework/zend-hydrator/src/Exception/ExceptionInterface.php17
-rw-r--r--vendor/zendframework/zend-hydrator/src/Exception/ExtensionNotLoadedException.php17
-rw-r--r--vendor/zendframework/zend-hydrator/src/Exception/InvalidArgumentException.php17
-rw-r--r--vendor/zendframework/zend-hydrator/src/Exception/InvalidCallbackException.php17
-rw-r--r--vendor/zendframework/zend-hydrator/src/Exception/LogicException.php17
-rw-r--r--vendor/zendframework/zend-hydrator/src/Exception/RuntimeException.php17
-rw-r--r--vendor/zendframework/zend-hydrator/src/ExtractionInterface.php21
-rw-r--r--vendor/zendframework/zend-hydrator/src/Filter/FilterComposite.php198
-rw-r--r--vendor/zendframework/zend-hydrator/src/Filter/FilterInterface.php22
-rw-r--r--vendor/zendframework/zend-hydrator/src/Filter/FilterProviderInterface.php20
-rw-r--r--vendor/zendframework/zend-hydrator/src/Filter/GetFilter.php28
-rw-r--r--vendor/zendframework/zend-hydrator/src/Filter/HasFilter.php28
-rw-r--r--vendor/zendframework/zend-hydrator/src/Filter/IsFilter.php28
-rw-r--r--vendor/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php49
-rw-r--r--vendor/zendframework/zend-hydrator/src/Filter/NumberOfParameterFilter.php49
-rw-r--r--vendor/zendframework/zend-hydrator/src/Filter/OptionalParametersFilter.php55
-rw-r--r--vendor/zendframework/zend-hydrator/src/FilterEnabledInterface.php59
-rw-r--r--vendor/zendframework/zend-hydrator/src/HydrationInterface.php22
-rw-r--r--vendor/zendframework/zend-hydrator/src/HydratorAwareInterface.php28
-rw-r--r--vendor/zendframework/zend-hydrator/src/HydratorAwareTrait.php47
-rw-r--r--vendor/zendframework/zend-hydrator/src/HydratorInterface.php14
-rw-r--r--vendor/zendframework/zend-hydrator/src/HydratorOptionsInterface.php21
-rw-r--r--vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php73
-rw-r--r--vendor/zendframework/zend-hydrator/src/Iterator/HydratingArrayIterator.php36
-rw-r--r--vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorInterface.php33
-rw-r--r--vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php78
-rw-r--r--vendor/zendframework/zend-hydrator/src/NamingStrategy/ArrayMapNamingStrategy.php51
-rw-r--r--vendor/zendframework/zend-hydrator/src/NamingStrategy/CompositeNamingStrategy.php64
-rw-r--r--vendor/zendframework/zend-hydrator/src/NamingStrategy/IdentityNamingStrategy.php29
-rw-r--r--vendor/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php89
-rw-r--r--vendor/zendframework/zend-hydrator/src/NamingStrategy/NamingStrategyInterface.php34
-rw-r--r--vendor/zendframework/zend-hydrator/src/NamingStrategy/UnderscoreNamingStrategy.php80
-rw-r--r--vendor/zendframework/zend-hydrator/src/NamingStrategyEnabledInterface.php42
-rw-r--r--vendor/zendframework/zend-hydrator/src/ObjectProperty.php109
-rw-r--r--vendor/zendframework/zend-hydrator/src/Reflection.php95
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/BooleanStrategy.php104
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/ClosureStrategy.php113
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/DateTimeFormatterStrategy.php80
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/DefaultStrategy.php35
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/Exception/ExceptionInterface.php14
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/Exception/InvalidArgumentException.php14
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php113
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/SerializableStrategy.php123
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/StrategyChain.php73
-rw-r--r--vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php34
-rw-r--r--vendor/zendframework/zend-hydrator/src/StrategyEnabledInterface.php46
-rw-r--r--vendor/zendframework/zend-stdlib/CHANGELOG.md137
-rw-r--r--vendor/zendframework/zend-stdlib/CONTRIBUTING.md10
-rw-r--r--vendor/zendframework/zend-stdlib/README.md3
-rw-r--r--vendor/zendframework/zend-stdlib/benchmark/ExtractPriorityQueue.php56
-rw-r--r--vendor/zendframework/zend-stdlib/benchmark/InsertPriorityQueue.php49
-rw-r--r--vendor/zendframework/zend-stdlib/benchmark/RemovePriorityQueue.php45
-rw-r--r--vendor/zendframework/zend-stdlib/composer.json13
-rw-r--r--vendor/zendframework/zend-stdlib/src/Extractor/ExtractionInterface.php14
-rw-r--r--vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php343
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/AbstractHydrator.php278
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php71
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/ExtractEvent.php84
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydrateEvent.php70
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydratorListener.php65
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/ArraySerializable.php74
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php265
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydrator.php48
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydratorFactory.php20
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterComposite.php188
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterInterface.php15
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterProviderInterface.php13
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Filter/GetFilter.php21
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Filter/HasFilter.php21
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Filter/IsFilter.php21
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Filter/MethodMatchFilter.php42
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Filter/NumberOfParameterFilter.php40
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Filter/OptionalParametersFilter.php42
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/FilterEnabledInterface.php54
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/HydrationInterface.php15
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/HydratorAwareInterface.php21
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/HydratorAwareTrait.php39
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/HydratorInterface.php6
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/HydratorOptionsInterface.php12
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/HydratorPluginManager.php59
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingArrayIterator.php27
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorInterface.php24
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorIterator.php69
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/ArrayMapNamingStrategy.php44
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/CompositeNamingStrategy.php57
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/IdentityNamingStrategy.php22
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/MapNamingStrategy.php80
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/NamingStrategyInterface.php24
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/UnderscoreNamingStrategy.php71
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategyEnabledInterface.php35
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/ObjectProperty.php101
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Reflection.php86
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/BooleanStrategy.php91
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/ClosureStrategy.php95
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/DateTimeFormatterStrategy.php71
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/DefaultStrategy.php28
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/ExceptionInterface.php7
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/InvalidArgumentException.php7
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/ExplodeStrategy.php106
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/SerializableStrategy.php114
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyChain.php64
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyInterface.php23
-rw-r--r--vendor/zendframework/zend-stdlib/src/Hydrator/StrategyEnabledInterface.php39
184 files changed, 14321 insertions, 2927 deletions
diff --git a/composer.lock b/composer.lock
index 58c6e8e..025d5bf 100644
--- a/composer.lock
+++ b/composer.lock
@@ -2198,23 +2198,81 @@
"time": "2015-08-04 21:39:18"
},
{
+ "name": "zendframework/zend-hydrator",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-hydrator.git",
+ "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/f3ed8b833355140350bbed98d8a7b8b66875903f",
+ "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5",
+ "zendframework/zend-stdlib": "^2.5.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0",
+ "squizlabs/php_codesniffer": "^2.0@dev",
+ "zendframework/zend-eventmanager": "^2.5.1",
+ "zendframework/zend-filter": "^2.5.1",
+ "zendframework/zend-inputfilter": "^2.5.1",
+ "zendframework/zend-serializer": "^2.5.1",
+ "zendframework/zend-servicemanager": "^2.5.1"
+ },
+ "suggest": {
+ "zendframework/zend-eventmanager": "^2.5.1, to support aggregate hydrator usage",
+ "zendframework/zend-filter": "^2.5.1, to support naming strategy hydrator usage",
+ "zendframework/zend-serializer": "^2.5.1, to use the SerializableStrategy",
+ "zendframework/zend-servicemanager": "^2.5.1, to support hydrator plugin manager usage"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev",
+ "dev-develop": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Hydrator\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "homepage": "https://github.com/zendframework/zend-hydrator",
+ "keywords": [
+ "hydrator",
+ "zf2"
+ ],
+ "time": "2015-09-17 14:06:43"
+ },
+ {
"name": "zendframework/zend-stdlib",
- "version": "2.6.0",
+ "version": "2.7.3",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-stdlib.git",
- "reference": "a35758803fc9051ec1aff43989e679b6b451b1b4"
+ "reference": "8ac0c77ff567fcf49b58689ee3bfa7595be102bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/a35758803fc9051ec1aff43989e679b6b451b1b4",
- "reference": "a35758803fc9051ec1aff43989e679b6b451b1b4",
+ "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/8ac0c77ff567fcf49b58689ee3bfa7595be102bc",
+ "reference": "8ac0c77ff567fcf49b58689ee3bfa7595be102bc",
"shasum": ""
},
"require": {
- "php": ">=5.5"
+ "php": ">=5.5",
+ "zendframework/zend-hydrator": "~1.0"
},
"require-dev": {
+ "athletic/athletic": "~0.1",
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/phpunit": "~4.0",
"zendframework/zend-config": "~2.5",
@@ -2233,8 +2291,8 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.6-dev",
- "dev-develop": "2.7-dev"
+ "dev-master": "2.7-dev",
+ "dev-develop": "2.8-dev"
}
},
"autoload": {
@@ -2251,7 +2309,7 @@
"stdlib",
"zf2"
],
- "time": "2015-07-21 17:08:05"
+ "time": "2015-09-25 04:06:33"
}
],
"packages-dev": [
@@ -2529,16 +2587,16 @@
},
{
"name": "mikey179/vfsStream",
- "version": "v1.5.0",
+ "version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/mikey179/vfsStream.git",
- "reference": "4dc0d2f622412f561f5b242b19b98068bbbc883a"
+ "reference": "73bcb605b741a7d5044b47592338c633788b0eb7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/4dc0d2f622412f561f5b242b19b98068bbbc883a",
- "reference": "4dc0d2f622412f561f5b242b19b98068bbbc883a",
+ "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/73bcb605b741a7d5044b47592338c633788b0eb7",
+ "reference": "73bcb605b741a7d5044b47592338c633788b0eb7",
"shasum": ""
},
"require": {
@@ -2550,7 +2608,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.5.x-dev"
+ "dev-master": "1.6.x-dev"
}
},
"autoload": {
@@ -2571,7 +2629,7 @@
],
"description": "Virtual file system to mock the real file system in unit tests.",
"homepage": "http://vfs.bovigo.org/",
- "time": "2015-03-29 11:19:49"
+ "time": "2015-10-06 16:59:57"
},
{
"name": "phpdocumentor/reflection-docblock",
@@ -2684,16 +2742,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "2.2.3",
+ "version": "2.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f"
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef1ca6835468857944d5c3b48fa503d5554cff2f",
- "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
"shasum": ""
},
"require": {
@@ -2742,7 +2800,7 @@
"testing",
"xunit"
],
- "time": "2015-09-14 06:51:16"
+ "time": "2015-10-06 15:47:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -2924,16 +2982,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "4.8.10",
+ "version": "4.8.11",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "463163747474815c5ccd4ae12b5b355ec12158e8"
+ "reference": "bdd199472410fd7e32751f9c814c7e06f2c21bd5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/463163747474815c5ccd4ae12b5b355ec12158e8",
- "reference": "463163747474815c5ccd4ae12b5b355ec12158e8",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bdd199472410fd7e32751f9c814c7e06f2c21bd5",
+ "reference": "bdd199472410fd7e32751f9c814c7e06f2c21bd5",
"shasum": ""
},
"require": {
@@ -2992,7 +3050,7 @@
"testing",
"xunit"
],
- "time": "2015-10-01 09:14:30"
+ "time": "2015-10-07 10:39:46"
},
{
"name": "phpunit/phpunit-mock-objects",
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index f3dd55e..8d5b5ef 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir);
return array(
'Zend\\Stdlib\\' => array($vendorDir . '/zendframework/zend-stdlib/src'),
+ 'Zend\\Hydrator\\' => array($vendorDir . '/zendframework/zend-hydrator/src'),
'Zend\\Feed\\' => array($vendorDir . '/zendframework/zend-feed/src'),
'Zend\\Escaper\\' => array($vendorDir . '/zendframework/zend-escaper/src'),
'Zend\\Diactoros\\' => array($vendorDir . '/zendframework/zend-diactoros/src'),
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index c29170a..fdd91a9 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -257,54 +257,6 @@
]
},
{
- "name": "mikey179/vfsStream",
- "version": "v1.5.0",
- "version_normalized": "1.5.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/mikey179/vfsStream.git",
- "reference": "4dc0d2f622412f561f5b242b19b98068bbbc883a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/4dc0d2f622412f561f5b242b19b98068bbbc883a",
- "reference": "4dc0d2f622412f561f5b242b19b98068bbbc883a",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.5"
- },
- "time": "2015-03-29 11:19:49",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.5.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "org\\bovigo\\vfs\\": "src/main/php"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Frank Kleine",
- "homepage": "http://frankkleine.de/",
- "role": "Developer"
- }
- ],
- "description": "Virtual file system to mock the real file system in unit tests.",
- "homepage": "http://vfs.bovigo.org/"
- },
- {
"name": "doctrine/lexer",
"version": "v1.0.1",
"version_normalized": "1.0.1.0",
@@ -1205,64 +1157,6 @@
]
},
{
- "name": "zendframework/zend-stdlib",
- "version": "2.6.0",
- "version_normalized": "2.6.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/zendframework/zend-stdlib.git",
- "reference": "a35758803fc9051ec1aff43989e679b6b451b1b4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/a35758803fc9051ec1aff43989e679b6b451b1b4",
- "reference": "a35758803fc9051ec1aff43989e679b6b451b1b4",
- "shasum": ""
- },
- "require": {
- "php": ">=5.5"
- },
- "require-dev": {
- "fabpot/php-cs-fixer": "1.7.*",
- "phpunit/phpunit": "~4.0",
- "zendframework/zend-config": "~2.5",
- "zendframework/zend-eventmanager": "~2.5",
- "zendframework/zend-filter": "~2.5",
- "zendframework/zend-inputfilter": "~2.5",
- "zendframework/zend-serializer": "~2.5",
- "zendframework/zend-servicemanager": "~2.5"
- },
- "suggest": {
- "zendframework/zend-eventmanager": "To support aggregate hydrator usage",
- "zendframework/zend-filter": "To support naming strategy hydrator usage",
- "zendframework/zend-serializer": "Zend\\Serializer component",
- "zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
- },
- "time": "2015-07-21 17:08:05",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.6-dev",
- "dev-develop": "2.7-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Zend\\Stdlib\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "homepage": "https://github.com/zendframework/zend-stdlib",
- "keywords": [
- "stdlib",
- "zf2"
- ]
- },
- {
"name": "zendframework/zend-escaper",
"version": "2.5.1",
"version_normalized": "2.5.1.0",
@@ -2531,144 +2425,6 @@
]
},
{
- "name": "phpunit/php-code-coverage",
- "version": "2.2.3",
- "version_normalized": "2.2.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef1ca6835468857944d5c3b48fa503d5554cff2f",
- "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3",
- "phpunit/php-file-iterator": "~1.3",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-token-stream": "~1.3",
- "sebastian/environment": "^1.3.2",
- "sebastian/version": "~1.0"
- },
- "require-dev": {
- "ext-xdebug": ">=2.1.4",
- "phpunit/phpunit": "~4"
- },
- "suggest": {
- "ext-dom": "*",
- "ext-xdebug": ">=2.2.1",
- "ext-xmlwriter": "*"
- },
- "time": "2015-09-14 06:51:16",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.2.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": "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"
- ]
- },
- {
- "name": "phpunit/phpunit",
- "version": "4.8.10",
- "version_normalized": "4.8.10.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "463163747474815c5ccd4ae12b5b355ec12158e8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/463163747474815c5ccd4ae12b5b355ec12158e8",
- "reference": "463163747474815c5ccd4ae12b5b355ec12158e8",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-json": "*",
- "ext-pcre": "*",
- "ext-reflection": "*",
- "ext-spl": "*",
- "php": ">=5.3.3",
- "phpspec/prophecy": "^1.3.1",
- "phpunit/php-code-coverage": "~2.1",
- "phpunit/php-file-iterator": "~1.4",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": ">=1.0.6",
- "phpunit/phpunit-mock-objects": "~2.3",
- "sebastian/comparator": "~1.1",
- "sebastian/diff": "~1.2",
- "sebastian/environment": "~1.3",
- "sebastian/exporter": "~1.2",
- "sebastian/global-state": "~1.0",
- "sebastian/version": "~1.0",
- "symfony/yaml": "~2.1|~3.0"
- },
- "suggest": {
- "phpunit/php-invoker": "~1.1"
- },
- "time": "2015-10-01 09:14:30",
- "bin": [
- "phpunit"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.8.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": "symfony/class-loader",
"version": "v2.7.5",
"version_normalized": "2.7.5.0",
@@ -3697,5 +3453,309 @@
"validation",
"versioning"
]
+ },
+ {
+ "name": "mikey179/vfsStream",
+ "version": "v1.6.0",
+ "version_normalized": "1.6.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/mikey179/vfsStream.git",
+ "reference": "73bcb605b741a7d5044b47592338c633788b0eb7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/73bcb605b741a7d5044b47592338c633788b0eb7",
+ "reference": "73bcb605b741a7d5044b47592338c633788b0eb7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.5"
+ },
+ "time": "2015-10-06 16:59:57",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.6.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "org\\bovigo\\vfs\\": "src/main/php"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Frank Kleine",
+ "homepage": "http://frankkleine.de/",
+ "role": "Developer"
+ }
+ ],
+ "description": "Virtual file system to mock the real file system in unit tests.",
+ "homepage": "http://vfs.bovigo.org/"
+ },
+ {
+ "name": "phpunit/php-code-coverage",
+ "version": "2.2.4",
+ "version_normalized": "2.2.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "phpunit/php-file-iterator": "~1.3",
+ "phpunit/php-text-template": "~1.2",
+ "phpunit/php-token-stream": "~1.3",
+ "sebastian/environment": "^1.3.2",
+ "sebastian/version": "~1.0"
+ },
+ "require-dev": {
+ "ext-xdebug": ">=2.1.4",
+ "phpunit/phpunit": "~4"
+ },
+ "suggest": {
+ "ext-dom": "*",
+ "ext-xdebug": ">=2.2.1",
+ "ext-xmlwriter": "*"
+ },
+ "time": "2015-10-06 15:47:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.2.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": "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"
+ ]
+ },
+ {
+ "name": "phpunit/phpunit",
+ "version": "4.8.11",
+ "version_normalized": "4.8.11.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
+ "reference": "bdd199472410fd7e32751f9c814c7e06f2c21bd5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bdd199472410fd7e32751f9c814c7e06f2c21bd5",
+ "reference": "bdd199472410fd7e32751f9c814c7e06f2c21bd5",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-pcre": "*",
+ "ext-reflection": "*",
+ "ext-spl": "*",
+ "php": ">=5.3.3",
+ "phpspec/prophecy": "^1.3.1",
+ "phpunit/php-code-coverage": "~2.1",
+ "phpunit/php-file-iterator": "~1.4",
+ "phpunit/php-text-template": "~1.2",
+ "phpunit/php-timer": ">=1.0.6",
+ "phpunit/phpunit-mock-objects": "~2.3",
+ "sebastian/comparator": "~1.1",
+ "sebastian/diff": "~1.2",
+ "sebastian/environment": "~1.3",
+ "sebastian/exporter": "~1.2",
+ "sebastian/global-state": "~1.0",
+ "sebastian/version": "~1.0",
+ "symfony/yaml": "~2.1|~3.0"
+ },
+ "suggest": {
+ "phpunit/php-invoker": "~1.1"
+ },
+ "time": "2015-10-07 10:39:46",
+ "bin": [
+ "phpunit"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.8.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": "zendframework/zend-hydrator",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-hydrator.git",
+ "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/f3ed8b833355140350bbed98d8a7b8b66875903f",
+ "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5",
+ "zendframework/zend-stdlib": "^2.5.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0",
+ "squizlabs/php_codesniffer": "^2.0@dev",
+ "zendframework/zend-eventmanager": "^2.5.1",
+ "zendframework/zend-filter": "^2.5.1",
+ "zendframework/zend-inputfilter": "^2.5.1",
+ "zendframework/zend-serializer": "^2.5.1",
+ "zendframework/zend-servicemanager": "^2.5.1"
+ },
+ "suggest": {
+ "zendframework/zend-eventmanager": "^2.5.1, to support aggregate hydrator usage",
+ "zendframework/zend-filter": "^2.5.1, to support naming strategy hydrator usage",
+ "zendframework/zend-serializer": "^2.5.1, to use the SerializableStrategy",
+ "zendframework/zend-servicemanager": "^2.5.1, to support hydrator plugin manager usage"
+ },
+ "time": "2015-09-17 14:06:43",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev",
+ "dev-develop": "1.1-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Zend\\Hydrator\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "homepage": "https://github.com/zendframework/zend-hydrator",
+ "keywords": [
+ "hydrator",
+ "zf2"
+ ]
+ },
+ {
+ "name": "zendframework/zend-stdlib",
+ "version": "2.7.3",
+ "version_normalized": "2.7.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-stdlib.git",
+ "reference": "8ac0c77ff567fcf49b58689ee3bfa7595be102bc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/8ac0c77ff567fcf49b58689ee3bfa7595be102bc",
+ "reference": "8ac0c77ff567fcf49b58689ee3bfa7595be102bc",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5",
+ "zendframework/zend-hydrator": "~1.0"
+ },
+ "require-dev": {
+ "athletic/athletic": "~0.1",
+ "fabpot/php-cs-fixer": "1.7.*",
+ "phpunit/phpunit": "~4.0",
+ "zendframework/zend-config": "~2.5",
+ "zendframework/zend-eventmanager": "~2.5",
+ "zendframework/zend-filter": "~2.5",
+ "zendframework/zend-inputfilter": "~2.5",
+ "zendframework/zend-serializer": "~2.5",
+ "zendframework/zend-servicemanager": "~2.5"
+ },
+ "suggest": {
+ "zendframework/zend-eventmanager": "To support aggregate hydrator usage",
+ "zendframework/zend-filter": "To support naming strategy hydrator usage",
+ "zendframework/zend-serializer": "Zend\\Serializer component",
+ "zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
+ },
+ "time": "2015-09-25 04:06:33",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.7-dev",
+ "dev-develop": "2.8-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Zend\\Stdlib\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "homepage": "https://github.com/zendframework/zend-stdlib",
+ "keywords": [
+ "stdlib",
+ "zf2"
+ ]
}
]
diff --git a/vendor/mikey179/vfsStream/CHANGELOG.md b/vendor/mikey179/vfsStream/CHANGELOG.md
index b3f2eb1..126c5ff 100644
--- a/vendor/mikey179/vfsStream/CHANGELOG.md
+++ b/vendor/mikey179/vfsStream/CHANGELOG.md
@@ -1,3 +1,10 @@
+1.6.0 (2015-10-06)
+------------------
+
+ * added `vfsStreamWrapper::unregister()`, provided by @malkusch with #114
+ * fixed #115: incorrect handling of `..` in root directory on PHP 5.5, fix provided by @acoulton with #116
+
+
1.5.0 (2015-03-29)
------------------
diff --git a/vendor/mikey179/vfsStream/readme.md b/vendor/mikey179/vfsStream/README.md
index 9eb78c5..74554bf 100644
--- a/vendor/mikey179/vfsStream/readme.md
+++ b/vendor/mikey179/vfsStream/README.md
@@ -1,4 +1,7 @@
-For more information have a look in the [wiki](https://github.com/mikey179/vfsStream/wiki).
+You can find documentation in the [wiki](https://github.com/mikey179/vfsStream/wiki).
+
+Also you might want to check [vfsStream examples](https://github.com/mikey179/vfsStream-examples).
+
[![Build Status](https://secure.travis-ci.org/mikey179/vfsStream.png)](http://travis-ci.org/mikey179/vfsStream) [![Coverage Status](https://coveralls.io/repos/mikey179/vfsStream/badge.png?branch=master)](https://coveralls.io/r/mikey179/vfsStream?branch=master)
diff --git a/vendor/mikey179/vfsStream/composer.json b/vendor/mikey179/vfsStream/composer.json
index c87f5fe..c18e37d 100644
--- a/vendor/mikey179/vfsStream/composer.json
+++ b/vendor/mikey179/vfsStream/composer.json
@@ -27,7 +27,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.5.x-dev"
+ "dev-master": "1.6.x-dev"
}
}
}
diff --git a/vendor/mikey179/vfsStream/composer.lock b/vendor/mikey179/vfsStream/composer.lock
new file mode 100644
index 0000000..99e1130
--- /dev/null
+++ b/vendor/mikey179/vfsStream/composer.lock
@@ -0,0 +1,972 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "This file is @generated automatically"
+ ],
+ "hash": "e3c2dd0d4b4daf3d2c9e0bedd344592a",
+ "content-hash": "59c3102c5db7e3c4d78a920d4712790d",
+ "packages": [],
+ "packages-dev": [
+ {
+ "name": "doctrine/instantiator",
+ "version": "1.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/instantiator.git",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3,<8.0-DEV"
+ },
+ "require-dev": {
+ "athletic/athletic": "~0.1.8",
+ "ext-pdo": "*",
+ "ext-phar": "*",
+ "phpunit/phpunit": "~4.0",
+ "squizlabs/php_codesniffer": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ }
+ },
+ "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/doctrine/instantiator",
+ "keywords": [
+ "constructor",
+ "instantiate"
+ ],
+ "time": "2015-06-14 21:17:01"
+ },
+ {
+ "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": "v1.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpspec/prophecy.git",
+ "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7",
+ "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7",
+ "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-08-13 10:07:40"
+ },
+ {
+ "name": "phpunit/php-code-coverage",
+ "version": "2.2.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef1ca6835468857944d5c3b48fa503d5554cff2f",
+ "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "phpunit/php-file-iterator": "~1.3",
+ "phpunit/php-text-template": "~1.2",
+ "phpunit/php-token-stream": "~1.3",
+ "sebastian/environment": "^1.3.2",
+ "sebastian/version": "~1.0"
+ },
+ "require-dev": {
+ "ext-xdebug": ">=2.1.4",
+ "phpunit/phpunit": "~4"
+ },
+ "suggest": {
+ "ext-dom": "*",
+ "ext-xdebug": ">=2.2.1",
+ "ext-xmlwriter": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.2.x-dev"
+ }
+ },
+ "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": "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": "2015-09-14 06:51:16"
+ },
+ {
+ "name": "phpunit/php-file-iterator",
+ "version": "1.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+ "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
+ "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4.x-dev"
+ }
+ },
+ "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": "FilterIterator implementation that filters files based on a list of suffixes.",
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+ "keywords": [
+ "filesystem",
+ "iterator"
+ ],
+ "time": "2015-06-21 13:08:43"
+ },
+ {
+ "name": "phpunit/php-text-template",
+ "version": "1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "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": "Simple template engine.",
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+ "keywords": [
+ "template"
+ ],
+ "time": "2015-06-21 13:50:34"
+ },
+ {
+ "name": "phpunit/php-timer",
+ "version": "1.0.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
+ "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "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": "Utility class for timing",
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "keywords": [
+ "timer"
+ ],
+ "time": "2015-06-21 08:01:12"
+ },
+ {
+ "name": "phpunit/php-token-stream",
+ "version": "1.4.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+ "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+ "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "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"
+ ],
+ "time": "2015-09-15 10:49:45"
+ },
+ {
+ "name": "phpunit/phpunit",
+ "version": "4.8.10",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
+ "reference": "463163747474815c5ccd4ae12b5b355ec12158e8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/463163747474815c5ccd4ae12b5b355ec12158e8",
+ "reference": "463163747474815c5ccd4ae12b5b355ec12158e8",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-pcre": "*",
+ "ext-reflection": "*",
+ "ext-spl": "*",
+ "php": ">=5.3.3",
+ "phpspec/prophecy": "^1.3.1",
+ "phpunit/php-code-coverage": "~2.1",
+ "phpunit/php-file-iterator": "~1.4",
+ "phpunit/php-text-template": "~1.2",
+ "phpunit/php-timer": ">=1.0.6",
+ "phpunit/phpunit-mock-objects": "~2.3",
+ "sebastian/comparator": "~1.1",
+ "sebastian/diff": "~1.2",
+ "sebastian/environment": "~1.3",
+ "sebastian/exporter": "~1.2",
+ "sebastian/global-state": "~1.0",
+ "sebastian/version": "~1.0",
+ "symfony/yaml": "~2.1|~3.0"
+ },
+ "suggest": {
+ "phpunit/php-invoker": "~1.1"
+ },
+ "bin": [
+ "phpunit"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.8.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": "The PHP Unit Testing framework.",
+ "homepage": "https://phpunit.de/",
+ "keywords": [
+ "phpunit",
+ "testing",
+ "xunit"
+ ],
+ "time": "2015-10-01 09:14:30"
+ },
+ {
+ "name": "phpunit/phpunit-mock-objects",
+ "version": "2.3.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.0.2",
+ "php": ">=5.3.3",
+ "phpunit/php-text-template": "~1.2",
+ "sebastian/exporter": "~1.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "suggest": {
+ "ext-soap": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3.x-dev"
+ }
+ },
+ "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"
+ ],
+ "time": "2015-10-02 06:51:40"
+ },
+ {
+ "name": "sebastian/comparator",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/comparator.git",
+ "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
+ "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "sebastian/diff": "~1.2",
+ "sebastian/exporter": "~1.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "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"
+ ],
+ "time": "2015-07-26 15:48:44"
+ },
+ {
+ "name": "sebastian/diff",
+ "version": "1.3.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"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3-dev"
+ }
+ },
+ "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"
+ ],
+ "time": "2015-02-22 15:13:53"
+ },
+ {
+ "name": "sebastian/environment",
+ "version": "1.3.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/environment.git",
+ "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44",
+ "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3.x-dev"
+ }
+ },
+ "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"
+ ],
+ "time": "2015-08-03 06:14:51"
+ },
+ {
+ "name": "sebastian/exporter",
+ "version": "1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/exporter.git",
+ "reference": "7ae5513327cb536431847bcc0c10edba2701064e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
+ "reference": "7ae5513327cb536431847bcc0c10edba2701064e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "sebastian/recursion-context": "~1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "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"
+ ],
+ "time": "2015-06-21 07:55:53"
+ },
+ {
+ "name": "sebastian/global-state",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/global-state.git",
+ "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
+ "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.2"
+ },
+ "suggest": {
+ "ext-uopz": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Snapshotting of global state",
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "keywords": [
+ "global state"
+ ],
+ "time": "2014-10-06 09:23:50"
+ },
+ {
+ "name": "sebastian/recursion-context",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
+ "reference": "994d4a811bafe801fb06dccbee797863ba2792ba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba",
+ "reference": "994d4a811bafe801fb06dccbee797863ba2792ba",
+ "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-06-21 08:04:50"
+ },
+ {
+ "name": "sebastian/version",
+ "version": "1.0.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/version.git",
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+ "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": "2015-06-21 13:59:46"
+ },
+ {
+ "name": "symfony/yaml",
+ "version": "v2.7.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/31cb2ad0155c95b88ee55fe12bc7ff92232c1770",
+ "reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Yaml\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Yaml Component",
+ "homepage": "https://symfony.com",
+ "time": "2015-09-14 14:14:09"
+ }
+ ],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": {
+ "php": ">=5.3.0"
+ },
+ "platform-dev": []
+}
diff --git a/vendor/mikey179/vfsStream/phpunit.xml.dist b/vendor/mikey179/vfsStream/phpunit.xml.dist
new file mode 100644
index 0000000..f5e0556
--- /dev/null
+++ b/vendor/mikey179/vfsStream/phpunit.xml.dist
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit backupGlobals="false"
+ backupStaticAttributes="false"
+ bootstrap="vendor/autoload.php"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ forceCoversAnnotation="false"
+ mapTestClassNameToCoveredClassName="false"
+ printerClass="PHPUnit_TextUI_ResultPrinter"
+ processIsolation="false"
+ stopOnError="false"
+ stopOnFailure="false"
+ stopOnIncomplete="false"
+ stopOnSkipped="false"
+ verbose="true">
+ <testsuites>
+ <testsuite>
+ <directory suffix="TestCase.php">./src/test/php</directory>
+ </testsuite>
+ </testsuites>
+
+ <filter>
+ <whitelist>
+ <directory>src/main/php</directory>
+ </whitelist>
+ </filter>
+
+ <logging>
+ <log type="coverage-html" target="docs/coverage" charset="UTF-8"
+ yui="true" highlight="false"
+ lowUpperBound="35" highLowerBound="70"/>
+ <log type="coverage-clover" target="docs/phpunit/clover.xml"/>
+ <log type="junit" target="docs/phpunit/junit.xml" logIncompleteSkipped="false"/>
+ <log type="testdox-html" target="docs/phpunit/testdox.html"/>
+ </logging>
+
+ <php>
+ <ini name="memory_limit" value="-1"/>
+ <ini name="error_reporting" value="30719"/> <!-- E_ALL | E_STRICT -->
+ </php>
+</phpunit> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php b/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php
index 5ec4352..0467451 100644
--- a/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php
+++ b/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php
@@ -148,7 +148,7 @@ abstract class vfsStreamAbstractContent implements vfsStreamContent
* sets the last modification time of the stream content
*
* @param int $filemtime
- * @return vfsStreamContent
+ * @return $this
*/
public function lastModified($filemtime)
{
@@ -170,7 +170,7 @@ abstract class vfsStreamAbstractContent implements vfsStreamContent
* sets last access time of the stream content
*
* @param int $fileatime
- * @return vfsStreamContent
+ * @return $this
* @since 0.9
*/
public function lastAccessed($fileatime)
@@ -194,7 +194,7 @@ abstract class vfsStreamAbstractContent implements vfsStreamContent
* sets the last attribute modification time of the stream content
*
* @param int $filectime
- * @return vfsStreamContent
+ * @return $this
* @since 0.9
*/
public function lastAttributeModified($filectime)
@@ -218,7 +218,7 @@ abstract class vfsStreamAbstractContent implements vfsStreamContent
* adds content to given container
*
* @param vfsStreamContainer $container
- * @return vfsStreamContent
+ * @return $this
*/
public function at(vfsStreamContainer $container)
{
@@ -230,7 +230,7 @@ abstract class vfsStreamAbstractContent implements vfsStreamContent
* change file mode to given permissions
*
* @param int $permissions
- * @return vfsStreamContent
+ * @return $this
*/
public function chmod($permissions)
{
@@ -314,7 +314,7 @@ abstract class vfsStreamAbstractContent implements vfsStreamContent
* change owner of file to given user
*
* @param int $user
- * @return vfsStreamContent
+ * @return $this
*/
public function chown($user)
{
@@ -348,7 +348,7 @@ abstract class vfsStreamAbstractContent implements vfsStreamContent
* change owner group of file to given group
*
* @param int $group
- * @return vfsStreamContent
+ * @return $this
*/
public function chgrp($group)
{
@@ -416,4 +416,4 @@ abstract class vfsStreamAbstractContent implements vfsStreamContent
return vfsStream::url($this->path());
}
}
-?> \ No newline at end of file
+?>
diff --git a/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php b/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
index 31c021e..911334a 100644
--- a/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
+++ b/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
@@ -116,6 +116,33 @@ class vfsStreamWrapper
}
/**
+ * Unregisters a previously registered URL wrapper for the vfs scheme.
+ *
+ * If this stream wrapper wasn't registered, the method returns silently.
+ *
+ * If unregistering fails, or if the URL wrapper for vfs:// was not
+ * registered with this class, a vfsStreamException will be thrown.
+ *
+ * @throws vfsStreamException
+ * @since 1.6.0
+ */
+ public static function unregister()
+ {
+ if (!self::$registered) {
+ if (in_array(vfsStream::SCHEME, stream_get_wrappers())) {
+ throw new vfsStreamException('The URL wrapper for the protocol ' . vfsStream::SCHEME . ' was not registered with this version of vfsStream.');
+ }
+ return;
+ }
+
+ if (!@stream_wrapper_unregister(vfsStream::SCHEME)) {
+ throw new vfsStreamException('Failed to unregister the URL wrapper for the ' . vfsStream::SCHEME . ' protocol.');
+ }
+
+ self::$registered = false;
+ }
+
+ /**
* sets the root content
*
* @param vfsStreamContainer $root
@@ -231,7 +258,7 @@ class vfsStreamWrapper
if ('.' !== $pathPart) {
if ('..' !== $pathPart) {
$newPath[] = $pathPart;
- } else {
+ } elseif (count($newPath) > 1) {
array_pop($newPath);
}
}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php
new file mode 100644
index 0000000..4f30b03
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php
@@ -0,0 +1,318 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+require_once __DIR__ . '/vfsStreamWrapperBaseTestCase.php';
+/**
+ * Test for directory iteration.
+ *
+ * @group dir
+ * @group iteration
+ */
+class DirectoryIterationTestCase extends vfsStreamWrapperBaseTestCase
+{
+ /**
+ * clean up test environment
+ */
+ public function tearDown()
+ {
+ vfsStream::enableDotfiles();
+ }
+
+ /**
+ * @return array
+ */
+ public function provideSwitchWithExpectations()
+ {
+ return array(array(function() { vfsStream::disableDotfiles(); }, array('bar', 'baz2')),
+ array(function() { vfsStream::enableDotfiles(); }, array('.', '..', 'bar', 'baz2'))
+ );
+ }
+
+ /**
+ * assertion for directoy count
+ *
+ * @param int $expectedCount
+ * @param int $actualCount
+ */
+ private function assertDirectoryCount($expectedCount, $actualCount)
+ {
+ $this->assertEquals($expectedCount,
+ $actualCount,
+ 'Directory foo contains ' . $expectedCount . ' children, but got ' . $actualCount . ' children while iterating over directory contents'
+ );
+ }
+
+ /**
+ * @param \Closure $dotFilesSwitch
+ * @param string[] $expectedDirectories
+ * @test
+ * @dataProvider provideSwitchWithExpectations
+ */
+ public function directoryIteration(\Closure $dotFilesSwitch, array $expectedDirectories)
+ {
+ $dotFilesSwitch();
+ $dir = dir($this->fooURL);
+ $i = 0;
+ while (false !== ($entry = $dir->read())) {
+ $i++;
+ $this->assertTrue(in_array($entry, $expectedDirectories));
+ }
+
+ $this->assertDirectoryCount(count($expectedDirectories), $i);
+ $dir->rewind();
+ $i = 0;
+ while (false !== ($entry = $dir->read())) {
+ $i++;
+ $this->assertTrue(in_array($entry, $expectedDirectories));
+ }
+
+ $this->assertDirectoryCount(count($expectedDirectories), $i);
+ $dir->close();
+ }
+
+ /**
+ * @param \Closure $dotFilesSwitch
+ * @param string[] $expectedDirectories
+ * @test
+ * @dataProvider provideSwitchWithExpectations
+ */
+ public function directoryIterationWithDot(\Closure $dotFilesSwitch, array $expectedDirectories)
+ {
+ $dotFilesSwitch();
+ $dir = dir($this->fooURL . '/.');
+ $i = 0;
+ while (false !== ($entry = $dir->read())) {
+ $i++;
+ $this->assertTrue(in_array($entry, $expectedDirectories));
+ }
+
+ $this->assertDirectoryCount(count($expectedDirectories), $i);
+ $dir->rewind();
+ $i = 0;
+ while (false !== ($entry = $dir->read())) {
+ $i++;
+ $this->assertTrue(in_array($entry, $expectedDirectories));
+ }
+
+ $this->assertDirectoryCount(count($expectedDirectories), $i);
+ $dir->close();
+ }
+
+ /**
+ * assure that a directory iteration works as expected
+ *
+ * @param \Closure $dotFilesSwitch
+ * @param string[] $expectedDirectories
+ * @test
+ * @dataProvider provideSwitchWithExpectations
+ * @group regression
+ * @group bug_2
+ */
+ public function directoryIterationWithOpenDir_Bug_2(\Closure $dotFilesSwitch, array $expectedDirectories)
+ {
+ $dotFilesSwitch();
+ $handle = opendir($this->fooURL);
+ $i = 0;
+ while (false !== ($entry = readdir($handle))) {
+ $i++;
+ $this->assertTrue(in_array($entry, $expectedDirectories));
+ }
+
+ $this->assertDirectoryCount(count($expectedDirectories), $i);
+
+ rewinddir($handle);
+ $i = 0;
+ while (false !== ($entry = readdir($handle))) {
+ $i++;
+ $this->assertTrue(in_array($entry, $expectedDirectories));
+ }
+
+ $this->assertDirectoryCount(count($expectedDirectories), $i);
+ closedir($handle);
+ }
+
+ /**
+ * assure that a directory iteration works as expected
+ *
+ * @author Christoph Bloemer
+ * @param \Closure $dotFilesSwitch
+ * @param string[] $expectedDirectories
+ * @test
+ * @dataProvider provideSwitchWithExpectations
+ * @group regression
+ * @group bug_4
+ */
+ public function directoryIteration_Bug_4(\Closure $dotFilesSwitch, array $expectedDirectories)
+ {
+ $dotFilesSwitch();
+ $dir = $this->fooURL;
+ $list1 = array();
+ if ($handle = opendir($dir)) {
+ while (false !== ($listItem = readdir($handle))) {
+ if ('.' != $listItem && '..' != $listItem) {
+ if (is_file($dir . '/' . $listItem) === true) {
+ $list1[] = 'File:[' . $listItem . ']';
+ } elseif (is_dir($dir . '/' . $listItem) === true) {
+ $list1[] = 'Folder:[' . $listItem . ']';
+ }
+ }
+ }
+
+ closedir($handle);
+ }
+
+ $list2 = array();
+ if ($handle = opendir($dir)) {
+ while (false !== ($listItem = readdir($handle))) {
+ if ('.' != $listItem && '..' != $listItem) {
+ if (is_file($dir . '/' . $listItem) === true) {
+ $list2[] = 'File:[' . $listItem . ']';
+ } elseif (is_dir($dir . '/' . $listItem) === true) {
+ $list2[] = 'Folder:[' . $listItem . ']';
+ }
+ }
+ }
+
+ closedir($handle);
+ }
+
+ $this->assertEquals($list1, $list2);
+ $this->assertEquals(2, count($list1));
+ $this->assertEquals(2, count($list2));
+ }
+
+ /**
+ * assure that a directory iteration works as expected
+ *
+ * @param \Closure $dotFilesSwitch
+ * @param string[] $expectedDirectories
+ * @test
+ * @dataProvider provideSwitchWithExpectations
+ */
+ public function directoryIterationShouldBeIndependent(\Closure $dotFilesSwitch, array $expectedDirectories)
+ {
+ $dotFilesSwitch();
+ $list1 = array();
+ $list2 = array();
+ $handle1 = opendir($this->fooURL);
+ if (false !== ($listItem = readdir($handle1))) {
+ $list1[] = $listItem;
+ }
+
+ $handle2 = opendir($this->fooURL);
+ if (false !== ($listItem = readdir($handle2))) {
+ $list2[] = $listItem;
+ }
+
+ if (false !== ($listItem = readdir($handle1))) {
+ $list1[] = $listItem;
+ }
+
+ if (false !== ($listItem = readdir($handle2))) {
+ $list2[] = $listItem;
+ }
+
+ closedir($handle1);
+ closedir($handle2);
+ $this->assertEquals($list1, $list2);
+ $this->assertEquals(2, count($list1));
+ $this->assertEquals(2, count($list2));
+ }
+
+ /**
+ * @test
+ * @group issue_50
+ */
+ public function recursiveDirectoryIterationWithDotsEnabled()
+ {
+ vfsStream::enableDotfiles();
+ vfsStream::setup();
+ $structure = array(
+ 'Core' => array(
+ 'AbstractFactory' => array(
+ 'test.php' => 'some text content',
+ 'other.php' => 'Some more text content',
+ 'Invalid.csv' => 'Something else',
+ ),
+ 'AnEmptyFolder' => array(),
+ 'badlocation.php' => 'some bad content',
+ )
+ );
+ $root = vfsStream::create($structure);
+ $rootPath = vfsStream::url($root->getName());
+
+ $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootPath),
+ \RecursiveIteratorIterator::CHILD_FIRST);
+ $pathes = array();
+ foreach ($iterator as $fullFileName => $fileSPLObject) {
+ $pathes[] = $fullFileName;
+ }
+
+ $this->assertEquals(array('vfs://root'.DIRECTORY_SEPARATOR.'.',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'..',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'.',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'..',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'.',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'..',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'test.php',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'other.php',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'Invalid.csv',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder'.DIRECTORY_SEPARATOR.'.',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder'.DIRECTORY_SEPARATOR.'..',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'badlocation.php',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'
+ ),
+ $pathes
+ );
+ }
+
+ /**
+ * @test
+ * @group issue_50
+ */
+ public function recursiveDirectoryIterationWithDotsDisabled()
+ {
+ vfsStream::disableDotfiles();
+ vfsStream::setup();
+ $structure = array(
+ 'Core' => array(
+ 'AbstractFactory' => array(
+ 'test.php' => 'some text content',
+ 'other.php' => 'Some more text content',
+ 'Invalid.csv' => 'Something else',
+ ),
+ 'AnEmptyFolder' => array(),
+ 'badlocation.php' => 'some bad content',
+ )
+ );
+ $root = vfsStream::create($structure);
+ $rootPath = vfsStream::url($root->getName());
+
+ $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootPath),
+ \RecursiveIteratorIterator::CHILD_FIRST);
+ $pathes = array();
+ foreach ($iterator as $fullFileName => $fileSPLObject) {
+ $pathes[] = $fullFileName;
+ }
+
+ $this->assertEquals(array('vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'test.php',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'other.php',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'Invalid.csv',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'badlocation.php',
+ 'vfs://root'.DIRECTORY_SEPARATOR.'Core'
+ ),
+ $pathes
+ );
+ }
+} \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/Issue104TestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/Issue104TestCase.php
new file mode 100644
index 0000000..89ae146
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/Issue104TestCase.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * @group issue_104
+ * @since 1.5.0
+ */
+class Issue104TestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @test
+ */
+ public function vfsStreamCanHandleUrlEncodedPathPassedByInternalPhpCode()
+ {
+ $structure = array('foo bar' => array(
+ 'schema.xsd' => '<xs:schema targetNamespace="http://www.example.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType name="myType"></xs:complexType>
+ </xs:schema>',
+ )
+ );
+ vfsStream::setup('root', null, $structure);
+ $doc = new \DOMDocument();
+ $this->assertTrue($doc->load(vfsStream::url('root/foo bar/schema.xsd')));
+ }
+
+ /**
+ * @test
+ */
+ public function vfsStreamCanHandleUrlEncodedPath()
+ {
+ $content = '<xs:schema targetNamespace="http://www.example.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType name="myType"></xs:complexType>
+ </xs:schema>';
+ $structure = array('foo bar' => array(
+ 'schema.xsd' => $content,
+ )
+ );
+ vfsStream::setup('root', null, $structure);
+ $this->assertEquals(
+ $content,
+ file_get_contents(vfsStream::url('root/foo%20bar/schema.xsd'))
+ );
+ }
+}
+
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php
new file mode 100644
index 0000000..56767ac
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php
@@ -0,0 +1,118 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for permissions related functionality.
+ *
+ * @group permissions
+ */
+class PermissionsTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @type vfsStreamDirectory
+ */
+ private $root;
+
+ /**
+ * set up test environment
+ */
+ public function setup()
+ {
+ $structure = array('test_directory' => array('test.file' => ''));
+ $this->root = vfsStream::setup('root', null, $structure);
+ }
+
+ /**
+ * @test
+ * @group issue_52
+ */
+ public function canNotChangePermissionWhenDirectoryNotWriteable()
+ {
+ $this->root->getChild('test_directory')->chmod(0444);
+ $this->assertFalse(@chmod(vfsStream::url('root/test_directory/test.file'), 0777));
+ }
+
+ /**
+ * @test
+ * @group issue_53
+ */
+ public function canNotChangePermissionWhenFileNotOwned()
+ {
+ $this->root->getChild('test_directory')->getChild('test.file')->chown(vfsStream::OWNER_USER_1);
+ $this->assertFalse(@chmod(vfsStream::url('root/test_directory/test.file'), 0777));
+ }
+
+ /**
+ * @test
+ * @group issue_52
+ */
+ public function canNotChangeOwnerWhenDirectoryNotWriteable()
+ {
+ $this->root->getChild('test_directory')->chmod(0444);
+ $this->assertFalse(@chown(vfsStream::url('root/test_directory/test.file'), vfsStream::OWNER_USER_2));
+ }
+
+ /**
+ * @test
+ * @group issue_53
+ */
+ public function canNotChangeOwnerWhenFileNotOwned()
+ {
+ $this->root->getChild('test_directory')->getChild('test.file')->chown(vfsStream::OWNER_USER_1);
+ $this->assertFalse(@chown(vfsStream::url('root/test_directory/test.file'), vfsStream::OWNER_USER_2));
+ }
+
+ /**
+ * @test
+ * @group issue_52
+ */
+ public function canNotChangeGroupWhenDirectoryNotWriteable()
+ {
+ $this->root->getChild('test_directory')->chmod(0444);
+ $this->assertFalse(@chgrp(vfsStream::url('root/test_directory/test.file'), vfsStream::GROUP_USER_2));
+ }
+
+ /**
+ * @test
+ * @group issue_53
+ */
+ public function canNotChangeGroupWhenFileNotOwned()
+ {
+ $this->root->getChild('test_directory')->getChild('test.file')->chown(vfsStream::OWNER_USER_1);
+ $this->assertFalse(@chgrp(vfsStream::url('root/test_directory/test.file'), vfsStream::GROUP_USER_2));
+ }
+
+ /**
+ * @test
+ * @group issue_107
+ * @expectedException PHPUnit_Framework_Error
+ * @expectedExceptionMessage Can not create new file in non-writable path root
+ * @requires PHP 5.4
+ * @since 1.5.0
+ */
+ public function touchOnNonWriteableDirectoryTriggersError()
+ {
+ $this->root->chmod(0555);
+ touch($this->root->url() . '/touch.txt');
+ }
+
+ /**
+ * @test
+ * @group issue_107
+ * @requires PHP 5.4
+ * @since 1.5.0
+ */
+ public function touchOnNonWriteableDirectoryDoesNotCreateFile()
+ {
+ $this->root->chmod(0555);
+ $this->assertFalse(@touch($this->root->url() . '/touch.txt'));
+ $this->assertFalse($this->root->hasChild('touch.txt'));
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/QuotaTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/QuotaTestCase.php
new file mode 100644
index 0000000..7007183
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/QuotaTestCase.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\Quota.
+ *
+ * @group issue_35
+ */
+class QuotaTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * instance to test
+ *
+ * @type Quota
+ */
+ private $quota;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->quota = new Quota(10);
+ }
+
+ /**
+ * @test
+ */
+ public function unlimitedQuotaIsNotLimited()
+ {
+ $this->assertFalse(Quota::unlimited()->isLimited());
+ }
+
+ /**
+ * @test
+ */
+ public function limitedQuotaIsLimited()
+ {
+ $this->assertTrue($this->quota->isLimited());
+ }
+
+ /**
+ * @test
+ */
+ public function unlimitedQuotaHasAlwaysSpaceLeft()
+ {
+ $this->assertEquals(303, Quota::unlimited()->spaceLeft(303));
+ }
+
+ /**
+ * @test
+ */
+ public function hasNoSpaceLeftWhenUsedSpaceIsLargerThanQuota()
+ {
+ $this->assertEquals(0, $this->quota->spaceLeft(11));
+ }
+
+ /**
+ * @test
+ */
+ public function hasNoSpaceLeftWhenUsedSpaceIsEqualToQuota()
+ {
+ $this->assertEquals(0, $this->quota->spaceLeft(10));
+ }
+
+ /**
+ * @test
+ */
+ public function hasSpaceLeftWhenUsedSpaceIsLowerThanQuota()
+ {
+ $this->assertEquals(1, $this->quota->spaceLeft(9));
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php
new file mode 100644
index 0000000..4f9fb17
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for unlink() functionality.
+ *
+ * @group unlink
+ */
+class UnlinkTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @test
+ * @group issue_51
+ */
+ public function canRemoveNonWritableFileFromWritableDirectory()
+ {
+ $structure = array('test_directory' => array('test.file' => ''));
+ $root = vfsStream::setup('root', null, $structure);
+ $root->getChild('test_directory')->chmod(0777);
+ $root->getChild('test_directory')->getChild('test.file')->chmod(0444);
+ $this->assertTrue(@unlink(vfsStream::url('root/test_directory/test.file')));
+ }
+
+ /**
+ * @test
+ * @group issue_51
+ */
+ public function canNotRemoveWritableFileFromNonWritableDirectory()
+ {
+ $structure = array('test_directory' => array('test.file' => ''));
+ $root = vfsStream::setup('root', null, $structure);
+ $root->getChild('test_directory')->chmod(0444);
+ $root->getChild('test_directory')->getChild('test.file')->chmod(0777);
+ $this->assertFalse(@unlink(vfsStream::url('root/test_directory/test.file')));
+ }
+
+ /**
+ * @test
+ * @since 1.4.0
+ * @group issue_68
+ */
+ public function unlinkNonExistingFileTriggersError()
+ {
+ vfsStream::setup();
+ try {
+ $this->assertFalse(unlink('vfs://root/foo.txt'));
+ } catch (\PHPUnit_Framework_Error $fe) {
+ $this->assertEquals('unlink(vfs://root/foo.txt): No such file or directory', $fe->getMessage());
+ }
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php
new file mode 100644
index 0000000..c7a7458
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php
@@ -0,0 +1,225 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs\content;
+/**
+ * Test for org\bovigo\vfs\content\LargeFileContent.
+ *
+ * @since 1.3.0
+ * @group issue_79
+ */
+class LargeFileContentTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * instance to test
+ *
+ * @type LargeFileContent
+ */
+ private $largeFileContent;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->largeFileContent = new LargeFileContent(100);
+ }
+
+ /**
+ * @test
+ */
+ public function hasSizeOriginallyGiven()
+ {
+ $this->assertEquals(100, $this->largeFileContent->size());
+ }
+
+ /**
+ * @test
+ */
+ public function contentIsFilledUpWithSpacesIfNoDataWritten()
+ {
+ $this->assertEquals(
+ str_repeat(' ', 100),
+ $this->largeFileContent->content()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function readReturnsSpacesWhenNothingWrittenAtOffset()
+ {
+ $this->assertEquals(
+ str_repeat(' ', 10),
+ $this->largeFileContent->read(10)
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function readReturnsContentFilledWithSpaces()
+ {
+ $this->largeFileContent->write('foobarbaz');
+ $this->largeFileContent->seek(0, SEEK_SET);
+ $this->assertEquals(
+ 'foobarbaz ',
+ $this->largeFileContent->read(10)
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function writesDataAtStartWhenOffsetNotMoved()
+ {
+ $this->assertEquals(9, $this->largeFileContent->write('foobarbaz'));
+ $this->assertEquals(
+ 'foobarbaz' . str_repeat(' ', 91),
+ $this->largeFileContent->content()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function writeDataAtStartDoesNotIncreaseSize()
+ {
+ $this->assertEquals(9, $this->largeFileContent->write('foobarbaz'));
+ $this->assertEquals(100, $this->largeFileContent->size());
+ }
+
+ /**
+ * @test
+ */
+ public function writesDataAtOffsetWhenOffsetMoved()
+ {
+ $this->largeFileContent->seek(50, SEEK_SET);
+ $this->assertEquals(9, $this->largeFileContent->write('foobarbaz'));
+ $this->assertEquals(
+ str_repeat(' ', 50) . 'foobarbaz' . str_repeat(' ', 41),
+ $this->largeFileContent->content()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function writeDataInBetweenDoesNotIncreaseSize()
+ {
+ $this->largeFileContent->seek(50, SEEK_SET);
+ $this->assertEquals(9, $this->largeFileContent->write('foobarbaz'));
+ $this->assertEquals(100, $this->largeFileContent->size());
+ }
+
+ /**
+ * @test
+ */
+ public function writesDataOverEndWhenOffsetAndDataLengthLargerThanSize()
+ {
+ $this->largeFileContent->seek(95, SEEK_SET);
+ $this->assertEquals(9, $this->largeFileContent->write('foobarbaz'));
+ $this->assertEquals(
+ str_repeat(' ', 95) . 'foobarbaz',
+ $this->largeFileContent->content()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function writeDataOverLastOffsetIncreasesSize()
+ {
+ $this->largeFileContent->seek(95, SEEK_SET);
+ $this->assertEquals(9, $this->largeFileContent->write('foobarbaz'));
+ $this->assertEquals(104, $this->largeFileContent->size());
+ }
+
+ /**
+ * @test
+ */
+ public function writesDataAfterEndWhenOffsetAfterEnd()
+ {
+ $this->largeFileContent->seek(0, SEEK_END);
+ $this->assertEquals(9, $this->largeFileContent->write('foobarbaz'));
+ $this->assertEquals(
+ str_repeat(' ', 100) . 'foobarbaz',
+ $this->largeFileContent->content()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function writeDataAfterLastOffsetIncreasesSize()
+ {
+ $this->largeFileContent->seek(0, SEEK_END);
+ $this->assertEquals(9, $this->largeFileContent->write('foobarbaz'));
+ $this->assertEquals(109, $this->largeFileContent->size());
+ }
+
+ /**
+ * @test
+ */
+ public function truncateReducesSize()
+ {
+ $this->assertTrue($this->largeFileContent->truncate(50));
+ $this->assertEquals(50, $this->largeFileContent->size());
+ }
+
+ /**
+ * @test
+ */
+ public function truncateRemovesWrittenContentAfterOffset()
+ {
+ $this->largeFileContent->seek(45, SEEK_SET);
+ $this->largeFileContent->write('foobarbaz');
+ $this->assertTrue($this->largeFileContent->truncate(50));
+ $this->assertEquals(
+ str_repeat(' ', 45) . 'fooba',
+ $this->largeFileContent->content()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function createInstanceWithKilobytes()
+ {
+ $this->assertEquals(
+ 100 * 1024,
+ LargeFileContent::withKilobytes(100)
+ ->size()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function createInstanceWithMegabytes()
+ {
+ $this->assertEquals(
+ 100 * 1024 * 1024,
+ LargeFileContent::withMegabytes(100)
+ ->size()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function createInstanceWithGigabytes()
+ {
+ $this->assertEquals(
+ 100 * 1024 * 1024 * 1024,
+ LargeFileContent::withGigabytes(100)
+ ->size()
+ );
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php
new file mode 100644
index 0000000..d0e15ed
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php
@@ -0,0 +1,230 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs\content;
+/**
+ * Test for org\bovigo\vfs\content\StringBasedFileContent.
+ *
+ * @since 1.3.0
+ * @group issue_79
+ */
+class StringBasedFileContentTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * instance to test
+ *
+ * @type StringBasedFileContent
+ */
+ private $stringBasedFileContent;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->stringBasedFileContent = new StringBasedFileContent('foobarbaz');
+ }
+
+ /**
+ * @test
+ */
+ public function hasContentOriginallySet()
+ {
+ $this->assertEquals('foobarbaz', $this->stringBasedFileContent->content());
+ }
+
+ /**
+ * @test
+ */
+ public function hasNotReachedEofAfterCreation()
+ {
+ $this->assertFalse($this->stringBasedFileContent->eof());
+ }
+
+ /**
+ * @test
+ */
+ public function sizeEqualsLengthOfGivenString()
+ {
+ $this->assertEquals(9, $this->stringBasedFileContent->size());
+ }
+
+ /**
+ * @test
+ */
+ public function readReturnsSubstringWithRequestedLength()
+ {
+ $this->assertEquals('foo', $this->stringBasedFileContent->read(3));
+ }
+
+ /**
+ * @test
+ */
+ public function readMovesOffset()
+ {
+ $this->assertEquals('foo', $this->stringBasedFileContent->read(3));
+ $this->assertEquals('bar', $this->stringBasedFileContent->read(3));
+ $this->assertEquals('baz', $this->stringBasedFileContent->read(3));
+ }
+
+ /**
+ * @test
+ */
+ public function reaMoreThanSizeReturnsWholeContent()
+ {
+ $this->assertEquals('foobarbaz', $this->stringBasedFileContent->read(10));
+ }
+
+ /**
+ * @test
+ */
+ public function readAfterEndReturnsEmptyString()
+ {
+ $this->stringBasedFileContent->read(9);
+ $this->assertEquals('', $this->stringBasedFileContent->read(3));
+ }
+
+ /**
+ * @test
+ */
+ public function readDoesNotChangeSize()
+ {
+ $this->stringBasedFileContent->read(3);
+ $this->assertEquals(9, $this->stringBasedFileContent->size());
+ }
+
+ /**
+ * @test
+ */
+ public function readLessThenSizeDoesNotReachEof()
+ {
+ $this->stringBasedFileContent->read(3);
+ $this->assertFalse($this->stringBasedFileContent->eof());
+ }
+
+ /**
+ * @test
+ */
+ public function readSizeReachesEof()
+ {
+ $this->stringBasedFileContent->read(9);
+ $this->assertTrue($this->stringBasedFileContent->eof());
+ }
+
+ /**
+ * @test
+ */
+ public function readMoreThanSizeReachesEof()
+ {
+ $this->stringBasedFileContent->read(10);
+ $this->assertTrue($this->stringBasedFileContent->eof());
+ }
+
+ /**
+ * @test
+ */
+ public function seekWithInvalidOptionReturnsFalse()
+ {
+ $this->assertFalse($this->stringBasedFileContent->seek(0, 55));
+ }
+
+ /**
+ * @test
+ */
+ public function canSeekToGivenOffset()
+ {
+ $this->assertTrue($this->stringBasedFileContent->seek(5, SEEK_SET));
+ $this->assertEquals('rbaz', $this->stringBasedFileContent->read(10));
+ }
+
+ /**
+ * @test
+ */
+ public function canSeekFromCurrentOffset()
+ {
+ $this->assertTrue($this->stringBasedFileContent->seek(5, SEEK_SET));
+ $this->assertTrue($this->stringBasedFileContent->seek(2, SEEK_CUR));
+ $this->assertEquals('az', $this->stringBasedFileContent->read(10));
+ }
+
+ /**
+ * @test
+ */
+ public function canSeekToEnd()
+ {
+ $this->assertTrue($this->stringBasedFileContent->seek(0, SEEK_END));
+ $this->assertEquals('', $this->stringBasedFileContent->read(10));
+ }
+
+ /**
+ * @test
+ */
+ public function writeOverwritesExistingContentWhenOffsetNotAtEof()
+ {
+ $this->assertEquals(3, $this->stringBasedFileContent->write('bar'));
+ $this->assertEquals('barbarbaz', $this->stringBasedFileContent->content());
+ }
+
+ /**
+ * @test
+ */
+ public function writeAppendsContentWhenOffsetAtEof()
+ {
+ $this->assertTrue($this->stringBasedFileContent->seek(0, SEEK_END));
+ $this->assertEquals(3, $this->stringBasedFileContent->write('bar'));
+ $this->assertEquals('foobarbazbar', $this->stringBasedFileContent->content());
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ * @since 1.1.0
+ */
+ public function truncateRemovesSuperflouosContent()
+ {
+ $this->assertTrue($this->stringBasedFileContent->truncate(6));
+ $this->assertEquals('foobar', $this->stringBasedFileContent->content());
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ * @since 1.1.0
+ */
+ public function truncateDecreasesSize()
+ {
+ $this->assertTrue($this->stringBasedFileContent->truncate(6));
+ $this->assertEquals(6, $this->stringBasedFileContent->size());
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ * @since 1.1.0
+ */
+ public function truncateToGreaterSizeAddsZeroBytes()
+ {
+ $this->assertTrue($this->stringBasedFileContent->truncate(25));
+ $this->assertEquals(
+ "foobarbaz\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
+ $this->stringBasedFileContent->content()
+ );
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ * @since 1.1.0
+ */
+ public function truncateToGreaterSizeIncreasesSize()
+ {
+ $this->assertTrue($this->stringBasedFileContent->truncate(25));
+ $this->assertEquals(25, $this->stringBasedFileContent->size());
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php
new file mode 100644
index 0000000..899931d
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php
@@ -0,0 +1,326 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Stream wrapper to mock file system requests.
+ *
+ * @since 0.10.0
+ */
+class vfsStreamWrapperRecordingProxy extends vfsStreamWrapper
+{
+ /**
+ * list of called methods for a stream
+ *
+ * @var array
+ */
+ protected static $calledMethods = array();
+ /**
+ * currently opened path
+ *
+ * @var string
+ */
+ protected $path;
+
+ /**
+ * records method call for given path
+ *
+ * @param string $method
+ * @param string $path
+ */
+ protected static function recordMethodCall($method, $path)
+ {
+ if (isset(self::$calledMethods[$path]) === false) {
+ self::$calledMethods[$path] = array();
+ }
+
+ self::$calledMethods[$path][] = $method;
+ }
+
+ /**
+ * returns recorded method calls for given path
+ *
+ * @param string $path
+ * @return array<string>
+ */
+ public static function getMethodCalls($path)
+ {
+ if (isset(self::$calledMethods[$path]) === true) {
+ return self::$calledMethods[$path];
+ }
+
+ return array();
+ }
+
+ /**
+ * helper method for setting up vfsStream with the proxy
+ *
+ * @param string $rootDirName optional name of root directory
+ * @param int $permissions optional file permissions of root directory
+ * @return vfsStreamDirectory
+ * @throws vfsStreamException
+ */
+ public static function setup($rootDirName = 'root', $permissions = null)
+ {
+ self::$root = vfsStream::newDirectory($rootDirName, $permissions);
+ if (true === self::$registered) {
+ return self::$root;
+ }
+
+ if (@stream_wrapper_register(vfsStream::SCHEME, __CLASS__) === false) {
+ throw new vfsStreamException('A handler has already been registered for the ' . vfsStream::SCHEME . ' protocol.');
+ }
+
+ self::$registered = true;
+ return self::$root;
+ }
+
+ /**
+ * open the stream
+ *
+ * @param string $path the path to open
+ * @param string $mode mode for opening
+ * @param string $options options for opening
+ * @param string $opened_path full path that was actually opened
+ * @return bool
+ */
+ public function stream_open($path, $mode, $options, $opened_path)
+ {
+ $this->path = $path;
+ self::recordMethodCall('stream_open', $this->path);
+ return parent::stream_open($path, $mode, $options, $opened_path);
+ }
+
+ /**
+ * closes the stream
+ */
+ public function stream_close()
+ {
+ self::recordMethodCall('stream_close', $this->path);
+ return parent::stream_close();
+ }
+
+ /**
+ * read the stream up to $count bytes
+ *
+ * @param int $count amount of bytes to read
+ * @return string
+ */
+ public function stream_read($count)
+ {
+ self::recordMethodCall('stream_read', $this->path);
+ return parent::stream_read($count);
+ }
+
+ /**
+ * writes data into the stream
+ *
+ * @param string $data
+ * @return int amount of bytes written
+ */
+ public function stream_write($data)
+ {
+ self::recordMethodCall('stream_write', $this->path);
+ return parent::stream_write($data);
+ }
+
+ /**
+ * checks whether stream is at end of file
+ *
+ * @return bool
+ */
+ public function stream_eof()
+ {
+ self::recordMethodCall('stream_eof', $this->path);
+ return parent::stream_eof();
+ }
+
+ /**
+ * returns the current position of the stream
+ *
+ * @return int
+ */
+ public function stream_tell()
+ {
+ self::recordMethodCall('stream_tell', $this->path);
+ return parent::stream_tell();
+ }
+
+ /**
+ * seeks to the given offset
+ *
+ * @param int $offset
+ * @param int $whence
+ * @return bool
+ */
+ public function stream_seek($offset, $whence)
+ {
+ self::recordMethodCall('stream_seek', $this->path);
+ return parent::stream_seek($offset, $whence);
+ }
+
+ /**
+ * flushes unstored data into storage
+ *
+ * @return bool
+ */
+ public function stream_flush()
+ {
+ self::recordMethodCall('stream_flush', $this->path);
+ return parent::stream_flush();
+ }
+
+ /**
+ * returns status of stream
+ *
+ * @return array
+ */
+ public function stream_stat()
+ {
+ self::recordMethodCall('stream_stat', $this->path);
+ return parent::stream_stat();
+ }
+
+ /**
+ * retrieve the underlaying resource
+ *
+ * @param int $cast_as
+ * @return bool
+ */
+ public function stream_cast($cast_as)
+ {
+ self::recordMethodCall('stream_cast', $this->path);
+ return parent::stream_cast($cast_as);
+ }
+
+ /**
+ * set lock status for stream
+ *
+ * @param int $operation
+ * @return bool
+ */
+ public function stream_lock($operation)
+ {
+ self::recordMethodCall('stream_link', $this->path);
+ return parent::stream_lock($operation);
+ }
+
+ /**
+ * remove the data under the given path
+ *
+ * @param string $path
+ * @return bool
+ */
+ public function unlink($path)
+ {
+ self::recordMethodCall('unlink', $path);
+ return parent::unlink($path);
+ }
+
+ /**
+ * rename from one path to another
+ *
+ * @param string $path_from
+ * @param string $path_to
+ * @return bool
+ */
+ public function rename($path_from, $path_to)
+ {
+ self::recordMethodCall('rename', $path_from);
+ return parent::rename($path_from, $path_to);
+ }
+
+ /**
+ * creates a new directory
+ *
+ * @param string $path
+ * @param int $mode
+ * @param int $options
+ * @return bool
+ */
+ public function mkdir($path, $mode, $options)
+ {
+ self::recordMethodCall('mkdir', $path);
+ return parent::mkdir($path, $mode, $options);
+ }
+
+ /**
+ * removes a directory
+ *
+ * @param string $path
+ * @param int $options
+ * @return bool
+ */
+ public function rmdir($path, $options)
+ {
+ self::recordMethodCall('rmdir', $path);
+ return parent::rmdir($path, $options);
+ }
+
+ /**
+ * opens a directory
+ *
+ * @param string $path
+ * @param int $options
+ * @return bool
+ */
+ public function dir_opendir($path, $options)
+ {
+ $this->path = $path;
+ self::recordMethodCall('dir_opendir', $this->path);
+ return parent::dir_opendir($path, $options);
+ }
+
+ /**
+ * reads directory contents
+ *
+ * @return string
+ */
+ public function dir_readdir()
+ {
+ self::recordMethodCall('dir_readdir', $this->path);
+ return parent::dir_readdir();
+ }
+
+ /**
+ * reset directory iteration
+ *
+ * @return bool
+ */
+ public function dir_rewinddir()
+ {
+ self::recordMethodCall('dir_rewinddir', $this->path);
+ return parent::dir_rewinddir();
+ }
+
+ /**
+ * closes directory
+ *
+ * @return bool
+ */
+ public function dir_closedir()
+ {
+ self::recordMethodCall('dir_closedir', $this->path);
+ return parent::dir_closedir();
+ }
+
+ /**
+ * returns status of url
+ *
+ * @param string $path path of url to return status for
+ * @param int $flags flags set by the stream API
+ * @return array
+ */
+ public function url_stat($path, $flags)
+ {
+ self::recordMethodCall('url_stat', $path);
+ return parent::url_stat($path, $flags);
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php
new file mode 100644
index 0000000..9bb6079
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php
@@ -0,0 +1,1054 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Helper class for the test.
+ */
+class TestvfsStreamAbstractContent extends vfsStreamAbstractContent
+{
+ /**
+ * returns default permissions for concrete implementation
+ *
+ * @return int
+ * @since 0.8.0
+ */
+ protected function getDefaultPermissions()
+ {
+ return 0777;
+ }
+
+ /**
+ * returns size of content
+ *
+ * @return int
+ */
+ public function size()
+ {
+ return 0;
+ }
+}
+/**
+ * Test for org\bovigo\vfs\vfsStreamAbstractContent.
+ */
+class vfsStreamAbstractContentTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function noPermissionsForEveryone()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0000);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function executePermissionsForUser()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0100);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function executePermissionsForGroup()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0010);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function executePermissionsForOther()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0001);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function writePermissionsForUser()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0200);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function writePermissionsForGroup()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0020);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function writePermissionsForOther()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0002);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function executeAndWritePermissionsForUser()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0300);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function executeAndWritePermissionsForGroup()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0030);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function executeAndWritePermissionsForOther()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0003);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function readPermissionsForUser()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0400);
+ $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function readPermissionsForGroup()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0040);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function readPermissionsForOther()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0004);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function readAndExecutePermissionsForUser()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0500);
+ $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function readAndExecutePermissionsForGroup()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0050);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function readAndExecutePermissionsForOther()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0005);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function readAndWritePermissionsForUser()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0600);
+ $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function readAndWritePermissionsForGroup()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0060);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function readAndWritePermissionsForOther()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0006);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function allPermissionsForUser()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0700);
+ $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function allPermissionsForGroup()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0070);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function allPermissionsForOther()
+ {
+ $abstractContent = new TestvfsStreamAbstractContent('foo', 0007);
+ $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isReadable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isReadable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isWritable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isWritable(-1,
+ -1
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(),
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertFalse($abstractContent->isExecutable(-1,
+ vfsStream::getCurrentGroup()
+ )
+ );
+ $this->assertTrue($abstractContent->isExecutable(-1,
+ -1
+ )
+ );
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php
new file mode 100644
index 0000000..33222f7
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php
@@ -0,0 +1,89 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamBlock.
+ */
+class vfsStreamBlockTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * The block device being tested.
+ *
+ * @var vfsStreamBlock $block
+ */
+ protected $block;
+
+ public function setUp()
+ {
+ $this->block = new vfsStreamBlock('foo');
+ }
+
+ /**
+ * test default values and methods
+ *
+ * @test
+ */
+ public function defaultValues()
+ {
+ $this->assertEquals(vfsStreamContent::TYPE_BLOCK, $this->block->getType());
+ $this->assertEquals('foo', $this->block->getName());
+ $this->assertTrue($this->block->appliesTo('foo'));
+ $this->assertFalse($this->block->appliesTo('foo/bar'));
+ $this->assertFalse($this->block->appliesTo('bar'));
+ }
+
+ /**
+ * tests how external functions see this object
+ *
+ * @test
+ */
+ public function external()
+ {
+ $root = vfsStream::setup('root');
+ $root->addChild(vfsStream::newBlock('foo'));
+ $this->assertEquals('block', filetype(vfsStream::url('root/foo')));
+ }
+
+ /**
+ * tests adding a complex structure
+ *
+ * @test
+ */
+ public function addStructure()
+ {
+ $structure = array(
+ 'topLevel' => array(
+ 'thisIsAFile' => 'file contents',
+ '[blockDevice]' => 'block contents'
+ )
+ );
+
+ $root = vfsStream::create($structure);
+
+ $this->assertSame('block', filetype(vfsStream::url('root/topLevel/blockDevice')));
+ }
+
+ /**
+ * tests that a blank name for a block device throws an exception
+ * @test
+ * @expectedException org\bovigo\vfs\vfsStreamException
+ */
+ public function createWithEmptyName()
+ {
+ $structure = array(
+ 'topLevel' => array(
+ 'thisIsAFile' => 'file contents',
+ '[]' => 'block contents'
+ )
+ );
+
+ $root = vfsStream::create($structure);
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php
new file mode 100644
index 0000000..e1b4fe1
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php
@@ -0,0 +1,112 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamContainerIterator.
+ */
+class vfsStreamContainerIteratorTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * instance to test
+ *
+ * @type vfsStreamDirectory
+ */
+ private $dir;
+ /**
+ * child one
+ *
+ * @type \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $mockChild1;
+ /**
+ * child two
+ *
+ * @type \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $mockChild2;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->dir = new vfsStreamDirectory('foo');
+ $this->mockChild1 = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $this->mockChild1->expects($this->any())
+ ->method('getName')
+ ->will($this->returnValue('bar'));
+ $this->dir->addChild($this->mockChild1);
+ $this->mockChild2 = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $this->mockChild2->expects($this->any())
+ ->method('getName')
+ ->will($this->returnValue('baz'));
+ $this->dir->addChild($this->mockChild2);
+ }
+
+ /**
+ * clean up test environment
+ */
+ public function tearDown()
+ {
+ vfsStream::enableDotfiles();
+ }
+
+ /**
+ * @return array
+ */
+ public function provideSwitchWithExpectations()
+ {
+ return array(array(function() { vfsStream::disableDotfiles(); },
+ array()
+ ),
+ array(function() { vfsStream::enableDotfiles(); },
+ array('.', '..')
+ )
+ );
+ }
+
+ private function getDirName($dir)
+ {
+ if (is_string($dir)) {
+ return $dir;
+ }
+
+
+ return $dir->getName();
+ }
+
+ /**
+ * @param \Closure $dotFilesSwitch
+ * @param array $dirNames
+ * @test
+ * @dataProvider provideSwitchWithExpectations
+ */
+ public function iteration(\Closure $dotFilesSwitch, array $dirs)
+ {
+ $dirs[] = $this->mockChild1;
+ $dirs[] = $this->mockChild2;
+ $dotFilesSwitch();
+ $dirIterator = $this->dir->getIterator();
+ foreach ($dirs as $dir) {
+ $this->assertEquals($this->getDirName($dir), $dirIterator->key());
+ $this->assertTrue($dirIterator->valid());
+ if (!is_string($dir)) {
+ $this->assertSame($dir, $dirIterator->current());
+ }
+
+ $dirIterator->next();
+ }
+
+ $this->assertFalse($dirIterator->valid());
+ $this->assertNull($dirIterator->key());
+ $this->assertNull($dirIterator->current());
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php
new file mode 100644
index 0000000..89cde1c
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamDirectory.
+ *
+ * @group bug_18
+ */
+class vfsStreamDirectoryIssue18TestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * access to root directory
+ *
+ * @var vfsStreamDirectory
+ */
+ protected $rootDirectory;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->rootDirectory = vfsStream::newDirectory('/');
+ $this->rootDirectory->addChild(vfsStream::newDirectory('var/log/app'));
+ $dir = $this->rootDirectory->getChild('var/log/app');
+ $dir->addChild(vfsStream::newDirectory('app1'));
+ $dir->addChild(vfsStream::newDirectory('app2'));
+ $dir->addChild(vfsStream::newDirectory('foo'));
+ }
+
+ /**
+ * @test
+ */
+ public function shouldContainThreeSubdirectories()
+ {
+ $this->assertEquals(3,
+ count($this->rootDirectory->getChild('var/log/app')->getChildren())
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function shouldContainSubdirectoryFoo()
+ {
+ $this->assertTrue($this->rootDirectory->getChild('var/log/app')->hasChild('foo'));
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory',
+ $this->rootDirectory->getChild('var/log/app')->getChild('foo')
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function shouldContainSubdirectoryApp1()
+ {
+ $this->assertTrue($this->rootDirectory->getChild('var/log/app')->hasChild('app1'));
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory',
+ $this->rootDirectory->getChild('var/log/app')->getChild('app1')
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function shouldContainSubdirectoryApp2()
+ {
+ $this->assertTrue($this->rootDirectory->getChild('var/log/app')->hasChild('app2'));
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory',
+ $this->rootDirectory->getChild('var/log/app')->getChild('app2')
+ );
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php
new file mode 100644
index 0000000..f8b9384
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php
@@ -0,0 +1,335 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamDirectory.
+ */
+class vfsStreamDirectoryTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * instance to test
+ *
+ * @var vfsStreamDirectory
+ */
+ protected $dir;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->dir = new vfsStreamDirectory('foo');
+ }
+
+ /**
+ * assure that a directory seperator inside the name throws an exception
+ *
+ * @test
+ * @expectedException org\bovigo\vfs\vfsStreamException
+ */
+ public function invalidCharacterInName()
+ {
+ $dir = new vfsStreamDirectory('foo/bar');
+ }
+
+ /**
+ * test default values and methods
+ *
+ * @test
+ */
+ public function defaultValues()
+ {
+ $this->assertEquals(vfsStreamContent::TYPE_DIR, $this->dir->getType());
+ $this->assertEquals('foo', $this->dir->getName());
+ $this->assertTrue($this->dir->appliesTo('foo'));
+ $this->assertTrue($this->dir->appliesTo('foo/bar'));
+ $this->assertFalse($this->dir->appliesTo('bar'));
+ $this->assertEquals(array(), $this->dir->getChildren());
+ }
+
+ /**
+ * test renaming the directory
+ *
+ * @test
+ */
+ public function rename()
+ {
+ $this->dir->rename('bar');
+ $this->assertEquals('bar', $this->dir->getName());
+ $this->assertFalse($this->dir->appliesTo('foo'));
+ $this->assertFalse($this->dir->appliesTo('foo/bar'));
+ $this->assertTrue($this->dir->appliesTo('bar'));
+ }
+
+ /**
+ * renaming the directory to an invalid name throws a vfsStreamException
+ *
+ * @test
+ * @expectedException org\bovigo\vfs\vfsStreamException
+ */
+ public function renameToInvalidNameThrowsvfsStreamException()
+ {
+ $this->dir->rename('foo/baz');
+ }
+
+ /**
+ * @test
+ * @since 0.10.0
+ */
+ public function hasNoChildrenByDefault()
+ {
+ $this->assertFalse($this->dir->hasChildren());
+ }
+
+ /**
+ * @test
+ * @since 0.10.0
+ */
+ public function hasChildrenReturnsTrueIfAtLeastOneChildPresent()
+ {
+ $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $mockChild->expects($this->any())
+ ->method('appliesTo')
+ ->will($this->returnValue(false));
+ $mockChild->expects($this->any())
+ ->method('getName')
+ ->will($this->returnValue('baz'));
+ $this->dir->addChild($mockChild);
+ $this->assertTrue($this->dir->hasChildren());
+ }
+
+ /**
+ * @test
+ */
+ public function hasChildReturnsFalseForNonExistingChild()
+ {
+ $this->assertFalse($this->dir->hasChild('bar'));
+ }
+
+ /**
+ * @test
+ */
+ public function getChildReturnsNullForNonExistingChild()
+ {
+ $this->assertNull($this->dir->getChild('bar'));
+ }
+
+ /**
+ * @test
+ */
+ public function removeChildReturnsFalseForNonExistingChild()
+ {
+ $this->assertFalse($this->dir->removeChild('bar'));
+ }
+
+ /**
+ * @test
+ */
+ public function nonExistingChild()
+ {
+ $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $mockChild->expects($this->any())
+ ->method('appliesTo')
+ ->will($this->returnValue(false));
+ $mockChild->expects($this->any())
+ ->method('getName')
+ ->will($this->returnValue('baz'));
+ $this->dir->addChild($mockChild);
+ $this->assertFalse($this->dir->removeChild('bar'));
+ }
+
+ /**
+ * test that adding, handling and removing of a child works as expected
+ *
+ * @test
+ */
+ public function childHandling()
+ {
+ $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $mockChild->expects($this->any())
+ ->method('getType')
+ ->will($this->returnValue(vfsStreamContent::TYPE_FILE));
+ $mockChild->expects($this->any())
+ ->method('getName')
+ ->will($this->returnValue('bar'));
+ $mockChild->expects($this->any())
+ ->method('appliesTo')
+ ->with($this->equalTo('bar'))
+ ->will($this->returnValue(true));
+ $mockChild->expects($this->once())
+ ->method('size')
+ ->will($this->returnValue(5));
+ $this->dir->addChild($mockChild);
+ $this->assertTrue($this->dir->hasChild('bar'));
+ $bar = $this->dir->getChild('bar');
+ $this->assertSame($mockChild, $bar);
+ $this->assertEquals(array($mockChild), $this->dir->getChildren());
+ $this->assertEquals(0, $this->dir->size());
+ $this->assertEquals(5, $this->dir->sizeSummarized());
+ $this->assertTrue($this->dir->removeChild('bar'));
+ $this->assertEquals(array(), $this->dir->getChildren());
+ $this->assertEquals(0, $this->dir->size());
+ $this->assertEquals(0, $this->dir->sizeSummarized());
+ }
+
+ /**
+ * test that adding, handling and removing of a child works as expected
+ *
+ * @test
+ */
+ public function childHandlingWithSubdirectory()
+ {
+ $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $mockChild->expects($this->any())
+ ->method('getType')
+ ->will($this->returnValue(vfsStreamContent::TYPE_FILE));
+ $mockChild->expects($this->any())
+ ->method('getName')
+ ->will($this->returnValue('bar'));
+ $mockChild->expects($this->once())
+ ->method('size')
+ ->will($this->returnValue(5));
+ $subdir = new vfsStreamDirectory('subdir');
+ $subdir->addChild($mockChild);
+ $this->dir->addChild($subdir);
+ $this->assertTrue($this->dir->hasChild('subdir'));
+ $this->assertSame($subdir, $this->dir->getChild('subdir'));
+ $this->assertEquals(array($subdir), $this->dir->getChildren());
+ $this->assertEquals(0, $this->dir->size());
+ $this->assertEquals(5, $this->dir->sizeSummarized());
+ $this->assertTrue($this->dir->removeChild('subdir'));
+ $this->assertEquals(array(), $this->dir->getChildren());
+ $this->assertEquals(0, $this->dir->size());
+ $this->assertEquals(0, $this->dir->sizeSummarized());
+ }
+
+ /**
+ * dd
+ *
+ * @test
+ * @group regression
+ * @group bug_5
+ */
+ public function addChildReplacesChildWithSameName_Bug_5()
+ {
+ $mockChild1 = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $mockChild1->expects($this->any())
+ ->method('getType')
+ ->will($this->returnValue(vfsStreamContent::TYPE_FILE));
+ $mockChild1->expects($this->any())
+ ->method('getName')
+ ->will($this->returnValue('bar'));
+ $mockChild2 = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $mockChild2->expects($this->any())
+ ->method('getType')
+ ->will($this->returnValue(vfsStreamContent::TYPE_FILE));
+ $mockChild2->expects($this->any())
+ ->method('getName')
+ ->will($this->returnValue('bar'));
+ $this->dir->addChild($mockChild1);
+ $this->assertTrue($this->dir->hasChild('bar'));
+ $this->assertSame($mockChild1, $this->dir->getChild('bar'));
+ $this->dir->addChild($mockChild2);
+ $this->assertTrue($this->dir->hasChild('bar'));
+ $this->assertSame($mockChild2, $this->dir->getChild('bar'));
+ }
+
+ /**
+ * When testing for a nested path, verify that directory separators are respected properly
+ * so that subdir1/subdir2 is not considered equal to subdir1Xsubdir2.
+ *
+ * @test
+ * @group bug_24
+ * @group regression
+ */
+ public function explicitTestForSeparatorWithNestedPaths_Bug_24()
+ {
+ $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $mockChild->expects($this->any())
+ ->method('getType')
+ ->will($this->returnValue(vfsStreamContent::TYPE_FILE));
+ $mockChild->expects($this->any())
+ ->method('getName')
+ ->will($this->returnValue('bar'));
+
+ $subdir1 = new vfsStreamDirectory('subdir1');
+ $this->dir->addChild($subdir1);
+
+ $subdir2 = new vfsStreamDirectory('subdir2');
+ $subdir1->addChild($subdir2);
+
+ $subdir2->addChild($mockChild);
+
+ $this->assertTrue($this->dir->hasChild('subdir1'), "Level 1 path with separator exists");
+ $this->assertTrue($this->dir->hasChild('subdir1/subdir2'), "Level 2 path with separator exists");
+ $this->assertTrue($this->dir->hasChild('subdir1/subdir2/bar'), "Level 3 path with separator exists");
+ $this->assertFalse($this->dir->hasChild('subdir1.subdir2'), "Path with period does not exist");
+ $this->assertFalse($this->dir->hasChild('subdir1.subdir2/bar'), "Nested path with period does not exist");
+ }
+
+
+ /**
+ * setting and retrieving permissions for a directory
+ *
+ * @test
+ * @group permissions
+ */
+ public function permissions()
+ {
+ $this->assertEquals(0777, $this->dir->getPermissions());
+ $this->assertSame($this->dir, $this->dir->chmod(0755));
+ $this->assertEquals(0755, $this->dir->getPermissions());
+ }
+
+ /**
+ * setting and retrieving permissions for a directory
+ *
+ * @test
+ * @group permissions
+ */
+ public function permissionsSet()
+ {
+ $this->dir = new vfsStreamDirectory('foo', 0755);
+ $this->assertEquals(0755, $this->dir->getPermissions());
+ $this->assertSame($this->dir, $this->dir->chmod(0700));
+ $this->assertEquals(0700, $this->dir->getPermissions());
+ }
+
+ /**
+ * setting and retrieving owner of a file
+ *
+ * @test
+ * @group permissions
+ */
+ public function owner()
+ {
+ $this->assertEquals(vfsStream::getCurrentUser(), $this->dir->getUser());
+ $this->assertTrue($this->dir->isOwnedByUser(vfsStream::getCurrentUser()));
+ $this->assertSame($this->dir, $this->dir->chown(vfsStream::OWNER_USER_1));
+ $this->assertEquals(vfsStream::OWNER_USER_1, $this->dir->getUser());
+ $this->assertTrue($this->dir->isOwnedByUser(vfsStream::OWNER_USER_1));
+ }
+
+ /**
+ * setting and retrieving owner group of a file
+ *
+ * @test
+ * @group permissions
+ */
+ public function group()
+ {
+ $this->assertEquals(vfsStream::getCurrentGroup(), $this->dir->getGroup());
+ $this->assertTrue($this->dir->isOwnedByGroup(vfsStream::getCurrentGroup()));
+ $this->assertSame($this->dir, $this->dir->chgrp(vfsStream::GROUP_USER_1));
+ $this->assertEquals(vfsStream::GROUP_USER_1, $this->dir->getGroup());
+ $this->assertTrue($this->dir->isOwnedByGroup(vfsStream::GROUP_USER_1));
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php
new file mode 100644
index 0000000..9763560
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for LOCK_EX behaviour related to file_put_contents().
+ *
+ * @group lock_fpc
+ * @author https://github.com/iwyg
+ */
+class vfsStreamExLockTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * set up test environment
+ */
+ protected function setUp()
+ {
+ $root = vfsStream::setup();
+ vfsStream::newFile('testfile')->at($root);
+
+ }
+
+ /**
+ * This test verifies the current behaviour where vfsStream URLs do not work
+ * with file_put_contents() and LOCK_EX. The test is intended to break once
+ * PHP changes this so we get notified about the change.
+ *
+ * @test
+ */
+ public function filePutContentsLockShouldReportError()
+ {
+ @file_put_contents(vfsStream::url('root/testfile'), "some string\n", LOCK_EX);
+ $php_error = error_get_last();
+ $this->assertEquals("file_put_contents(): Exclusive locks may only be set for regular files", $php_error['message']);
+ }
+
+ /**
+ * @test
+ */
+ public function flockSouldPass()
+ {
+ $fp = fopen(vfsStream::url('root/testfile'), 'w');
+ flock($fp, LOCK_EX);
+ fwrite($fp, "another string\n");
+ flock($fp, LOCK_UN);
+ fclose($fp);
+ $this->assertEquals("another string\n", file_get_contents(vfsStream::url('root/testfile')));
+ }
+}
+
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php
new file mode 100644
index 0000000..5fe15d0
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php
@@ -0,0 +1,306 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamFile.
+ */
+class vfsStreamFileTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * instance to test
+ *
+ * @var vfsStreamFile
+ */
+ protected $file;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->file = new vfsStreamFile('foo');
+ }
+
+ /**
+ * test default values and methods
+ *
+ * @test
+ */
+ public function defaultValues()
+ {
+ $this->assertEquals(vfsStreamContent::TYPE_FILE, $this->file->getType());
+ $this->assertEquals('foo', $this->file->getName());
+ $this->assertTrue($this->file->appliesTo('foo'));
+ $this->assertFalse($this->file->appliesTo('foo/bar'));
+ $this->assertFalse($this->file->appliesTo('bar'));
+ }
+
+ /**
+ * test setting and getting the content of a file
+ *
+ * @test
+ */
+ public function content()
+ {
+ $this->assertNull($this->file->getContent());
+ $this->assertSame($this->file, $this->file->setContent('bar'));
+ $this->assertEquals('bar', $this->file->getContent());
+ $this->assertSame($this->file, $this->file->withContent('baz'));
+ $this->assertEquals('baz', $this->file->getContent());
+ }
+
+ /**
+ * test renaming the directory
+ *
+ * @test
+ */
+ public function rename()
+ {
+ $this->file->rename('bar');
+ $this->assertEquals('bar', $this->file->getName());
+ $this->assertFalse($this->file->appliesTo('foo'));
+ $this->assertFalse($this->file->appliesTo('foo/bar'));
+ $this->assertTrue($this->file->appliesTo('bar'));
+ }
+
+ /**
+ * test reading contents from the file
+ *
+ * @test
+ */
+ public function readEmptyFile()
+ {
+ $this->assertTrue($this->file->eof());
+ $this->assertEquals(0, $this->file->size());
+ $this->assertEquals('', $this->file->read(5));
+ $this->assertEquals(5, $this->file->getBytesRead());
+ $this->assertTrue($this->file->eof());
+ }
+
+ /**
+ * test reading contents from the file
+ *
+ * @test
+ */
+ public function read()
+ {
+ $this->file->setContent('foobarbaz');
+ $this->assertFalse($this->file->eof());
+ $this->assertEquals(9, $this->file->size());
+ $this->assertEquals('foo', $this->file->read(3));
+ $this->assertEquals(3, $this->file->getBytesRead());
+ $this->assertFalse($this->file->eof());
+ $this->assertEquals(9, $this->file->size());
+ $this->assertEquals('bar', $this->file->read(3));
+ $this->assertEquals(6, $this->file->getBytesRead());
+ $this->assertFalse($this->file->eof());
+ $this->assertEquals(9, $this->file->size());
+ $this->assertEquals('baz', $this->file->read(3));
+ $this->assertEquals(9, $this->file->getBytesRead());
+ $this->assertEquals(9, $this->file->size());
+ $this->assertTrue($this->file->eof());
+ $this->assertEquals('', $this->file->read(3));
+ }
+
+ /**
+ * test seeking to offset
+ *
+ * @test
+ */
+ public function seekEmptyFile()
+ {
+ $this->assertFalse($this->file->seek(0, 55));
+ $this->assertTrue($this->file->seek(0, SEEK_SET));
+ $this->assertEquals(0, $this->file->getBytesRead());
+ $this->assertTrue($this->file->seek(5, SEEK_SET));
+ $this->assertEquals(5, $this->file->getBytesRead());
+ $this->assertTrue($this->file->seek(0, SEEK_CUR));
+ $this->assertEquals(5, $this->file->getBytesRead());
+ $this->assertTrue($this->file->seek(2, SEEK_CUR));
+ $this->assertEquals(7, $this->file->getBytesRead());
+ $this->assertTrue($this->file->seek(0, SEEK_END));
+ $this->assertEquals(0, $this->file->getBytesRead());
+ $this->assertTrue($this->file->seek(2, SEEK_END));
+ $this->assertEquals(2, $this->file->getBytesRead());
+ }
+
+ /**
+ * test seeking to offset
+ *
+ * @test
+ */
+ public function seekRead()
+ {
+ $this->file->setContent('foobarbaz');
+ $this->assertFalse($this->file->seek(0, 55));
+ $this->assertTrue($this->file->seek(0, SEEK_SET));
+ $this->assertEquals('foobarbaz', $this->file->readUntilEnd());
+ $this->assertEquals(0, $this->file->getBytesRead());
+ $this->assertTrue($this->file->seek(5, SEEK_SET));
+ $this->assertEquals('rbaz', $this->file->readUntilEnd());
+ $this->assertEquals(5, $this->file->getBytesRead());
+ $this->assertTrue($this->file->seek(0, SEEK_CUR));
+ $this->assertEquals('rbaz', $this->file->readUntilEnd());
+ $this->assertEquals(5, $this->file->getBytesRead(), 5);
+ $this->assertTrue($this->file->seek(2, SEEK_CUR));
+ $this->assertEquals('az', $this->file->readUntilEnd());
+ $this->assertEquals(7, $this->file->getBytesRead());
+ $this->assertTrue($this->file->seek(0, SEEK_END));
+ $this->assertEquals('', $this->file->readUntilEnd());
+ $this->assertEquals(9, $this->file->getBytesRead());
+ $this->assertTrue($this->file->seek(2, SEEK_END));
+ $this->assertEquals('', $this->file->readUntilEnd());
+ $this->assertEquals(11, $this->file->getBytesRead());
+ }
+
+ /**
+ * test writing data into the file
+ *
+ * @test
+ */
+ public function writeEmptyFile()
+ {
+ $this->assertEquals(3, $this->file->write('foo'));
+ $this->assertEquals('foo', $this->file->getContent());
+ $this->assertEquals(3, $this->file->size());
+ $this->assertEquals(3, $this->file->write('bar'));
+ $this->assertEquals('foobar', $this->file->getContent());
+ $this->assertEquals(6, $this->file->size());
+ }
+
+ /**
+ * test writing data into the file
+ *
+ * @test
+ */
+ public function write()
+ {
+ $this->file->setContent('foobarbaz');
+ $this->assertTrue($this->file->seek(3, SEEK_SET));
+ $this->assertEquals(3, $this->file->write('foo'));
+ $this->assertEquals('foofoobaz', $this->file->getContent());
+ $this->assertEquals(9, $this->file->size());
+ $this->assertEquals(3, $this->file->write('bar'));
+ $this->assertEquals('foofoobar', $this->file->getContent());
+ $this->assertEquals(9, $this->file->size());
+ }
+
+ /**
+ * setting and retrieving permissions for a file
+ *
+ * @test
+ * @group permissions
+ */
+ public function permissions()
+ {
+ $this->assertEquals(0666, $this->file->getPermissions());
+ $this->assertSame($this->file, $this->file->chmod(0644));
+ $this->assertEquals(0644, $this->file->getPermissions());
+ }
+
+ /**
+ * setting and retrieving permissions for a file
+ *
+ * @test
+ * @group permissions
+ */
+ public function permissionsSet()
+ {
+ $this->file = new vfsStreamFile('foo', 0644);
+ $this->assertEquals(0644, $this->file->getPermissions());
+ $this->assertSame($this->file, $this->file->chmod(0600));
+ $this->assertEquals(0600, $this->file->getPermissions());
+ }
+
+ /**
+ * setting and retrieving owner of a file
+ *
+ * @test
+ * @group permissions
+ */
+ public function owner()
+ {
+ $this->assertEquals(vfsStream::getCurrentUser(), $this->file->getUser());
+ $this->assertTrue($this->file->isOwnedByUser(vfsStream::getCurrentUser()));
+ $this->assertSame($this->file, $this->file->chown(vfsStream::OWNER_USER_1));
+ $this->assertEquals(vfsStream::OWNER_USER_1, $this->file->getUser());
+ $this->assertTrue($this->file->isOwnedByUser(vfsStream::OWNER_USER_1));
+ }
+
+ /**
+ * setting and retrieving owner group of a file
+ *
+ * @test
+ * @group permissions
+ */
+ public function group()
+ {
+ $this->assertEquals(vfsStream::getCurrentGroup(), $this->file->getGroup());
+ $this->assertTrue($this->file->isOwnedByGroup(vfsStream::getCurrentGroup()));
+ $this->assertSame($this->file, $this->file->chgrp(vfsStream::GROUP_USER_1));
+ $this->assertEquals(vfsStream::GROUP_USER_1, $this->file->getGroup());
+ $this->assertTrue($this->file->isOwnedByGroup(vfsStream::GROUP_USER_1));
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ * @since 1.1.0
+ */
+ public function truncateRemovesSuperflouosContent()
+ {
+ $this->assertEquals(11, $this->file->write("lorem ipsum"));
+ $this->assertTrue($this->file->truncate(5));
+ $this->assertEquals(5, $this->file->size());
+ $this->assertEquals('lorem', $this->file->getContent());
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ * @since 1.1.0
+ */
+ public function truncateToGreaterSizeAddsZeroBytes()
+ {
+ $this->assertEquals(11, $this->file->write("lorem ipsum"));
+ $this->assertTrue($this->file->truncate(25));
+ $this->assertEquals(25, $this->file->size());
+ $this->assertEquals("lorem ipsum\0\0\0\0\0\0\0\0\0\0\0\0\0\0", $this->file->getContent());
+ }
+
+ /**
+ * @test
+ * @group issue_79
+ * @since 1.3.0
+ */
+ public function withContentAcceptsAnyFileContentInstance()
+ {
+ $mockFileContent = $this->getMock('org\bovigo\vfs\content\FileContent');
+ $mockFileContent->expects($this->once())
+ ->method('content')
+ ->will($this->returnValue('foobarbaz'));
+ $this->assertEquals(
+ 'foobarbaz',
+ $this->file->withContent($mockFileContent)
+ ->getContent()
+ );
+ }
+
+ /**
+ * @test
+ * @group issue_79
+ * @expectedException \InvalidArgumentException
+ * @since 1.3.0
+ */
+ public function withContentThrowsInvalidArgumentExceptionWhenContentIsNoStringAndNoFileContent()
+ {
+ $this->file->withContent(313);
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php
new file mode 100644
index 0000000..24884ed
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStream.
+ *
+ * @since 0.9.0
+ * @group issue_2
+ */
+class vfsStreamGlobTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @test
+ */
+ public function globDoesNotWorkWithVfsStreamUrls()
+ {
+ $root = vfsStream::setup('example');
+ mkdir(vfsStream::url('example/test/'), 0777, true);
+ $this->assertEmpty(glob(vfsStream::url('example'), GLOB_MARK));
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php
new file mode 100644
index 0000000..106dae6
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStream.
+ *
+ * @since 0.9.0
+ * @group issue_5
+ */
+class vfsStreamResolveIncludePathTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * include path to restore after test run
+ *
+ * @var string
+ */
+ protected $backupIncludePath;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->backupIncludePath = get_include_path();
+ vfsStream::setup();
+ mkdir('vfs://root/a/path', 0777, true);
+ set_include_path('vfs://root/a' . PATH_SEPARATOR . $this->backupIncludePath);
+ }
+
+ /**
+ * clean up test environment
+ */
+ public function tearDown()
+ {
+ set_include_path($this->backupIncludePath);
+ }
+
+ /**
+ * @test
+ */
+ public function knownFileCanBeResolved()
+ {
+ file_put_contents('vfs://root/a/path/knownFile.php', '<?php ?>');
+ $this->assertEquals('vfs://root/a/path/knownFile.php', stream_resolve_include_path('path/knownFile.php'));
+ }
+
+ /**
+ * @test
+ */
+ public function unknownFileCanNotBeResolvedYieldsFalse()
+ {
+ $this->assertFalse(@stream_resolve_include_path('path/unknownFile.php'));
+ }
+}
+?>
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php
new file mode 100644
index 0000000..530d664
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php
@@ -0,0 +1,728 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStream.
+ */
+class vfsStreamTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ vfsStreamWrapper::register();
+ }
+
+ /**
+ * assure that path2url conversion works correct
+ *
+ * @test
+ */
+ public function url()
+ {
+ $this->assertEquals('vfs://foo', vfsStream::url('foo'));
+ $this->assertEquals('vfs://foo/bar.baz', vfsStream::url('foo/bar.baz'));
+ $this->assertEquals('vfs://foo/bar.baz', vfsStream::url('foo\bar.baz'));
+ }
+
+ /**
+ * assure that url2path conversion works correct
+ *
+ * @test
+ */
+ public function path()
+ {
+ $this->assertEquals('foo', vfsStream::path('vfs://foo'));
+ $this->assertEquals('foo/bar.baz', vfsStream::path('vfs://foo/bar.baz'));
+ $this->assertEquals('foo/bar.baz', vfsStream::path('vfs://foo\bar.baz'));
+ }
+
+ /**
+ * windows directory separators are converted into default separator
+ *
+ * @author Gabriel Birke
+ * @test
+ */
+ public function pathConvertsWindowsDirectorySeparators()
+ {
+ $this->assertEquals('foo/bar', vfsStream::path('vfs://foo\\bar'));
+ }
+
+ /**
+ * trailing whitespace should be removed
+ *
+ * @author Gabriel Birke
+ * @test
+ */
+ public function pathRemovesTrailingWhitespace()
+ {
+ $this->assertEquals('foo/bar', vfsStream::path('vfs://foo/bar '));
+ }
+
+ /**
+ * trailing slashes are removed
+ *
+ * @author Gabriel Birke
+ * @test
+ */
+ public function pathRemovesTrailingSlash()
+ {
+ $this->assertEquals('foo/bar', vfsStream::path('vfs://foo/bar/'));
+ }
+
+ /**
+ * trailing slash and whitespace should be removed
+ *
+ * @author Gabriel Birke
+ * @test
+ */
+ public function pathRemovesTrailingSlashAndWhitespace()
+ {
+ $this->assertEquals('foo/bar', vfsStream::path('vfs://foo/bar/ '));
+ }
+
+ /**
+ * double slashes should be replaced by single slash
+ *
+ * @author Gabriel Birke
+ * @test
+ */
+ public function pathRemovesDoubleSlashes()
+ {
+ // Regular path
+ $this->assertEquals('my/path', vfsStream::path('vfs://my/path'));
+ // Path with double slashes
+ $this->assertEquals('my/path', vfsStream::path('vfs://my//path'));
+ }
+
+ /**
+ * test to create a new file
+ *
+ * @test
+ */
+ public function newFile()
+ {
+ $file = vfsStream::newFile('filename.txt');
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile', $file);
+ $this->assertEquals('filename.txt', $file->getName());
+ $this->assertEquals(0666, $file->getPermissions());
+ }
+
+ /**
+ * test to create a new file with non-default permissions
+ *
+ * @test
+ * @group permissions
+ */
+ public function newFileWithDifferentPermissions()
+ {
+ $file = vfsStream::newFile('filename.txt', 0644);
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile', $file);
+ $this->assertEquals('filename.txt', $file->getName());
+ $this->assertEquals(0644, $file->getPermissions());
+ }
+
+ /**
+ * test to create a new directory structure
+ *
+ * @test
+ */
+ public function newSingleDirectory()
+ {
+ $foo = vfsStream::newDirectory('foo');
+ $this->assertEquals('foo', $foo->getName());
+ $this->assertEquals(0, count($foo->getChildren()));
+ $this->assertEquals(0777, $foo->getPermissions());
+ }
+
+ /**
+ * test to create a new directory structure with non-default permissions
+ *
+ * @test
+ * @group permissions
+ */
+ public function newSingleDirectoryWithDifferentPermissions()
+ {
+ $foo = vfsStream::newDirectory('foo', 0755);
+ $this->assertEquals('foo', $foo->getName());
+ $this->assertEquals(0, count($foo->getChildren()));
+ $this->assertEquals(0755, $foo->getPermissions());
+ }
+
+ /**
+ * test to create a new directory structure
+ *
+ * @test
+ */
+ public function newDirectoryStructure()
+ {
+ $foo = vfsStream::newDirectory('foo/bar/baz');
+ $this->assertEquals('foo', $foo->getName());
+ $this->assertEquals(0777, $foo->getPermissions());
+ $this->assertTrue($foo->hasChild('bar'));
+ $this->assertTrue($foo->hasChild('bar/baz'));
+ $this->assertFalse($foo->hasChild('baz'));
+ $bar = $foo->getChild('bar');
+ $this->assertEquals('bar', $bar->getName());
+ $this->assertEquals(0777, $bar->getPermissions());
+ $this->assertTrue($bar->hasChild('baz'));
+ $baz1 = $bar->getChild('baz');
+ $this->assertEquals('baz', $baz1->getName());
+ $this->assertEquals(0777, $baz1->getPermissions());
+ $baz2 = $foo->getChild('bar/baz');
+ $this->assertSame($baz1, $baz2);
+ }
+
+ /**
+ * test that correct directory structure is created
+ *
+ * @test
+ */
+ public function newDirectoryWithSlashAtStart()
+ {
+ $foo = vfsStream::newDirectory('/foo/bar/baz', 0755);
+ $this->assertEquals('foo', $foo->getName());
+ $this->assertEquals(0755, $foo->getPermissions());
+ $this->assertTrue($foo->hasChild('bar'));
+ $this->assertTrue($foo->hasChild('bar/baz'));
+ $this->assertFalse($foo->hasChild('baz'));
+ $bar = $foo->getChild('bar');
+ $this->assertEquals('bar', $bar->getName());
+ $this->assertEquals(0755, $bar->getPermissions());
+ $this->assertTrue($bar->hasChild('baz'));
+ $baz1 = $bar->getChild('baz');
+ $this->assertEquals('baz', $baz1->getName());
+ $this->assertEquals(0755, $baz1->getPermissions());
+ $baz2 = $foo->getChild('bar/baz');
+ $this->assertSame($baz1, $baz2);
+ }
+
+ /**
+ * @test
+ * @group setup
+ * @since 0.7.0
+ */
+ public function setupRegistersStreamWrapperAndCreatesRootDirectoryWithDefaultNameAndPermissions()
+ {
+ $root = vfsStream::setup();
+ $this->assertSame($root, vfsStreamWrapper::getRoot());
+ $this->assertEquals('root', $root->getName());
+ $this->assertEquals(0777, $root->getPermissions());
+ }
+
+ /**
+ * @test
+ * @group setup
+ * @since 0.7.0
+ */
+ public function setupRegistersStreamWrapperAndCreatesRootDirectoryWithGivenNameAndDefaultPermissions()
+ {
+ $root = vfsStream::setup('foo');
+ $this->assertSame($root, vfsStreamWrapper::getRoot());
+ $this->assertEquals('foo', $root->getName());
+ $this->assertEquals(0777, $root->getPermissions());
+ }
+
+ /**
+ * @test
+ * @group setup
+ * @since 0.7.0
+ */
+ public function setupRegistersStreamWrapperAndCreatesRootDirectoryWithGivenNameAndPermissions()
+ {
+ $root = vfsStream::setup('foo', 0444);
+ $this->assertSame($root, vfsStreamWrapper::getRoot());
+ $this->assertEquals('foo', $root->getName());
+ $this->assertEquals(0444, $root->getPermissions());
+ }
+
+ /**
+ * @test
+ * @group issue_14
+ * @group issue_20
+ * @since 0.10.0
+ */
+ public function setupWithEmptyArrayIsEqualToSetup()
+ {
+ $root = vfsStream::setup('example',
+ 0755,
+ array()
+ );
+ $this->assertEquals('example', $root->getName());
+ $this->assertEquals(0755, $root->getPermissions());
+ $this->assertFalse($root->hasChildren());
+ }
+
+ /**
+ * @test
+ * @group issue_14
+ * @group issue_20
+ * @since 0.10.0
+ */
+ public function setupArraysAreTurnedIntoSubdirectories()
+ {
+ $root = vfsStream::setup('root',
+ null,
+ array('test' => array())
+ );
+ $this->assertTrue($root->hasChildren());
+ $this->assertTrue($root->hasChild('test'));
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory',
+ $root->getChild('test')
+ );
+ $this->assertFalse($root->getChild('test')->hasChildren());
+ }
+
+ /**
+ * @test
+ * @group issue_14
+ * @group issue_20
+ * @since 0.10.0
+ */
+ public function setupStringsAreTurnedIntoFilesWithContent()
+ {
+ $root = vfsStream::setup('root',
+ null,
+ array('test.txt' => 'some content')
+ );
+ $this->assertTrue($root->hasChildren());
+ $this->assertTrue($root->hasChild('test.txt'));
+ $this->assertVfsFile($root->getChild('test.txt'), 'some content');
+ }
+
+ /**
+ * @test
+ * @group issue_14
+ * @group issue_20
+ * @since 0.10.0
+ */
+ public function setupWorksRecursively()
+ {
+ $root = vfsStream::setup('root',
+ null,
+ array('test' => array('foo' => array('test.txt' => 'hello'),
+ 'baz.txt' => 'world'
+ )
+ )
+ );
+ $this->assertTrue($root->hasChildren());
+ $this->assertTrue($root->hasChild('test'));
+ $test = $root->getChild('test');
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $test);
+ $this->assertTrue($test->hasChildren());
+ $this->assertTrue($test->hasChild('baz.txt'));
+ $this->assertVfsFile($test->getChild('baz.txt'), 'world');
+
+ $this->assertTrue($test->hasChild('foo'));
+ $foo = $test->getChild('foo');
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $foo);
+ $this->assertTrue($foo->hasChildren());
+ $this->assertTrue($foo->hasChild('test.txt'));
+ $this->assertVfsFile($foo->getChild('test.txt'), 'hello');
+ }
+
+ /**
+ * @test
+ * @group issue_17
+ * @group issue_20
+ */
+ public function setupCastsNumericDirectoriesToStrings()
+ {
+ $root = vfsStream::setup('root',
+ null,
+ array(2011 => array ('test.txt' => 'some content'))
+ );
+ $this->assertTrue($root->hasChild('2011'));
+
+ $directory = $root->getChild('2011');
+ $this->assertVfsFile($directory->getChild('test.txt'), 'some content');
+
+ $this->assertTrue(file_exists('vfs://root/2011/test.txt'));
+ }
+
+ /**
+ * @test
+ * @group issue_20
+ * @since 0.11.0
+ */
+ public function createArraysAreTurnedIntoSubdirectories()
+ {
+ $baseDir = vfsStream::create(array('test' => array()), new vfsStreamDirectory('baseDir'));
+ $this->assertTrue($baseDir->hasChildren());
+ $this->assertTrue($baseDir->hasChild('test'));
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory',
+ $baseDir->getChild('test')
+ );
+ $this->assertFalse($baseDir->getChild('test')->hasChildren());
+ }
+
+ /**
+ * @test
+ * @group issue_20
+ * @since 0.11.0
+ */
+ public function createArraysAreTurnedIntoSubdirectoriesOfRoot()
+ {
+ $root = vfsStream::setup();
+ $this->assertSame($root, vfsStream::create(array('test' => array())));
+ $this->assertTrue($root->hasChildren());
+ $this->assertTrue($root->hasChild('test'));
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory',
+ $root->getChild('test')
+ );
+ $this->assertFalse($root->getChild('test')->hasChildren());
+ }
+
+ /**
+ * @test
+ * @group issue_20
+ * @expectedException \InvalidArgumentException
+ * @since 0.11.0
+ */
+ public function createThrowsExceptionIfNoBaseDirGivenAndNoRootSet()
+ {
+ vfsStream::create(array('test' => array()));
+ }
+
+ /**
+ * @test
+ * @group issue_20
+ * @since 0.11.0
+ */
+ public function createWorksRecursively()
+ {
+ $baseDir = vfsStream::create(array('test' => array('foo' => array('test.txt' => 'hello'),
+ 'baz.txt' => 'world'
+ )
+ ),
+ new vfsStreamDirectory('baseDir')
+ );
+ $this->assertTrue($baseDir->hasChildren());
+ $this->assertTrue($baseDir->hasChild('test'));
+ $test = $baseDir->getChild('test');
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $test);
+ $this->assertTrue($test->hasChildren());
+ $this->assertTrue($test->hasChild('baz.txt'));
+ $this->assertVfsFile($test->getChild('baz.txt'), 'world');
+
+ $this->assertTrue($test->hasChild('foo'));
+ $foo = $test->getChild('foo');
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $foo);
+ $this->assertTrue($foo->hasChildren());
+ $this->assertTrue($foo->hasChild('test.txt'));
+ $this->assertVfsFile($foo->getChild('test.txt'), 'hello');
+ }
+
+ /**
+ * @test
+ * @group issue_20
+ * @since 0.11.0
+ */
+ public function createWorksRecursivelyWithRoot()
+ {
+ $root = vfsStream::setup();
+ $this->assertSame($root,
+ vfsStream::create(array('test' => array('foo' => array('test.txt' => 'hello'),
+ 'baz.txt' => 'world'
+ )
+ )
+ )
+ );
+ $this->assertTrue($root->hasChildren());
+ $this->assertTrue($root->hasChild('test'));
+ $test = $root->getChild('test');
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $test);
+ $this->assertTrue($test->hasChildren());
+ $this->assertTrue($test->hasChild('baz.txt'));
+ $this->assertVfsFile($test->getChild('baz.txt'), 'world');
+
+ $this->assertTrue($test->hasChild('foo'));
+ $foo = $test->getChild('foo');
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $foo);
+ $this->assertTrue($foo->hasChildren());
+ $this->assertTrue($foo->hasChild('test.txt'));
+ $this->assertVfsFile($foo->getChild('test.txt'), 'hello');
+ }
+
+ /**
+ * @test
+ * @group issue_20
+ * @since 0.10.0
+ */
+ public function createStringsAreTurnedIntoFilesWithContent()
+ {
+ $baseDir = vfsStream::create(array('test.txt' => 'some content'), new vfsStreamDirectory('baseDir'));
+ $this->assertTrue($baseDir->hasChildren());
+ $this->assertTrue($baseDir->hasChild('test.txt'));
+ $this->assertVfsFile($baseDir->getChild('test.txt'), 'some content');
+ }
+
+ /**
+ * @test
+ * @group issue_20
+ * @since 0.11.0
+ */
+ public function createStringsAreTurnedIntoFilesWithContentWithRoot()
+ {
+ $root = vfsStream::setup();
+ $this->assertSame($root,
+ vfsStream::create(array('test.txt' => 'some content'))
+ );
+ $this->assertTrue($root->hasChildren());
+ $this->assertTrue($root->hasChild('test.txt'));
+ $this->assertVfsFile($root->getChild('test.txt'), 'some content');
+ }
+
+ /**
+ * @test
+ * @group issue_20
+ * @since 0.11.0
+ */
+ public function createCastsNumericDirectoriesToStrings()
+ {
+ $baseDir = vfsStream::create(array(2011 => array ('test.txt' => 'some content')), new vfsStreamDirectory('baseDir'));
+ $this->assertTrue($baseDir->hasChild('2011'));
+
+ $directory = $baseDir->getChild('2011');
+ $this->assertVfsFile($directory->getChild('test.txt'), 'some content');
+ }
+
+ /**
+ * @test
+ * @group issue_20
+ * @since 0.11.0
+ */
+ public function createCastsNumericDirectoriesToStringsWithRoot()
+ {
+ $root = vfsStream::setup();
+ $this->assertSame($root,
+ vfsStream::create(array(2011 => array ('test.txt' => 'some content')))
+ );
+ $this->assertTrue($root->hasChild('2011'));
+
+ $directory = $root->getChild('2011');
+ $this->assertVfsFile($directory->getChild('test.txt'), 'some content');
+ }
+
+ /**
+ * helper function for assertions on vfsStreamFile
+ *
+ * @param vfsStreamFile $file
+ * @param string $content
+ */
+ protected function assertVfsFile(vfsStreamFile $file, $content)
+ {
+ $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile',
+ $file
+ );
+ $this->assertEquals($content,
+ $file->getContent()
+ );
+ }
+
+ /**
+ * @test
+ * @group issue_10
+ * @since 0.10.0
+ */
+ public function inspectWithContentGivesContentToVisitor()
+ {
+ $mockContent = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $mockVisitor = $this->getMock('org\\bovigo\\vfs\\visitor\\vfsStreamVisitor');
+ $mockVisitor->expects($this->once())
+ ->method('visit')
+ ->with($this->equalTo($mockContent))
+ ->will($this->returnValue($mockVisitor));
+ $this->assertSame($mockVisitor, vfsStream::inspect($mockVisitor, $mockContent));
+ }
+
+ /**
+ * @test
+ * @group issue_10
+ * @since 0.10.0
+ */
+ public function inspectWithoutContentGivesRootToVisitor()
+ {
+ $root = vfsStream::setup();
+ $mockVisitor = $this->getMock('org\\bovigo\\vfs\\visitor\\vfsStreamVisitor');
+ $mockVisitor->expects($this->once())
+ ->method('visitDirectory')
+ ->with($this->equalTo($root))
+ ->will($this->returnValue($mockVisitor));
+ $this->assertSame($mockVisitor, vfsStream::inspect($mockVisitor));
+ }
+
+ /**
+ * @test
+ * @group issue_10
+ * @expectedException \InvalidArgumentException
+ * @since 0.10.0
+ */
+ public function inspectWithoutContentAndWithoutRootThrowsInvalidArgumentException()
+ {
+ $mockVisitor = $this->getMock('org\\bovigo\\vfs\\visitor\\vfsStreamVisitor');
+ $mockVisitor->expects($this->never())
+ ->method('visit');
+ $mockVisitor->expects($this->never())
+ ->method('visitDirectory');
+ vfsStream::inspect($mockVisitor);
+ }
+
+ /**
+ * returns path to file system copy resource directory
+ *
+ * @return string
+ */
+ protected function getFileSystemCopyDir()
+ {
+ return realpath(dirname(__FILE__) . '/../../../../resources/filesystemcopy');
+ }
+
+ /**
+ * @test
+ * @group issue_4
+ * @expectedException \InvalidArgumentException
+ * @since 0.11.0
+ */
+ public function copyFromFileSystemThrowsExceptionIfNoBaseDirGivenAndNoRootSet()
+ {
+ vfsStream::copyFromFileSystem($this->getFileSystemCopyDir());
+ }
+
+ /**
+ * @test
+ * @group issue_4
+ * @since 0.11.0
+ */
+ public function copyFromEmptyFolder()
+ {
+ $baseDir = vfsStream::copyFromFileSystem($this->getFileSystemCopyDir() . '/emptyFolder',
+ vfsStream::newDirectory('test')
+ );
+ $baseDir->removeChild('.gitignore');
+ $this->assertFalse($baseDir->hasChildren());
+ }
+
+ /**
+ * @test
+ * @group issue_4
+ * @since 0.11.0
+ */
+ public function copyFromEmptyFolderWithRoot()
+ {
+ $root = vfsStream::setup();
+ $this->assertEquals($root,
+ vfsStream::copyFromFileSystem($this->getFileSystemCopyDir() . '/emptyFolder')
+ );
+ $root->removeChild('.gitignore');
+ $this->assertFalse($root->hasChildren());
+ }
+
+ /**
+ * @test
+ * @group issue_4
+ * @since 0.11.0
+ */
+ public function copyFromWithSubFolders()
+ {
+ $baseDir = vfsStream::copyFromFileSystem($this->getFileSystemCopyDir(),
+ vfsStream::newDirectory('test'),
+ 3
+ );
+ $this->assertTrue($baseDir->hasChildren());
+ $this->assertTrue($baseDir->hasChild('emptyFolder'));
+ $this->assertTrue($baseDir->hasChild('withSubfolders'));
+ $subfolderDir = $baseDir->getChild('withSubfolders');
+ $this->assertTrue($subfolderDir->hasChild('subfolder1'));
+ $this->assertTrue($subfolderDir->getChild('subfolder1')->hasChild('file1.txt'));
+ $this->assertVfsFile($subfolderDir->getChild('subfolder1/file1.txt'), ' ');
+ $this->assertTrue($subfolderDir->hasChild('subfolder2'));
+ $this->assertTrue($subfolderDir->hasChild('aFile.txt'));
+ $this->assertVfsFile($subfolderDir->getChild('aFile.txt'), 'foo');
+ }
+
+ /**
+ * @test
+ * @group issue_4
+ * @since 0.11.0
+ */
+ public function copyFromWithSubFoldersWithRoot()
+ {
+ $root = vfsStream::setup();
+ $this->assertEquals($root,
+ vfsStream::copyFromFileSystem($this->getFileSystemCopyDir(),
+ null,
+ 3
+ )
+ );
+ $this->assertTrue($root->hasChildren());
+ $this->assertTrue($root->hasChild('emptyFolder'));
+ $this->assertTrue($root->hasChild('withSubfolders'));
+ $subfolderDir = $root->getChild('withSubfolders');
+ $this->assertTrue($subfolderDir->hasChild('subfolder1'));
+ $this->assertTrue($subfolderDir->getChild('subfolder1')->hasChild('file1.txt'));
+ $this->assertVfsFile($subfolderDir->getChild('subfolder1/file1.txt'), ' ');
+ $this->assertTrue($subfolderDir->hasChild('subfolder2'));
+ $this->assertTrue($subfolderDir->hasChild('aFile.txt'));
+ $this->assertVfsFile($subfolderDir->getChild('aFile.txt'), 'foo');
+ }
+
+ /**
+ * @test
+ * @group issue_4
+ * @group issue_29
+ * @since 0.11.2
+ */
+ public function copyFromPreservesFilePermissions()
+ {
+ if (DIRECTORY_SEPARATOR !== '/') {
+ $this->markTestSkipped('Only applicable on Linux style systems.');
+ }
+
+ $copyDir = $this->getFileSystemCopyDir();
+ $root = vfsStream::setup();
+ $this->assertEquals($root,
+ vfsStream::copyFromFileSystem($copyDir,
+ null
+ )
+ );
+ $this->assertEquals(fileperms($copyDir . '/withSubfolders') - vfsStreamContent::TYPE_DIR,
+ $root->getChild('withSubfolders')
+ ->getPermissions()
+ );
+ $this->assertEquals(fileperms($copyDir . '/withSubfolders/aFile.txt') - vfsStreamContent::TYPE_FILE,
+ $root->getChild('withSubfolders/aFile.txt')
+ ->getPermissions()
+ );
+ }
+
+ /**
+ * To test this the max file size is reduced to something reproduceable.
+ *
+ * @test
+ * @group issue_91
+ * @since 1.5.0
+ */
+ public function copyFromFileSystemMocksLargeFiles()
+ {
+ if (DIRECTORY_SEPARATOR !== '/') {
+ $this->markTestSkipped('Only applicable on Linux style systems.');
+ }
+
+ $copyDir = $this->getFileSystemCopyDir();
+ $root = vfsStream::setup();
+ vfsStream::copyFromFileSystem($copyDir, $root, 3);
+ $this->assertEquals(
+ ' ',
+ $root->getChild('withSubfolders/subfolder1/file1.txt')->getContent()
+ );
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php
new file mode 100644
index 0000000..342af31
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php
@@ -0,0 +1,195 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for umask settings.
+ *
+ * @group permissions
+ * @group umask
+ * @since 0.8.0
+ */
+class vfsStreamUmaskTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ vfsStream::umask(0000);
+ }
+
+ /**
+ * clean up test environment
+ */
+ public function tearDown()
+ {
+ vfsStream::umask(0000);
+ }
+
+ /**
+ * @test
+ */
+ public function gettingUmaskSettingDoesNotChangeUmaskSetting()
+ {
+ $this->assertEquals(vfsStream::umask(),
+ vfsStream::umask()
+ );
+ $this->assertEquals(0000,
+ vfsStream::umask()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function changingUmaskSettingReturnsOldUmaskSetting()
+ {
+ $this->assertEquals(0000,
+ vfsStream::umask(0022)
+ );
+ $this->assertEquals(0022,
+ vfsStream::umask()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function createFileWithDefaultUmaskSetting()
+ {
+ $file = new vfsStreamFile('foo');
+ $this->assertEquals(0666, $file->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function createFileWithDifferentUmaskSetting()
+ {
+ vfsStream::umask(0022);
+ $file = new vfsStreamFile('foo');
+ $this->assertEquals(0644, $file->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function createDirectoryWithDefaultUmaskSetting()
+ {
+ $directory = new vfsStreamDirectory('foo');
+ $this->assertEquals(0777, $directory->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function createDirectoryWithDifferentUmaskSetting()
+ {
+ vfsStream::umask(0022);
+ $directory = new vfsStreamDirectory('foo');
+ $this->assertEquals(0755, $directory->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function createFileUsingStreamWithDefaultUmaskSetting()
+ {
+ $root = vfsStream::setup();
+ file_put_contents(vfsStream::url('root/newfile.txt'), 'file content');
+ $this->assertEquals(0666, $root->getChild('newfile.txt')->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function createFileUsingStreamWithDifferentUmaskSetting()
+ {
+ $root = vfsStream::setup();
+ vfsStream::umask(0022);
+ file_put_contents(vfsStream::url('root/newfile.txt'), 'file content');
+ $this->assertEquals(0644, $root->getChild('newfile.txt')->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function createDirectoryUsingStreamWithDefaultUmaskSetting()
+ {
+ $root = vfsStream::setup();
+ mkdir(vfsStream::url('root/newdir'));
+ $this->assertEquals(0777, $root->getChild('newdir')->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function createDirectoryUsingStreamWithDifferentUmaskSetting()
+ {
+ $root = vfsStream::setup();
+ vfsStream::umask(0022);
+ mkdir(vfsStream::url('root/newdir'));
+ $this->assertEquals(0755, $root->getChild('newdir')->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function createDirectoryUsingStreamWithExplicit0()
+ {
+ $root = vfsStream::setup();
+ vfsStream::umask(0022);
+ mkdir(vfsStream::url('root/newdir'), null);
+ $this->assertEquals(0000, $root->getChild('newdir')->getPermissions());
+ }
+
+ /**
+ * @test
+ *
+ */
+ public function createDirectoryUsingStreamWithDifferentUmaskSettingButExplicit0777()
+ {
+ $root = vfsStream::setup();
+ vfsStream::umask(0022);
+ mkdir(vfsStream::url('root/newdir'), 0777);
+ $this->assertEquals(0755, $root->getChild('newdir')->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function createDirectoryUsingStreamWithDifferentUmaskSettingButExplicitModeRequestedByCall()
+ {
+ $root = vfsStream::setup();
+ vfsStream::umask(0022);
+ mkdir(vfsStream::url('root/newdir'), 0700);
+ $this->assertEquals(0700, $root->getChild('newdir')->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function defaultUmaskSettingDoesNotInfluenceSetup()
+ {
+ $root = vfsStream::setup();
+ $this->assertEquals(0777, $root->getPermissions());
+ }
+
+ /**
+ * @test
+ */
+ public function umaskSettingShouldBeRespectedBySetup()
+ {
+ vfsStream::umask(0022);
+ $root = vfsStream::setup();
+ $this->assertEquals(0755, $root->getPermissions());
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php
new file mode 100644
index 0000000..c7f78dc
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Helper class for the test.
+ */
+class TestvfsStreamWrapper extends vfsStreamWrapper
+{
+ /**
+ * unregisters vfsStreamWrapper
+ */
+ public static function unregister()
+ {
+ if (in_array(vfsStream::SCHEME, stream_get_wrappers()) === true) {
+ stream_wrapper_unregister(vfsStream::SCHEME);
+ }
+
+ self::$registered = false;
+ }
+}
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper.
+ */
+class vfsStreamWrapperAlreadyRegisteredTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ TestvfsStreamWrapper::unregister();
+ $mock = $this->getMock('org\\bovigo\\vfs\\vfsStreamWrapper');
+ stream_wrapper_register(vfsStream::SCHEME, get_class($mock));
+ }
+
+ /**
+ * clean up test environment
+ */
+ public function tearDown()
+ {
+ TestvfsStreamWrapper::unregister();
+ }
+
+ /**
+ * registering the stream wrapper when another stream wrapper is already
+ * registered for the vfs scheme should throw an exception
+ *
+ * @test
+ * @expectedException org\bovigo\vfs\vfsStreamException
+ */
+ public function registerOverAnotherStreamWrapper()
+ {
+ vfsStreamWrapper::register();
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php
new file mode 100644
index 0000000..52ec40c
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php
@@ -0,0 +1,99 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper.
+ */
+abstract class vfsStreamWrapperBaseTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * root directory
+ *
+ * @var vfsStreamDirectory
+ */
+ protected $foo;
+ /**
+ * URL of root directory
+ *
+ * @var string
+ */
+ protected $fooURL;
+ /**
+ * sub directory
+ *
+ * @var vfsStreamDirectory
+ */
+ protected $bar;
+ /**
+ * URL of sub directory
+ *
+ * @var string
+ */
+ protected $barURL;
+ /**
+ * a file
+ *
+ * @var vfsStreamFile
+ */
+ protected $baz1;
+ /**
+ * URL of file 1
+ *
+ * @var string
+ */
+ protected $baz1URL;
+ /**
+ * another file
+ *
+ * @var vfsStreamFile
+ */
+ protected $baz2;
+ /**
+ * URL of file 2
+ *
+ * @var string
+ */
+ protected $baz2URL;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->fooURL = vfsStream::url('foo');
+ $this->barURL = vfsStream::url('foo/bar');
+ $this->baz1URL = vfsStream::url('foo/bar/baz1');
+ $this->baz2URL = vfsStream::url('foo/baz2');
+ $this->foo = new vfsStreamDirectory('foo');
+ $this->bar = new vfsStreamDirectory('bar');
+ $this->baz1 = vfsStream::newFile('baz1')
+ ->lastModified(300)
+ ->lastAccessed(300)
+ ->lastAttributeModified(300)
+ ->withContent('baz 1');
+ $this->baz2 = vfsStream::newFile('baz2')
+ ->withContent('baz2')
+ ->lastModified(400)
+ ->lastAccessed(400)
+ ->lastAttributeModified(400);
+ $this->bar->addChild($this->baz1);
+ $this->foo->addChild($this->bar);
+ $this->foo->addChild($this->baz2);
+ $this->foo->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ $this->bar->lastModified(200)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot($this->foo);
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php
new file mode 100644
index 0000000..1fd2a2d
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test that using windows directory separator works correct.
+ *
+ * @since 0.9.0
+ * @group issue_8
+ */
+class vfsStreamWrapperDirSeparatorTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * root diretory
+ *
+ * @var vfsStreamDirectory
+ */
+ protected $root;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->root = vfsStream::setup();
+ }
+
+ /**
+ * @test
+ */
+ public function fileCanBeAccessedUsingWinDirSeparator()
+ {
+ vfsStream::newFile('foo/bar/baz.txt')
+ ->at($this->root)
+ ->withContent('test');
+ $this->assertEquals('test', file_get_contents('vfs://root/foo\bar\baz.txt'));
+ }
+
+
+ /**
+ * @test
+ */
+ public function directoryCanBeCreatedUsingWinDirSeparator()
+ {
+ mkdir('vfs://root/dir\bar\foo', true, 0777);
+ $this->assertTrue($this->root->hasChild('dir'));
+ $this->assertTrue($this->root->getChild('dir')->hasChild('bar'));
+ $this->assertTrue($this->root->getChild('dir/bar')->hasChild('foo'));
+ }
+
+ /**
+ * @test
+ */
+ public function directoryExitsTestUsingTrailingWinDirSeparator()
+ {
+ $structure = array(
+ 'dir' => array(
+ 'bar' => array(
+ )
+ )
+ );
+ vfsStream::create($structure, $this->root);
+
+ $this->assertTrue(file_exists(vfsStream::url('root/').'dir\\'));
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php
new file mode 100644
index 0000000..6e2f44b
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php
@@ -0,0 +1,488 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+require_once __DIR__ . '/vfsStreamWrapperBaseTestCase.php';
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper around mkdir().
+ *
+ * @package bovigo_vfs
+ * @subpackage test
+ */
+class vfsStreamWrapperMkDirTestCase extends vfsStreamWrapperBaseTestCase
+{
+ /**
+ * mkdir() should not overwrite existing root
+ *
+ * @test
+ */
+ public function mkdirNoNewRoot()
+ {
+ $this->assertFalse(mkdir(vfsStream::url('another')));
+ $this->assertEquals(2, count($this->foo->getChildren()));
+ $this->assertSame($this->foo, vfsStreamWrapper::getRoot());
+ }
+
+ /**
+ * mkdir() should not overwrite existing root
+ *
+ * @test
+ */
+ public function mkdirNoNewRootRecursively()
+ {
+ $this->assertFalse(mkdir(vfsStream::url('another/more'), 0777, true));
+ $this->assertEquals(2, count($this->foo->getChildren()));
+ $this->assertSame($this->foo, vfsStreamWrapper::getRoot());
+ }
+
+ /**
+ * assert that mkdir() creates the correct directory structure
+ *
+ * @test
+ * @group permissions
+ */
+ public function mkdirNonRecursively()
+ {
+ $this->assertFalse(mkdir($this->barURL . '/another/more'));
+ $this->assertEquals(2, count($this->foo->getChildren()));
+ $this->assertTrue(mkdir($this->fooURL . '/another'));
+ $this->assertEquals(3, count($this->foo->getChildren()));
+ $this->assertEquals(0777, $this->foo->getChild('another')->getPermissions());
+ }
+
+ /**
+ * assert that mkdir() creates the correct directory structure
+ *
+ * @test
+ * @group permissions
+ */
+ public function mkdirRecursively()
+ {
+ $this->assertTrue(mkdir($this->fooURL . '/another/more', 0777, true));
+ $this->assertEquals(3, count($this->foo->getChildren()));
+ $another = $this->foo->getChild('another');
+ $this->assertTrue($another->hasChild('more'));
+ $this->assertEquals(0777, $this->foo->getChild('another')->getPermissions());
+ $this->assertEquals(0777, $this->foo->getChild('another')->getChild('more')->getPermissions());
+ }
+
+ /**
+ * @test
+ * @group issue_9
+ * @since 0.9.0
+ */
+ public function mkdirWithDots()
+ {
+ $this->assertTrue(mkdir($this->fooURL . '/another/../more/.', 0777, true));
+ $this->assertEquals(3, count($this->foo->getChildren()));
+ $this->assertTrue($this->foo->hasChild('more'));
+ }
+
+ /**
+ * no root > new directory becomes root
+ *
+ * @test
+ * @group permissions
+ */
+ public function mkdirWithoutRootCreatesNewRoot()
+ {
+ vfsStreamWrapper::register();
+ $this->assertTrue(@mkdir(vfsStream::url('foo')));
+ $this->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()->getType());
+ $this->assertEquals('foo', vfsStreamWrapper::getRoot()->getName());
+ $this->assertEquals(0777, vfsStreamWrapper::getRoot()->getPermissions());
+ }
+
+ /**
+ * trying to create a subdirectory of a file should not work
+ *
+ * @test
+ */
+ public function mkdirOnFileReturnsFalse()
+ {
+ $this->assertFalse(mkdir($this->baz1URL . '/another/more', 0777, true));
+ }
+
+ /**
+ * assert that mkdir() creates the correct directory structure
+ *
+ * @test
+ * @group permissions
+ */
+ public function mkdirNonRecursivelyDifferentPermissions()
+ {
+ $this->assertTrue(mkdir($this->fooURL . '/another', 0755));
+ $this->assertEquals(0755, $this->foo->getChild('another')->getPermissions());
+ }
+
+ /**
+ * assert that mkdir() creates the correct directory structure
+ *
+ * @test
+ * @group permissions
+ */
+ public function mkdirRecursivelyDifferentPermissions()
+ {
+ $this->assertTrue(mkdir($this->fooURL . '/another/more', 0755, true));
+ $this->assertEquals(3, count($this->foo->getChildren()));
+ $another = $this->foo->getChild('another');
+ $this->assertTrue($another->hasChild('more'));
+ $this->assertEquals(0755, $this->foo->getChild('another')->getPermissions());
+ $this->assertEquals(0755, $this->foo->getChild('another')->getChild('more')->getPermissions());
+ }
+
+ /**
+ * assert that mkdir() creates the correct directory structure
+ *
+ * @test
+ * @group permissions
+ */
+ public function mkdirRecursivelyUsesDefaultPermissions()
+ {
+ $this->foo->chmod(0700);
+ $this->assertTrue(mkdir($this->fooURL . '/another/more', 0777, true));
+ $this->assertEquals(3, count($this->foo->getChildren()));
+ $another = $this->foo->getChild('another');
+ $this->assertTrue($another->hasChild('more'));
+ $this->assertEquals(0777, $this->foo->getChild('another')->getPermissions());
+ $this->assertEquals(0777, $this->foo->getChild('another')->getChild('more')->getPermissions());
+ }
+
+ /**
+ * no root > new directory becomes root
+ *
+ * @test
+ * @group permissions
+ */
+ public function mkdirWithoutRootCreatesNewRootDifferentPermissions()
+ {
+ vfsStreamWrapper::register();
+ $this->assertTrue(@mkdir(vfsStream::url('foo'), 0755));
+ $this->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()->getType());
+ $this->assertEquals('foo', vfsStreamWrapper::getRoot()->getName());
+ $this->assertEquals(0755, vfsStreamWrapper::getRoot()->getPermissions());
+ }
+
+ /**
+ * no root > new directory becomes root
+ *
+ * @test
+ * @group permissions
+ */
+ public function mkdirWithoutRootCreatesNewRootWithDefaultPermissions()
+ {
+ vfsStreamWrapper::register();
+ $this->assertTrue(@mkdir(vfsStream::url('foo')));
+ $this->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()->getType());
+ $this->assertEquals('foo', vfsStreamWrapper::getRoot()->getName());
+ $this->assertEquals(0777, vfsStreamWrapper::getRoot()->getPermissions());
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function mkdirDirCanNotCreateNewDirInNonWritingDirectory()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
+ vfsStreamWrapper::getRoot()->addChild(new vfsStreamDirectory('restrictedFolder', 0000));
+ $this->assertFalse(is_writable(vfsStream::url('root/restrictedFolder/')));
+ $this->assertFalse(mkdir(vfsStream::url('root/restrictedFolder/newFolder')));
+ $this->assertFalse(vfsStreamWrapper::getRoot()->hasChild('restrictedFolder/newFolder'));
+ }
+
+ /**
+ * @test
+ * @group issue_28
+ */
+ public function mkDirShouldNotOverwriteExistingDirectories()
+ {
+ vfsStream::setup('root');
+ $dir = vfsStream::url('root/dir');
+ $this->assertTrue(mkdir($dir));
+ $this->assertFalse(@mkdir($dir));
+ }
+
+ /**
+ * @test
+ * @group issue_28
+ * @expectedException PHPUnit_Framework_Error
+ * @expectedExceptionMessage mkdir(): Path vfs://root/dir exists
+ */
+ public function mkDirShouldNotOverwriteExistingDirectoriesAndTriggerE_USER_WARNING()
+ {
+ vfsStream::setup('root');
+ $dir = vfsStream::url('root/dir');
+ $this->assertTrue(mkdir($dir));
+ $this->assertFalse(mkdir($dir));
+ }
+
+ /**
+ * @test
+ * @group issue_28
+ */
+ public function mkDirShouldNotOverwriteExistingFiles()
+ {
+ $root = vfsStream::setup('root');
+ vfsStream::newFile('test.txt')->at($root);
+ $this->assertFalse(@mkdir(vfsStream::url('root/test.txt')));
+ }
+
+ /**
+ * @test
+ * @group issue_28
+ * @expectedException PHPUnit_Framework_Error
+ * @expectedExceptionMessage mkdir(): Path vfs://root/test.txt exists
+ */
+ public function mkDirShouldNotOverwriteExistingFilesAndTriggerE_USER_WARNING()
+ {
+ $root = vfsStream::setup('root');
+ vfsStream::newFile('test.txt')->at($root);
+ $this->assertFalse(mkdir(vfsStream::url('root/test.txt')));
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function canNotIterateOverNonReadableDirectory()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000));
+ $this->assertFalse(@opendir(vfsStream::url('root')));
+ $this->assertFalse(@dir(vfsStream::url('root')));
+ }
+
+ /**
+ * assert is_dir() returns correct result
+ *
+ * @test
+ */
+ public function is_dir()
+ {
+ $this->assertTrue(is_dir($this->fooURL));
+ $this->assertTrue(is_dir($this->fooURL . '/.'));
+ $this->assertTrue(is_dir($this->barURL));
+ $this->assertTrue(is_dir($this->barURL . '/.'));
+ $this->assertFalse(is_dir($this->baz1URL));
+ $this->assertFalse(is_dir($this->baz2URL));
+ $this->assertFalse(is_dir($this->fooURL . '/another'));
+ $this->assertFalse(is_dir(vfsStream::url('another')));
+ }
+
+ /**
+ * can not unlink without root
+ *
+ * @test
+ */
+ public function canNotUnlinkDirectoryWithoutRoot()
+ {
+ vfsStreamWrapper::register();
+ $this->assertFalse(@rmdir(vfsStream::url('foo')));
+ }
+
+ /**
+ * rmdir() can not remove files
+ *
+ * @test
+ */
+ public function rmdirCanNotRemoveFiles()
+ {
+ $this->assertFalse(rmdir($this->baz1URL));
+ $this->assertFalse(rmdir($this->baz2URL));
+ }
+
+ /**
+ * rmdir() can not remove a non-existing directory
+ *
+ * @test
+ */
+ public function rmdirCanNotRemoveNonExistingDirectory()
+ {
+ $this->assertFalse(rmdir($this->fooURL . '/another'));
+ }
+
+ /**
+ * rmdir() can not remove non-empty directories
+ *
+ * @test
+ */
+ public function rmdirCanNotRemoveNonEmptyDirectory()
+ {
+ $this->assertFalse(rmdir($this->fooURL));
+ $this->assertFalse(rmdir($this->barURL));
+ }
+
+ /**
+ * @test
+ */
+ public function rmdirCanRemoveEmptyDirectory()
+ {
+ vfsStream::newDirectory('empty')->at($this->foo);
+ $this->assertTrue($this->foo->hasChild('empty'));
+ $this->assertTrue(rmdir($this->fooURL . '/empty'));
+ $this->assertFalse($this->foo->hasChild('empty'));
+ }
+
+ /**
+ * @test
+ */
+ public function rmdirCanRemoveEmptyDirectoryWithDot()
+ {
+ vfsStream::newDirectory('empty')->at($this->foo);
+ $this->assertTrue($this->foo->hasChild('empty'));
+ $this->assertTrue(rmdir($this->fooURL . '/empty/.'));
+ $this->assertFalse($this->foo->hasChild('empty'));
+ }
+
+ /**
+ * rmdir() can remove empty directories
+ *
+ * @test
+ */
+ public function rmdirCanRemoveEmptyRoot()
+ {
+ $this->foo->removeChild('bar');
+ $this->foo->removeChild('baz2');
+ $this->assertTrue(rmdir($this->fooURL));
+ $this->assertFalse(file_exists($this->fooURL)); // make sure statcache was cleared
+ $this->assertNull(vfsStreamWrapper::getRoot());
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function rmdirDirCanNotRemoveDirFromNonWritingDirectory()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000));
+ vfsStreamWrapper::getRoot()->addChild(new vfsStreamDirectory('nonRemovableFolder'));
+ $this->assertFalse(is_writable(vfsStream::url('root')));
+ $this->assertFalse(rmdir(vfsStream::url('root/nonRemovableFolder')));
+ $this->assertTrue(vfsStreamWrapper::getRoot()->hasChild('nonRemovableFolder'));
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_17
+ */
+ public function issue17()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0770));
+ vfsStreamWrapper::getRoot()->chgrp(vfsStream::GROUP_USER_1)
+ ->chown(vfsStream::OWNER_USER_1);
+ $this->assertFalse(mkdir(vfsStream::url('root/doesNotWork')));
+ $this->assertFalse(vfsStreamWrapper::getRoot()->hasChild('doesNotWork'));
+ }
+
+ /**
+ * @test
+ * @group bug_19
+ */
+ public function accessWithDoubleDotReturnsCorrectContent()
+ {
+ $this->assertEquals('baz2',
+ file_get_contents(vfsStream::url('foo/bar/../baz2'))
+ );
+ }
+
+ /**
+ * @test
+ * @group bug_115
+ */
+ public function accessWithExcessDoubleDotsReturnsCorrectContent()
+ {
+ $this->assertEquals('baz2',
+ file_get_contents(vfsStream::url('foo/../../../../bar/../baz2'))
+ );
+ }
+
+ /**
+ * @test
+ * @group bug_115
+ */
+ public function alwaysResolvesRootDirectoryAsOwnParentWithDoubleDot()
+ {
+ vfsStreamWrapper::getRoot()->chown(vfsStream::OWNER_USER_1);
+
+ $this->assertTrue(is_dir(vfsStream::url('foo/..')));
+ $stat = stat(vfsStream::url('foo/..'));
+ $this->assertEquals(
+ vfsStream::OWNER_USER_1,
+ $stat['uid']
+ );
+ }
+
+
+ /**
+ * @test
+ * @since 0.11.0
+ * @group issue_23
+ */
+ public function unlinkCanNotRemoveNonEmptyDirectory()
+ {
+ try {
+ $this->assertFalse(unlink($this->barURL));
+ } catch (\PHPUnit_Framework_Error $fe) {
+ $this->assertEquals('unlink(vfs://foo/bar): Operation not permitted', $fe->getMessage());
+ }
+
+ $this->assertTrue($this->foo->hasChild('bar'));
+ $this->assertFileExists($this->barURL);
+ }
+
+ /**
+ * @test
+ * @since 0.11.0
+ * @group issue_23
+ */
+ public function unlinkCanNotRemoveEmptyDirectory()
+ {
+ vfsStream::newDirectory('empty')->at($this->foo);
+ try {
+ $this->assertTrue(unlink($this->fooURL . '/empty'));
+ } catch (\PHPUnit_Framework_Error $fe) {
+ $this->assertEquals('unlink(vfs://foo/empty): Operation not permitted', $fe->getMessage());
+ }
+
+ $this->assertTrue($this->foo->hasChild('empty'));
+ $this->assertFileExists($this->fooURL . '/empty');
+ }
+
+ /**
+ * @test
+ * @group issue_32
+ */
+ public function canCreateFolderOfSameNameAsParentFolder()
+ {
+ $root = vfsStream::setup('testFolder');
+ mkdir(vfsStream::url('testFolder') . '/testFolder/subTestFolder', 0777, true);
+ $this->assertTrue(file_exists(vfsStream::url('testFolder/testFolder/subTestFolder/.')));
+ }
+
+ /**
+ * @test
+ * @group issue_32
+ */
+ public function canRetrieveFolderOfSameNameAsParentFolder()
+ {
+ $root = vfsStream::setup('testFolder');
+ mkdir(vfsStream::url('testFolder') . '/testFolder/subTestFolder', 0777, true);
+ $this->assertTrue($root->hasChild('testFolder'));
+ $this->assertNotNull($root->getChild('testFolder'));
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php
new file mode 100644
index 0000000..5bcb37a
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php
@@ -0,0 +1,458 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+require_once __DIR__ . '/vfsStreamWrapperBaseTestCase.php';
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper.
+ */
+class vfsStreamWrapperFileTestCase extends vfsStreamWrapperBaseTestCase
+{
+ /**
+ * assert that file_get_contents() delivers correct file contents
+ *
+ * @test
+ */
+ public function file_get_contents()
+ {
+ $this->assertEquals('baz2', file_get_contents($this->baz2URL));
+ $this->assertEquals('baz 1', file_get_contents($this->baz1URL));
+ $this->assertFalse(@file_get_contents($this->barURL));
+ $this->assertFalse(@file_get_contents($this->fooURL));
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function file_get_contentsNonReadableFile()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
+ vfsStream::newFile('new.txt', 0000)->at(vfsStreamWrapper::getRoot())->withContent('content');
+ $this->assertEquals('', @file_get_contents(vfsStream::url('root/new.txt')));
+ }
+
+ /**
+ * assert that file_put_contents() delivers correct file contents
+ *
+ * @test
+ */
+ public function file_put_contentsExistingFile()
+ {
+ $this->assertEquals(14, file_put_contents($this->baz2URL, 'baz is not bar'));
+ $this->assertEquals('baz is not bar', $this->baz2->getContent());
+ $this->assertEquals(6, file_put_contents($this->baz1URL, 'foobar'));
+ $this->assertEquals('foobar', $this->baz1->getContent());
+ $this->assertFalse(@file_put_contents($this->barURL, 'This does not work.'));
+ $this->assertFalse(@file_put_contents($this->fooURL, 'This does not work, too.'));
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function file_put_contentsExistingFileNonWritableDirectory()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000));
+ vfsStream::newFile('new.txt')->at(vfsStreamWrapper::getRoot())->withContent('content');
+ $this->assertEquals(15, @file_put_contents(vfsStream::url('root/new.txt'), 'This does work.'));
+ $this->assertEquals('This does work.', file_get_contents(vfsStream::url('root/new.txt')));
+
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function file_put_contentsExistingNonWritableFile()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
+ vfsStream::newFile('new.txt', 0400)->at(vfsStreamWrapper::getRoot())->withContent('content');
+ $this->assertFalse(@file_put_contents(vfsStream::url('root/new.txt'), 'This does not work.'));
+ $this->assertEquals('content', file_get_contents(vfsStream::url('root/new.txt')));
+ }
+
+ /**
+ * assert that file_put_contents() delivers correct file contents
+ *
+ * @test
+ */
+ public function file_put_contentsNonExistingFile()
+ {
+ $this->assertEquals(14, file_put_contents($this->fooURL . '/baznot.bar', 'baz is not bar'));
+ $this->assertEquals(3, count($this->foo->getChildren()));
+ $this->assertEquals(14, file_put_contents($this->barURL . '/baznot.bar', 'baz is not bar'));
+ $this->assertEquals(2, count($this->bar->getChildren()));
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function file_put_contentsNonExistingFileNonWritableDirectory()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000));
+ $this->assertFalse(@file_put_contents(vfsStream::url('root/new.txt'), 'This does not work.'));
+ $this->assertFalse(file_exists(vfsStream::url('root/new.txt')));
+
+ }
+
+ /**
+ * using a file pointer should work without any problems
+ *
+ * @test
+ */
+ public function usingFilePointer()
+ {
+ $fp = fopen($this->baz1URL, 'r');
+ $this->assertEquals(0, ftell($fp));
+ $this->assertFalse(feof($fp));
+ $this->assertEquals(0, fseek($fp, 2));
+ $this->assertEquals(2, ftell($fp));
+ $this->assertEquals(0, fseek($fp, 1, SEEK_CUR));
+ $this->assertEquals(3, ftell($fp));
+ $this->assertEquals(0, fseek($fp, 1, SEEK_END));
+ $this->assertEquals(6, ftell($fp));
+ $this->assertTrue(feof($fp));
+ $this->assertEquals(0, fseek($fp, 2));
+ $this->assertFalse(feof($fp));
+ $this->assertEquals(2, ftell($fp));
+ $this->assertEquals('z', fread($fp, 1));
+ $this->assertEquals(3, ftell($fp));
+ $this->assertEquals(' 1', fread($fp, 8092));
+ $this->assertEquals(5, ftell($fp));
+ $this->assertTrue(fclose($fp));
+ }
+
+ /**
+ * assert is_file() returns correct result
+ *
+ * @test
+ */
+ public function is_file()
+ {
+ $this->assertFalse(is_file($this->fooURL));
+ $this->assertFalse(is_file($this->barURL));
+ $this->assertTrue(is_file($this->baz1URL));
+ $this->assertTrue(is_file($this->baz2URL));
+ $this->assertFalse(is_file($this->fooURL . '/another'));
+ $this->assertFalse(is_file(vfsStream::url('another')));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function issue13CanNotOverwriteFiles()
+ {
+ $vfsFile = vfsStream::url('foo/overwrite.txt');
+ file_put_contents($vfsFile, 'test');
+ file_put_contents($vfsFile, 'd');
+ $this->assertEquals('d', file_get_contents($vfsFile));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function appendContentIfOpenedWithModeA()
+ {
+ $vfsFile = vfsStream::url('foo/overwrite.txt');
+ file_put_contents($vfsFile, 'test');
+ $fp = fopen($vfsFile, 'ab');
+ fwrite($fp, 'd');
+ fclose($fp);
+ $this->assertEquals('testd', file_get_contents($vfsFile));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function canOverwriteNonExistingFileWithModeX()
+ {
+ $vfsFile = vfsStream::url('foo/overwrite.txt');
+ $fp = fopen($vfsFile, 'xb');
+ fwrite($fp, 'test');
+ fclose($fp);
+ $this->assertEquals('test', file_get_contents($vfsFile));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function canNotOverwriteExistingFileWithModeX()
+ {
+ $vfsFile = vfsStream::url('foo/overwrite.txt');
+ file_put_contents($vfsFile, 'test');
+ $this->assertFalse(@fopen($vfsFile, 'xb'));
+ $this->assertEquals('test', file_get_contents($vfsFile));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function canNotOpenNonExistingFileReadonly()
+ {
+ $this->assertFalse(@fopen(vfsStream::url('foo/doesNotExist.txt'), 'rb'));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function canNotOpenNonExistingFileReadAndWrite()
+ {
+ $this->assertFalse(@fopen(vfsStream::url('foo/doesNotExist.txt'), 'rb+'));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function canNotOpenWithIllegalMode()
+ {
+ $this->assertFalse(@fopen($this->baz2URL, 'invalid'));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function canNotWriteToReadOnlyFile()
+ {
+ $fp = fopen($this->baz2URL, 'rb');
+ $this->assertEquals('baz2', fread($fp, 4096));
+ $this->assertEquals(0, fwrite($fp, 'foo'));
+ fclose($fp);
+ $this->assertEquals('baz2', file_get_contents($this->baz2URL));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function canNotReadFromWriteOnlyFileWithModeW()
+ {
+ $fp = fopen($this->baz2URL, 'wb');
+ $this->assertEquals('', fread($fp, 4096));
+ $this->assertEquals(3, fwrite($fp, 'foo'));
+ fseek($fp, 0);
+ $this->assertEquals('', fread($fp, 4096));
+ fclose($fp);
+ $this->assertEquals('foo', file_get_contents($this->baz2URL));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function canNotReadFromWriteOnlyFileWithModeA()
+ {
+ $fp = fopen($this->baz2URL, 'ab');
+ $this->assertEquals('', fread($fp, 4096));
+ $this->assertEquals(3, fwrite($fp, 'foo'));
+ fseek($fp, 0);
+ $this->assertEquals('', fread($fp, 4096));
+ fclose($fp);
+ $this->assertEquals('baz2foo', file_get_contents($this->baz2URL));
+ }
+
+ /**
+ * @test
+ * @group issue7
+ * @group issue13
+ */
+ public function canNotReadFromWriteOnlyFileWithModeX()
+ {
+ $vfsFile = vfsStream::url('foo/modeXtest.txt');
+ $fp = fopen($vfsFile, 'xb');
+ $this->assertEquals('', fread($fp, 4096));
+ $this->assertEquals(3, fwrite($fp, 'foo'));
+ fseek($fp, 0);
+ $this->assertEquals('', fread($fp, 4096));
+ fclose($fp);
+ $this->assertEquals('foo', file_get_contents($vfsFile));
+ }
+
+ /**
+ * @test
+ * @group permissions
+ * @group bug_15
+ */
+ public function canNotRemoveFileFromDirectoryWithoutWritePermissions()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000));
+ vfsStream::newFile('new.txt')->at(vfsStreamWrapper::getRoot());
+ $this->assertFalse(unlink(vfsStream::url('root/new.txt')));
+ $this->assertTrue(file_exists(vfsStream::url('root/new.txt')));
+ }
+
+ /**
+ * @test
+ * @group issue_30
+ */
+ public function truncatesFileWhenOpenedWithModeW()
+ {
+ $vfsFile = vfsStream::url('foo/overwrite.txt');
+ file_put_contents($vfsFile, 'test');
+ $fp = fopen($vfsFile, 'wb');
+ $this->assertEquals('', file_get_contents($vfsFile));
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ * @group issue_30
+ */
+ public function createsNonExistingFileWhenOpenedWithModeC()
+ {
+ $vfsFile = vfsStream::url('foo/tobecreated.txt');
+ $fp = fopen($vfsFile, 'cb');
+ fwrite($fp, 'some content');
+ $this->assertTrue($this->foo->hasChild('tobecreated.txt'));
+ fclose($fp);
+ $this->assertEquals('some content', file_get_contents($vfsFile));
+ }
+
+ /**
+ * @test
+ * @group issue_30
+ */
+ public function createsNonExistingFileWhenOpenedWithModeCplus()
+ {
+ $vfsFile = vfsStream::url('foo/tobecreated.txt');
+ $fp = fopen($vfsFile, 'cb+');
+ fwrite($fp, 'some content');
+ $this->assertTrue($this->foo->hasChild('tobecreated.txt'));
+ fclose($fp);
+ $this->assertEquals('some content', file_get_contents($vfsFile));
+ }
+
+ /**
+ * @test
+ * @group issue_30
+ */
+ public function doesNotTruncateFileWhenOpenedWithModeC()
+ {
+ $vfsFile = vfsStream::url('foo/overwrite.txt');
+ file_put_contents($vfsFile, 'test');
+ $fp = fopen($vfsFile, 'cb');
+ $this->assertEquals('test', file_get_contents($vfsFile));
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ * @group issue_30
+ */
+ public function setsPointerToStartWhenOpenedWithModeC()
+ {
+ $vfsFile = vfsStream::url('foo/overwrite.txt');
+ file_put_contents($vfsFile, 'test');
+ $fp = fopen($vfsFile, 'cb');
+ $this->assertEquals(0, ftell($fp));
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ * @group issue_30
+ */
+ public function doesNotTruncateFileWhenOpenedWithModeCplus()
+ {
+ $vfsFile = vfsStream::url('foo/overwrite.txt');
+ file_put_contents($vfsFile, 'test');
+ $fp = fopen($vfsFile, 'cb+');
+ $this->assertEquals('test', file_get_contents($vfsFile));
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ * @group issue_30
+ */
+ public function setsPointerToStartWhenOpenedWithModeCplus()
+ {
+ $vfsFile = vfsStream::url('foo/overwrite.txt');
+ file_put_contents($vfsFile, 'test');
+ $fp = fopen($vfsFile, 'cb+');
+ $this->assertEquals(0, ftell($fp));
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ */
+ public function cannotOpenExistingNonwritableFileWithModeA()
+ {
+ $this->baz1->chmod(0400);
+ $this->assertFalse(@fopen($this->baz1URL, 'a'));
+ }
+
+ /**
+ * @test
+ */
+ public function cannotOpenExistingNonwritableFileWithModeW()
+ {
+ $this->baz1->chmod(0400);
+ $this->assertFalse(@fopen($this->baz1URL, 'w'));
+ }
+
+ /**
+ * @test
+ */
+ public function cannotOpenNonReadableFileWithModeR()
+ {
+ $this->baz1->chmod(0);
+ $this->assertFalse(@fopen($this->baz1URL, 'r'));
+ }
+
+ /**
+ * @test
+ */
+ public function cannotRenameToNonWritableDir()
+ {
+ $this->bar->chmod(0);
+ $this->assertFalse(@rename($this->baz2URL, vfsStream::url('foo/bar/baz3')));
+ }
+
+ /**
+ * @test
+ * @group issue_38
+ */
+ public function cannotReadFileFromNonReadableDir()
+ {
+ $this->markTestSkipped("Issue #38.");
+ $this->bar->chmod(0);
+ $this->assertFalse(@file_get_contents($this->baz1URL));
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php
new file mode 100644
index 0000000..ebe0a52
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php
@@ -0,0 +1,315 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper.
+ *
+ * @since 0.9.0
+ */
+class vfsStreamWrapperFileTimesTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * URL of foo.txt file
+ *
+ * @var string
+ */
+ protected $fooUrl;
+ /**
+ * URL of bar directory
+ *
+ * @var string
+ */
+ protected $barUrl;
+ /**
+ * URL of baz.txt file
+ *
+ * @var string
+ */
+ protected $bazUrl;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ vfsStream::setup()
+ ->lastModified(50)
+ ->lastAccessed(50)
+ ->lastAttributeModified(50);
+ $this->fooUrl = vfsStream::url('root/foo.txt');
+ $this->barUrl = vfsStream::url('root/bar');
+ $this->bazUrl = vfsStream::url('root/bar/baz.txt');
+ }
+
+ /**
+ * helper assertion for the tests
+ *
+ * @param string $url url to check
+ * @param vfsStreamContent $content content to compare
+ */
+ protected function assertFileTimesEqualStreamTimes($url, vfsStreamContent $content)
+ {
+ $this->assertEquals(filemtime($url), $content->filemtime());
+ $this->assertEquals(fileatime($url), $content->fileatime());
+ $this->assertEquals(filectime($url), $content->filectime());
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ * @group issue_26
+ */
+ public function openFileChangesAttributeTimeOnly()
+ {
+ $file = vfsStream::newFile('foo.txt')
+ ->withContent('test')
+ ->at(vfsStreamWrapper::getRoot())
+ ->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ fclose(fopen($this->fooUrl, 'rb'));
+ $this->assertGreaterThan(time() - 2, fileatime($this->fooUrl));
+ $this->assertLessThanOrEqual(time(), fileatime($this->fooUrl));
+ $this->assertLessThanOrEqual(100, filemtime($this->fooUrl));
+ $this->assertEquals(100, filectime($this->fooUrl));
+ $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file);
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ * @group issue_26
+ */
+ public function fileGetContentsChangesAttributeTimeOnly()
+ {
+ $file = vfsStream::newFile('foo.txt')
+ ->withContent('test')
+ ->at(vfsStreamWrapper::getRoot())
+ ->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ file_get_contents($this->fooUrl);
+ $this->assertGreaterThan(time() - 2, fileatime($this->fooUrl));
+ $this->assertLessThanOrEqual(time(), fileatime($this->fooUrl));
+ $this->assertLessThanOrEqual(100, filemtime($this->fooUrl));
+ $this->assertEquals(100, filectime($this->fooUrl));
+ $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file);
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ * @group issue_26
+ */
+ public function openFileWithTruncateChangesAttributeAndModificationTime()
+ {
+ $file = vfsStream::newFile('foo.txt')
+ ->withContent('test')
+ ->at(vfsStreamWrapper::getRoot())
+ ->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ fclose(fopen($this->fooUrl, 'wb'));
+ $this->assertGreaterThan(time() - 2, filemtime($this->fooUrl));
+ $this->assertGreaterThan(time() - 2, fileatime($this->fooUrl));
+ $this->assertLessThanOrEqual(time(), filemtime($this->fooUrl));
+ $this->assertLessThanOrEqual(time(), fileatime($this->fooUrl));
+ $this->assertEquals(100, filectime($this->fooUrl));
+ $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file);
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function readFileChangesAccessTime()
+ {
+ $file = vfsStream::newFile('foo.txt')
+ ->withContent('test')
+ ->at(vfsStreamWrapper::getRoot())
+ ->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ $fp = fopen($this->fooUrl, 'rb');
+ $openTime = time();
+ sleep(2);
+ fread($fp, 1024);
+ fclose($fp);
+ $this->assertLessThanOrEqual($openTime, filemtime($this->fooUrl));
+ $this->assertLessThanOrEqual($openTime + 3, fileatime($this->fooUrl));
+ $this->assertEquals(100, filectime($this->fooUrl));
+ $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file);
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function writeFileChangesModificationTime()
+ {
+ $file = vfsStream::newFile('foo.txt')
+ ->at(vfsStreamWrapper::getRoot())
+ ->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ $fp = fopen($this->fooUrl, 'wb');
+ $openTime = time();
+ sleep(2);
+ fwrite($fp, 'test');
+ fclose($fp);
+ $this->assertLessThanOrEqual($openTime + 3, filemtime($this->fooUrl));
+ $this->assertLessThanOrEqual($openTime, fileatime($this->fooUrl));
+ $this->assertEquals(100, filectime($this->fooUrl));
+ $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file);
+
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function createNewFileSetsAllTimesToCurrentTime()
+ {
+ file_put_contents($this->fooUrl, 'test');
+ $this->assertLessThanOrEqual(time(), filemtime($this->fooUrl));
+ $this->assertEquals(fileatime($this->fooUrl), filectime($this->fooUrl));
+ $this->assertEquals(fileatime($this->fooUrl), filemtime($this->fooUrl));
+ $this->assertFileTimesEqualStreamTimes($this->fooUrl, vfsStreamWrapper::getRoot()->getChild('foo.txt'));
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function createNewFileChangesAttributeAndModificationTimeOfContainingDirectory()
+ {
+ $dir = vfsStream::newDirectory('bar')
+ ->at(vfsStreamWrapper::getRoot())
+ ->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ file_put_contents($this->bazUrl, 'test');
+ $this->assertLessThanOrEqual(time(), filemtime($this->barUrl));
+ $this->assertLessThanOrEqual(time(), filectime($this->barUrl));
+ $this->assertEquals(100, fileatime($this->barUrl));
+ $this->assertFileTimesEqualStreamTimes($this->barUrl, $dir);
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function addNewFileNameWithLinkFunctionChangesAttributeTimeOfOriginalFile()
+ {
+ $this->markTestSkipped('Links are currently not supported by vfsStream.');
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function addNewFileNameWithLinkFunctionChangesAttributeAndModificationTimeOfDirectoryContainingLink()
+ {
+ $this->markTestSkipped('Links are currently not supported by vfsStream.');
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function removeFileChangesAttributeAndModificationTimeOfContainingDirectory()
+ {
+ $dir = vfsStream::newDirectory('bar')
+ ->at(vfsStreamWrapper::getRoot());
+ $file = vfsStream::newFile('baz.txt')
+ ->at($dir)
+ ->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ $dir->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ unlink($this->bazUrl);
+ $this->assertLessThanOrEqual(time(), filemtime($this->barUrl));
+ $this->assertLessThanOrEqual(time(), filectime($this->barUrl));
+ $this->assertEquals(100, fileatime($this->barUrl));
+ $this->assertFileTimesEqualStreamTimes($this->barUrl, $dir);
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function renameFileChangesAttributeAndModificationTimeOfAffectedDirectories()
+ {
+ $target = vfsStream::newDirectory('target')
+ ->at(vfsStreamWrapper::getRoot())
+ ->lastModified(200)
+ ->lastAccessed(200)
+ ->lastAttributeModified(200);
+ $source = vfsStream::newDirectory('bar')
+ ->at(vfsStreamWrapper::getRoot());
+ $file = vfsStream::newFile('baz.txt')
+ ->at($source)
+ ->lastModified(300)
+ ->lastAccessed(300)
+ ->lastAttributeModified(300);
+ $source->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ rename($this->bazUrl, vfsStream::url('root/target/baz.txt'));
+ $this->assertLessThanOrEqual(time(), filemtime($this->barUrl));
+ $this->assertLessThanOrEqual(time(), filectime($this->barUrl));
+ $this->assertEquals(100, fileatime($this->barUrl));
+ $this->assertFileTimesEqualStreamTimes($this->barUrl, $source);
+ $this->assertLessThanOrEqual(time(), filemtime(vfsStream::url('root/target')));
+ $this->assertLessThanOrEqual(time(), filectime(vfsStream::url('root/target')));
+ $this->assertEquals(200, fileatime(vfsStream::url('root/target')));
+ $this->assertFileTimesEqualStreamTimes(vfsStream::url('root/target'), $target);
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function renameFileDoesNotChangeFileTimesOfFileItself()
+ {
+ $target = vfsStream::newDirectory('target')
+ ->at(vfsStreamWrapper::getRoot())
+ ->lastModified(200)
+ ->lastAccessed(200)
+ ->lastAttributeModified(200);
+ $source = vfsStream::newDirectory('bar')
+ ->at(vfsStreamWrapper::getRoot());
+ $file = vfsStream::newFile('baz.txt')
+ ->at($source)
+ ->lastModified(300)
+ ->lastAccessed(300)
+ ->lastAttributeModified(300);
+ $source->lastModified(100)
+ ->lastAccessed(100)
+ ->lastAttributeModified(100);
+ rename($this->bazUrl, vfsStream::url('root/target/baz.txt'));
+ $this->assertEquals(300, filemtime(vfsStream::url('root/target/baz.txt')));
+ $this->assertEquals(300, filectime(vfsStream::url('root/target/baz.txt')));
+ $this->assertEquals(300, fileatime(vfsStream::url('root/target/baz.txt')));
+ $this->assertFileTimesEqualStreamTimes(vfsStream::url('root/target/baz.txt'), $file);
+ }
+
+ /**
+ * @test
+ * @group issue_7
+ */
+ public function changeFileAttributesChangesAttributeTimeOfFileItself()
+ {
+ $this->markTestSkipped('Changing file attributes via stream wrapper for self-defined streams is not supported by PHP.');
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php
new file mode 100644
index 0000000..1b329dc
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php
@@ -0,0 +1,440 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for flock() implementation.
+ *
+ * @package bovigo_vfs
+ * @subpackage test
+ * @since 0.10.0
+ * @see https://github.com/mikey179/vfsStream/issues/6
+ * @group issue_6
+ */
+class vfsStreamWrapperFlockTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * root directory
+ *
+ * @var vfsStreamContainer
+ */
+ protected $root;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->root = vfsStream::setup();
+ }
+
+ /**
+ * @test
+ */
+ public function fileIsNotLockedByDefault()
+ {
+ $this->assertFalse(vfsStream::newFile('foo.txt')->isLocked());
+ }
+
+ /**
+ * @test
+ */
+ public function streamIsNotLockedByDefault()
+ {
+ file_put_contents(vfsStream::url('root/foo.txt'), 'content');
+ $this->assertFalse($this->root->getChild('foo.txt')->isLocked());
+ }
+
+ /**
+ * @test
+ */
+ public function canAquireSharedLock()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $this->assertTrue(flock($fp, LOCK_SH));
+ $this->assertTrue($file->isLocked());
+ $this->assertTrue($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp);
+
+ }
+
+ /**
+ * @test
+ */
+ public function canAquireSharedLockWithNonBlockingFlockCall()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $this->assertTrue(flock($fp, LOCK_SH | LOCK_NB));
+ $this->assertTrue($file->isLocked());
+ $this->assertTrue($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp);
+
+ }
+
+ /**
+ * @test
+ */
+ public function canAquireEclusiveLock()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $this->assertTrue(flock($fp, LOCK_EX));
+ $this->assertTrue($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertTrue($file->hasExclusiveLock());
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ */
+ public function canAquireEclusiveLockWithNonBlockingFlockCall()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $this->assertTrue(flock($fp, LOCK_EX | LOCK_NB));
+ $this->assertTrue($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertTrue($file->hasExclusiveLock());
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ */
+ public function canRemoveLock()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp, LOCK_EX);
+ $this->assertTrue(flock($fp, LOCK_UN));
+ $this->assertFalse($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canRemoveLockWhenNotLocked()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $this->assertTrue(flock($fp, LOCK_UN));
+ $this->assertFalse($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertFalse($file->hasSharedLock($fp));
+ $this->assertFalse($file->hasExclusiveLock());
+ $this->assertFalse($file->hasExclusiveLock($fp));
+ fclose($fp);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canRemoveSharedLockWithoutRemovingSharedLockOnOtherFileHandler()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp1, LOCK_SH);
+ $file->lock($fp2, LOCK_SH);
+ $this->assertTrue(flock($fp1, LOCK_UN));
+ $this->assertTrue($file->hasSharedLock());
+ $this->assertFalse($file->hasSharedLock($fp1));
+ $this->assertTrue($file->hasSharedLock($fp2));
+ fclose($fp1);
+ fclose($fp2);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canNotRemoveSharedLockAcquiredOnOtherFileHandler()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp1, LOCK_SH);
+ $this->assertTrue(flock($fp2, LOCK_UN));
+ $this->assertTrue($file->isLocked());
+ $this->assertTrue($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp1);
+ fclose($fp2);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canNotRemoveExlusiveLockAcquiredOnOtherFileHandler()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp1, LOCK_EX);
+ $this->assertTrue(flock($fp2, LOCK_UN));
+ $this->assertTrue($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertTrue($file->hasExclusiveLock());
+ fclose($fp1);
+ fclose($fp2);
+ }
+
+ /**
+ * @test
+ */
+ public function canRemoveLockWithNonBlockingFlockCall()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp, LOCK_EX);
+ $this->assertTrue(flock($fp, LOCK_UN | LOCK_NB));
+ $this->assertFalse($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canNotAquireExclusiveLockIfAlreadyExclusivelyLockedOnOtherFileHandler()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp1, LOCK_EX);
+ $this->assertFalse(flock($fp2, LOCK_EX + LOCK_NB));
+ $this->assertTrue($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertTrue($file->hasExclusiveLock());
+ $this->assertTrue($file->hasExclusiveLock($fp1));
+ $this->assertFalse($file->hasExclusiveLock($fp2));
+ fclose($fp1);
+ fclose($fp2);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canAquireExclusiveLockIfAlreadySelfExclusivelyLocked()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp, LOCK_EX);
+ $this->assertTrue(flock($fp, LOCK_EX + LOCK_NB));
+ $this->assertTrue($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertTrue($file->hasExclusiveLock());
+ fclose($fp);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canNotAquireExclusiveLockIfAlreadySharedLockedOnOtherFileHandler()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp1, LOCK_SH);
+ $this->assertFalse(flock($fp2, LOCK_EX));
+ $this->assertTrue($file->isLocked());
+ $this->assertTrue($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp1);
+ fclose($fp2);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canAquireExclusiveLockIfAlreadySelfSharedLocked()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp, LOCK_SH);
+ $this->assertTrue(flock($fp, LOCK_EX));
+ $this->assertTrue($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertTrue($file->hasExclusiveLock());
+ fclose($fp);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canNotAquireSharedLockIfAlreadyExclusivelyLockedOnOtherFileHandler()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp1, LOCK_EX);
+ $this->assertFalse(flock($fp2, LOCK_SH + LOCK_NB));
+ $this->assertTrue($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertTrue($file->hasExclusiveLock());
+ fclose($fp1);
+ fclose($fp2);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canAquireSharedLockIfAlreadySelfExclusivelyLocked()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp, LOCK_EX);
+ $this->assertTrue(flock($fp, LOCK_SH + LOCK_NB));
+ $this->assertTrue($file->isLocked());
+ $this->assertTrue($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canAquireSharedLockIfAlreadySelfSharedLocked()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp, LOCK_SH);
+ $this->assertTrue(flock($fp, LOCK_SH));
+ $this->assertTrue($file->isLocked());
+ $this->assertTrue($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function canAquireSharedLockIfAlreadySharedLockedOnOtherFileHandler()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp1, LOCK_SH);
+ $this->assertTrue(flock($fp2, LOCK_SH));
+ $this->assertTrue($file->isLocked());
+ $this->assertTrue($file->hasSharedLock());
+ $this->assertTrue($file->hasSharedLock($fp1));
+ $this->assertTrue($file->hasSharedLock($fp2));
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp1);
+ fclose($fp2);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/31
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_31
+ * @group issue_40
+ */
+ public function removesExclusiveLockOnStreamClose()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp, LOCK_EX);
+ fclose($fp);
+ $this->assertFalse($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/31
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_31
+ * @group issue_40
+ */
+ public function removesSharedLockOnStreamClose()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp, LOCK_SH);
+ fclose($fp);
+ $this->assertFalse($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertFalse($file->hasExclusiveLock());
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function notRemovesExclusiveLockOnStreamCloseIfExclusiveLockAcquiredOnOtherFileHandler()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp2, LOCK_EX);
+ fclose($fp1);
+ $this->assertTrue($file->isLocked());
+ $this->assertFalse($file->hasSharedLock());
+ $this->assertTrue($file->hasExclusiveLock());
+ $this->assertTrue($file->hasExclusiveLock($fp2));
+ fclose($fp2);
+ }
+
+ /**
+ * @see https://github.com/mikey179/vfsStream/issues/40
+ * @test
+ * @group issue_40
+ */
+ public function notRemovesSharedLockOnStreamCloseIfSharedLockAcquiredOnOtherFileHandler()
+ {
+ $file = vfsStream::newFile('foo.txt')->at($this->root);
+ $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $file->lock($fp2, LOCK_SH);
+ fclose($fp1);
+ $this->assertTrue($file->isLocked());
+ $this->assertTrue($file->hasSharedLock());
+ $this->assertTrue($file->hasSharedLock($fp2));
+ $this->assertFalse($file->hasExclusiveLock());
+ fclose($fp2);
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php
new file mode 100644
index 0000000..ca1a3f5
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+use org\bovigo\vfs\content\LargeFileContent;
+/**
+ * Test for large file mocks.
+ *
+ * @package bovigo_vfs
+ * @subpackage test
+ * @since 1.3.0
+ * @group issue_79
+ */
+class vfsStreamWrapperLargeFileTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * large file to test
+ *
+ * @var vfsStreamFile
+ */
+ private $largeFile;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $root = vfsStream::setup();
+ $this->largeFile = vfsStream::newFile('large.txt')
+ ->withContent(LargeFileContent::withGigabytes(100))
+ ->at($root);
+ }
+
+ /**
+ * @test
+ */
+ public function hasLargeFileSize()
+ {
+ $this->assertEquals(
+ 100 * 1024 * 1024 * 1024,
+ filesize($this->largeFile->url())
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function canReadFromLargeFile()
+ {
+ $fp = fopen($this->largeFile->url(), 'rb');
+ $data = fread($fp, 15);
+ fclose($fp);
+ $this->assertEquals(str_repeat(' ', 15), $data);
+ }
+
+ /**
+ * @test
+ */
+ public function canWriteIntoLargeFile()
+ {
+ $fp = fopen($this->largeFile->url(), 'rb+');
+ fseek($fp, 100 * 1024 * 1024, SEEK_SET);
+ fwrite($fp, 'foobarbaz');
+ fclose($fp);
+ $this->largeFile->seek((100 * 1024 * 1024) - 3, SEEK_SET);
+ $this->assertEquals(
+ ' foobarbaz ',
+ $this->largeFile->read(15)
+ );
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php
new file mode 100644
index 0000000..afaeb47
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php
@@ -0,0 +1,224 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for quota related functionality of org\bovigo\vfs\vfsStreamWrapper.
+ *
+ * @group issue_35
+ */
+class vfsStreamWrapperQuotaTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * access to root
+ *
+ * @type vfsStreamDirectory
+ */
+ private $root;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->root = vfsStream::setup();
+ vfsStream::setQuota(10);
+ }
+
+ /**
+ * @test
+ */
+ public function writeLessThanQuotaWritesEverything()
+ {
+ $this->assertEquals(9, file_put_contents(vfsStream::url('root/file.txt'), '123456789'));
+ $this->assertEquals('123456789', $this->root->getChild('file.txt')->getContent());
+ }
+
+ /**
+ * @test
+ */
+ public function writeUpToQotaWritesEverything()
+ {
+ $this->assertEquals(10, file_put_contents(vfsStream::url('root/file.txt'), '1234567890'));
+ $this->assertEquals('1234567890', $this->root->getChild('file.txt')->getContent());
+ }
+
+ /**
+ * @test
+ */
+ public function writeMoreThanQotaWritesOnlyUpToQuota()
+ {
+ try {
+ file_put_contents(vfsStream::url('root/file.txt'), '12345678901');
+ } catch (\PHPUnit_Framework_Error $e) {
+ $this->assertEquals('file_put_contents(): Only 10 of 11 bytes written, possibly out of free disk space',
+ $e->getMessage()
+ );
+ }
+
+ $this->assertEquals('1234567890', $this->root->getChild('file.txt')->getContent());
+ }
+
+ /**
+ * @test
+ */
+ public function considersAllFilesForQuota()
+ {
+ vfsStream::newFile('foo.txt')
+ ->withContent('foo')
+ ->at(vfsStream::newDirectory('bar')
+ ->at($this->root)
+ );
+ try {
+ file_put_contents(vfsStream::url('root/file.txt'), '12345678901');
+ } catch (\PHPUnit_Framework_Error $e) {
+ $this->assertEquals('file_put_contents(): Only 7 of 11 bytes written, possibly out of free disk space',
+ $e->getMessage()
+ );
+ }
+
+ $this->assertEquals('1234567', $this->root->getChild('file.txt')->getContent());
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ */
+ public function truncateToLessThanQuotaWritesEverything()
+ {
+ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
+ $this->markTestSkipped('Requires PHP 5.4');
+ }
+
+ if (strstr(PHP_VERSION, 'hiphop') !== false) {
+ $this->markTestSkipped('Not supported on hhvm');
+ }
+
+ $fp = fopen(vfsStream::url('root/file.txt'), 'w+');
+ $this->assertTrue(ftruncate($fp, 9));
+ fclose($fp);
+ $this->assertEquals(9,
+ $this->root->getChild('file.txt')->size()
+ );
+ $this->assertEquals("\0\0\0\0\0\0\0\0\0",
+ $this->root->getChild('file.txt')->getContent()
+ );
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ */
+ public function truncateUpToQotaWritesEverything()
+ {
+ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
+ $this->markTestSkipped('Requires PHP 5.4');
+ }
+
+ if (strstr(PHP_VERSION, 'hiphop') !== false) {
+ $this->markTestSkipped('Not supported on hhvm');
+ }
+
+ $fp = fopen(vfsStream::url('root/file.txt'), 'w+');
+ $this->assertTrue(ftruncate($fp, 10));
+ fclose($fp);
+ $this->assertEquals(10,
+ $this->root->getChild('file.txt')->size()
+ );
+ $this->assertEquals("\0\0\0\0\0\0\0\0\0\0",
+ $this->root->getChild('file.txt')->getContent()
+ );
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ */
+ public function truncateToMoreThanQotaWritesOnlyUpToQuota()
+ {
+ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
+ $this->markTestSkipped('Requires PHP 5.4');
+ }
+
+ if (strstr(PHP_VERSION, 'hiphop') !== false) {
+ $this->markTestSkipped('Not supported on hhvm');
+ }
+
+ $fp = fopen(vfsStream::url('root/file.txt'), 'w+');
+ $this->assertTrue(ftruncate($fp, 11));
+ fclose($fp);
+ $this->assertEquals(10,
+ $this->root->getChild('file.txt')->size()
+ );
+ $this->assertEquals("\0\0\0\0\0\0\0\0\0\0",
+ $this->root->getChild('file.txt')->getContent()
+ );
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ */
+ public function truncateConsidersAllFilesForQuota()
+ {
+ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
+ $this->markTestSkipped('Requires PHP 5.4');
+ }
+
+ if (strstr(PHP_VERSION, 'hiphop') !== false) {
+ $this->markTestSkipped('Not supported on hhvm');
+ }
+
+ vfsStream::newFile('bar.txt')
+ ->withContent('bar')
+ ->at(vfsStream::newDirectory('bar')
+ ->at($this->root)
+ );
+ $fp = fopen(vfsStream::url('root/file.txt'), 'w+');
+ $this->assertTrue(ftruncate($fp, 11));
+ fclose($fp);
+ $this->assertEquals(7,
+ $this->root->getChild('file.txt')->size()
+ );
+ $this->assertEquals("\0\0\0\0\0\0\0",
+ $this->root->getChild('file.txt')->getContent()
+ );
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ */
+ public function canNotTruncateToGreaterLengthWhenDiscQuotaReached()
+ {
+ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
+ $this->markTestSkipped('Requires PHP 5.4');
+ }
+
+ if (strstr(PHP_VERSION, 'hiphop') !== false) {
+ $this->markTestSkipped('Not supported on hhvm');
+ }
+
+ vfsStream::newFile('bar.txt')
+ ->withContent('1234567890')
+ ->at(vfsStream::newDirectory('bar')
+ ->at($this->root)
+ );
+ $fp = fopen(vfsStream::url('root/file.txt'), 'w+');
+ $this->assertFalse(ftruncate($fp, 11));
+ fclose($fp);
+ $this->assertEquals(0,
+ $this->root->getChild('file.txt')->size()
+ );
+ $this->assertEquals('',
+ $this->root->getChild('file.txt')->getContent()
+ );
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php
new file mode 100644
index 0000000..aa86bd3
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for stream_set_option() implementation.
+ *
+ * @since 0.10.0
+ * @see https://github.com/mikey179/vfsStream/issues/15
+ * @group issue_15
+ */
+class vfsStreamWrapperSetOptionTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * root directory
+ *
+ * @var vfsStreamContainer
+ */
+ protected $root;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->root = vfsStream::setup();
+ vfsStream::newFile('foo.txt')->at($this->root);
+ }
+
+ /**
+ * @test
+ */
+ public function setBlockingDoesNotWork()
+ {
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $this->assertFalse(stream_set_blocking($fp, 1));
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ */
+ public function removeBlockingDoesNotWork()
+ {
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $this->assertFalse(stream_set_blocking($fp, 0));
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ */
+ public function setTimeoutDoesNotWork()
+ {
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $this->assertFalse(stream_set_timeout($fp, 1));
+ fclose($fp);
+ }
+
+ /**
+ * @test
+ */
+ public function setWriteBufferDoesNotWork()
+ {
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $this->assertEquals(-1, stream_set_write_buffer($fp, 512));
+ fclose($fp);
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php
new file mode 100644
index 0000000..c2aec99
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper.
+ *
+ * @since 0.9.0
+ * @group issue_3
+ */
+class vfsStreamWrapperSelectStreamTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @test
+ * @expectedException \PHPUnit_Framework_Error
+ */
+ public function selectStream()
+ {
+ $root = vfsStream::setup();
+ $file = vfsStream::newFile('foo.txt')->at($root)->withContent('testContent');
+
+ $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
+ $readarray = array($fp);
+ $writearray = array();
+ $exceptarray = array();
+ stream_select($readarray, $writearray, $exceptarray, 1);
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php
new file mode 100644
index 0000000..3dd4e51
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php
@@ -0,0 +1,770 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+require_once __DIR__ . '/vfsStreamWrapperBaseTestCase.php';
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper.
+ */
+class vfsStreamWrapperTestCase extends vfsStreamWrapperBaseTestCase
+{
+ /**
+ * ensure that a call to vfsStreamWrapper::register() resets the stream
+ *
+ * Implemented after a request by David Zülke.
+ *
+ * @test
+ */
+ public function resetByRegister()
+ {
+ $this->assertSame($this->foo, vfsStreamWrapper::getRoot());
+ vfsStreamWrapper::register();
+ $this->assertNull(vfsStreamWrapper::getRoot());
+ }
+
+ /**
+ * @test
+ * @since 0.11.0
+ */
+ public function setRootReturnsRoot()
+ {
+ vfsStreamWrapper::register();
+ $root = vfsStream::newDirectory('root');
+ $this->assertSame($root, vfsStreamWrapper::setRoot($root));
+ }
+
+ /**
+ * assure that filesize is returned correct
+ *
+ * @test
+ */
+ public function filesize()
+ {
+ $this->assertEquals(0, filesize($this->fooURL));
+ $this->assertEquals(0, filesize($this->fooURL . '/.'));
+ $this->assertEquals(0, filesize($this->barURL));
+ $this->assertEquals(0, filesize($this->barURL . '/.'));
+ $this->assertEquals(4, filesize($this->baz2URL));
+ $this->assertEquals(5, filesize($this->baz1URL));
+ }
+
+ /**
+ * assert that file_exists() delivers correct result
+ *
+ * @test
+ */
+ public function file_exists()
+ {
+ $this->assertTrue(file_exists($this->fooURL));
+ $this->assertTrue(file_exists($this->fooURL . '/.'));
+ $this->assertTrue(file_exists($this->barURL));
+ $this->assertTrue(file_exists($this->barURL . '/.'));
+ $this->assertTrue(file_exists($this->baz1URL));
+ $this->assertTrue(file_exists($this->baz2URL));
+ $this->assertFalse(file_exists($this->fooURL . '/another'));
+ $this->assertFalse(file_exists(vfsStream::url('another')));
+ }
+
+ /**
+ * assert that filemtime() delivers correct result
+ *
+ * @test
+ */
+ public function filemtime()
+ {
+ $this->assertEquals(100, filemtime($this->fooURL));
+ $this->assertEquals(100, filemtime($this->fooURL . '/.'));
+ $this->assertEquals(200, filemtime($this->barURL));
+ $this->assertEquals(200, filemtime($this->barURL . '/.'));
+ $this->assertEquals(300, filemtime($this->baz1URL));
+ $this->assertEquals(400, filemtime($this->baz2URL));
+ }
+
+ /**
+ * @test
+ * @group issue_23
+ */
+ public function unlinkRemovesFilesOnly()
+ {
+ $this->assertTrue(unlink($this->baz2URL));
+ $this->assertFalse(file_exists($this->baz2URL)); // make sure statcache was cleared
+ $this->assertEquals(array($this->bar), $this->foo->getChildren());
+ $this->assertFalse(@unlink($this->fooURL . '/another'));
+ $this->assertFalse(@unlink(vfsStream::url('another')));
+ $this->assertEquals(array($this->bar), $this->foo->getChildren());
+ }
+
+ /**
+ * @test
+ * @group issue_49
+ */
+ public function unlinkReturnsFalseWhenFileDoesNotExist()
+ {
+ vfsStream::setup()->addChild(vfsStream::newFile('foo.blubb'));
+ $this->assertFalse(@unlink(vfsStream::url('foo.blubb2')));
+ }
+
+ /**
+ * @test
+ * @group issue_49
+ */
+ public function unlinkReturnsFalseWhenFileDoesNotExistAndFileWithSameNameExistsInRoot()
+ {
+ vfsStream::setup()->addChild(vfsStream::newFile('foo.blubb'));
+ $this->assertFalse(@unlink(vfsStream::url('foo.blubb')));
+ }
+
+ /**
+ * assert dirname() returns correct directory name
+ *
+ * @test
+ */
+ public function dirname()
+ {
+ $this->assertEquals($this->fooURL, dirname($this->barURL));
+ $this->assertEquals($this->barURL, dirname($this->baz1URL));
+ # returns "vfs:" instead of "."
+ # however this seems not to be fixable because dirname() does not
+ # call the stream wrapper
+ #$this->assertEquals(dirname(vfsStream::url('doesNotExist')), '.');
+ }
+
+ /**
+ * assert basename() returns correct file name
+ *
+ * @test
+ */
+ public function basename()
+ {
+ $this->assertEquals('bar', basename($this->barURL));
+ $this->assertEquals('baz1', basename($this->baz1URL));
+ $this->assertEquals('doesNotExist', basename(vfsStream::url('doesNotExist')));
+ }
+
+ /**
+ * assert is_readable() works correct
+ *
+ * @test
+ */
+ public function is_readable()
+ {
+ $this->assertTrue(is_readable($this->fooURL));
+ $this->assertTrue(is_readable($this->fooURL . '/.'));
+ $this->assertTrue(is_readable($this->barURL));
+ $this->assertTrue(is_readable($this->barURL . '/.'));
+ $this->assertTrue(is_readable($this->baz1URL));
+ $this->assertTrue(is_readable($this->baz2URL));
+ $this->assertFalse(is_readable($this->fooURL . '/another'));
+ $this->assertFalse(is_readable(vfsStream::url('another')));
+
+ $this->foo->chmod(0222);
+ $this->assertFalse(is_readable($this->fooURL));
+
+ $this->baz1->chmod(0222);
+ $this->assertFalse(is_readable($this->baz1URL));
+ }
+
+ /**
+ * assert is_writable() works correct
+ *
+ * @test
+ */
+ public function is_writable()
+ {
+ $this->assertTrue(is_writable($this->fooURL));
+ $this->assertTrue(is_writable($this->fooURL . '/.'));
+ $this->assertTrue(is_writable($this->barURL));
+ $this->assertTrue(is_writable($this->barURL . '/.'));
+ $this->assertTrue(is_writable($this->baz1URL));
+ $this->assertTrue(is_writable($this->baz2URL));
+ $this->assertFalse(is_writable($this->fooURL . '/another'));
+ $this->assertFalse(is_writable(vfsStream::url('another')));
+
+ $this->foo->chmod(0444);
+ $this->assertFalse(is_writable($this->fooURL));
+
+ $this->baz1->chmod(0444);
+ $this->assertFalse(is_writable($this->baz1URL));
+ }
+
+ /**
+ * assert is_executable() works correct
+ *
+ * @test
+ */
+ public function is_executable()
+ {
+ $this->assertFalse(is_executable($this->baz1URL));
+ $this->baz1->chmod(0766);
+ $this->assertTrue(is_executable($this->baz1URL));
+ $this->assertFalse(is_executable($this->baz2URL));
+ }
+
+ /**
+ * assert is_executable() works correct
+ *
+ * @test
+ */
+ public function directoriesAndNonExistingFilesAreNeverExecutable()
+ {
+ $this->assertFalse(is_executable($this->fooURL));
+ $this->assertFalse(is_executable($this->fooURL . '/.'));
+ $this->assertFalse(is_executable($this->barURL));
+ $this->assertFalse(is_executable($this->barURL . '/.'));
+ $this->assertFalse(is_executable($this->fooURL . '/another'));
+ $this->assertFalse(is_executable(vfsStream::url('another')));
+ }
+
+ /**
+ * file permissions
+ *
+ * @test
+ * @group permissions
+ */
+ public function chmod()
+ {
+ $this->assertEquals(40777, decoct(fileperms($this->fooURL)));
+ $this->assertEquals(40777, decoct(fileperms($this->fooURL . '/.')));
+ $this->assertEquals(40777, decoct(fileperms($this->barURL)));
+ $this->assertEquals(40777, decoct(fileperms($this->barURL . '/.')));
+ $this->assertEquals(100666, decoct(fileperms($this->baz1URL)));
+ $this->assertEquals(100666, decoct(fileperms($this->baz2URL)));
+
+ $this->foo->chmod(0755);
+ $this->bar->chmod(0700);
+ $this->baz1->chmod(0644);
+ $this->baz2->chmod(0600);
+ $this->assertEquals(40755, decoct(fileperms($this->fooURL)));
+ $this->assertEquals(40755, decoct(fileperms($this->fooURL . '/.')));
+ $this->assertEquals(40700, decoct(fileperms($this->barURL)));
+ $this->assertEquals(40700, decoct(fileperms($this->barURL . '/.')));
+ $this->assertEquals(100644, decoct(fileperms($this->baz1URL)));
+ $this->assertEquals(100600, decoct(fileperms($this->baz2URL)));
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @group permissions
+ */
+ public function chmodModifiesPermissions()
+ {
+ if (version_compare(phpversion(), '5.4.0', '<')) {
+ $this->assertFalse(@chmod($this->fooURL, 0755));
+ $this->assertFalse(@chmod($this->barURL, 0711));
+ $this->assertFalse(@chmod($this->baz1URL, 0644));
+ $this->assertFalse(@chmod($this->baz2URL, 0664));
+ $this->assertEquals(40777, decoct(fileperms($this->fooURL)));
+ $this->assertEquals(40777, decoct(fileperms($this->barURL)));
+ $this->assertEquals(100666, decoct(fileperms($this->baz1URL)));
+ $this->assertEquals(100666, decoct(fileperms($this->baz2URL)));
+ } else {
+ $this->assertTrue(chmod($this->fooURL, 0755));
+ $this->assertTrue(chmod($this->barURL, 0711));
+ $this->assertTrue(chmod($this->baz1URL, 0644));
+ $this->assertTrue(chmod($this->baz2URL, 0664));
+ $this->assertEquals(40755, decoct(fileperms($this->fooURL)));
+ $this->assertEquals(40711, decoct(fileperms($this->barURL)));
+ $this->assertEquals(100644, decoct(fileperms($this->baz1URL)));
+ $this->assertEquals(100664, decoct(fileperms($this->baz2URL)));
+ }
+ }
+
+ /**
+ * @test
+ * @group permissions
+ */
+ public function fileownerIsCurrentUserByDefault()
+ {
+ $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->fooURL));
+ $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->fooURL . '/.'));
+ $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->barURL));
+ $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->barURL . '/.'));
+ $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->baz1URL));
+ $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->baz2URL));
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @group permissions
+ */
+ public function chownChangesUser()
+ {
+ if (version_compare(phpversion(), '5.4.0', '<')) {
+ $this->foo->chown(vfsStream::OWNER_USER_1);
+ $this->bar->chown(vfsStream::OWNER_USER_1);
+ $this->baz1->chown(vfsStream::OWNER_USER_2);
+ $this->baz2->chown(vfsStream::OWNER_USER_2);
+ } else {
+ chown($this->fooURL, vfsStream::OWNER_USER_1);
+ chown($this->barURL, vfsStream::OWNER_USER_1);
+ chown($this->baz1URL, vfsStream::OWNER_USER_2);
+ chown($this->baz2URL, vfsStream::OWNER_USER_2);
+ }
+
+ $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->fooURL));
+ $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->fooURL . '/.'));
+ $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->barURL));
+ $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->barURL . '/.'));
+ $this->assertEquals(vfsStream::OWNER_USER_2, fileowner($this->baz1URL));
+ $this->assertEquals(vfsStream::OWNER_USER_2, fileowner($this->baz2URL));
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @group permissions
+ */
+ public function chownDoesNotWorkOnVfsStreamUrls()
+ {
+ if (version_compare(phpversion(), '5.4.0', '<')) {
+ $this->assertFalse(@chown($this->fooURL, vfsStream::OWNER_USER_2));
+ $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->fooURL));
+ }
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @group permissions
+ */
+ public function groupIsCurrentGroupByDefault()
+ {
+ $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->fooURL));
+ $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->fooURL . '/.'));
+ $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->barURL));
+ $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->barURL . '/.'));
+ $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->baz1URL));
+ $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->baz2URL));
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @group permissions
+ */
+ public function chgrp()
+ {
+ if (version_compare(phpversion(), '5.4.0', '<')) {
+ $this->foo->chgrp(vfsStream::GROUP_USER_1);
+ $this->bar->chgrp(vfsStream::GROUP_USER_1);
+ $this->baz1->chgrp(vfsStream::GROUP_USER_2);
+ $this->baz2->chgrp(vfsStream::GROUP_USER_2);
+ } else {
+ chgrp($this->fooURL, vfsStream::GROUP_USER_1);
+ chgrp($this->barURL, vfsStream::GROUP_USER_1);
+ chgrp($this->baz1URL, vfsStream::GROUP_USER_2);
+ chgrp($this->baz2URL, vfsStream::GROUP_USER_2);
+ }
+
+ $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->fooURL));
+ $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->fooURL . '/.'));
+ $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->barURL));
+ $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->barURL . '/.'));
+ $this->assertEquals(vfsStream::GROUP_USER_2, filegroup($this->baz1URL));
+ $this->assertEquals(vfsStream::GROUP_USER_2, filegroup($this->baz2URL));
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @group permissions
+ */
+ public function chgrpDoesNotWorkOnVfsStreamUrls()
+ {
+ if (version_compare(phpversion(), '5.4.0', '<')) {
+ $this->assertFalse(@chgrp($this->fooURL, vfsStream::GROUP_USER_2));
+ $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->fooURL));
+ }
+ }
+
+ /**
+ * @test
+ * @author Benoit Aubuchon
+ */
+ public function renameDirectory()
+ {
+ // move foo/bar to foo/baz3
+ $baz3URL = vfsStream::url('foo/baz3');
+ $this->assertTrue(rename($this->barURL, $baz3URL));
+ $this->assertFileExists($baz3URL);
+ $this->assertFileNotExists($this->barURL);
+ }
+
+ /**
+ * @test
+ */
+ public function renameDirectoryWithDots()
+ {
+ // move foo/bar to foo/baz3
+ $baz3URL = vfsStream::url('foo/baz3');
+ $this->assertTrue(rename($this->barURL . '/.', $baz3URL));
+ $this->assertFileExists($baz3URL);
+ $this->assertFileNotExists($this->barURL);
+ }
+
+ /**
+ * @test
+ * @group issue_9
+ * @since 0.9.0
+ */
+ public function renameDirectoryWithDotsInTarget()
+ {
+ // move foo/bar to foo/baz3
+ $baz3URL = vfsStream::url('foo/../baz3/.');
+ $this->assertTrue(rename($this->barURL . '/.', $baz3URL));
+ $this->assertFileExists($baz3URL);
+ $this->assertFileNotExists($this->barURL);
+ }
+
+ /**
+ * @test
+ * @author Benoit Aubuchon
+ */
+ public function renameDirectoryOverwritingExistingFile()
+ {
+ // move foo/bar to foo/baz2
+ $this->assertTrue(rename($this->barURL, $this->baz2URL));
+ $this->assertFileExists(vfsStream::url('foo/baz2/baz1'));
+ $this->assertFileNotExists($this->barURL);
+ }
+
+ /**
+ * @test
+ * @expectedException PHPUnit_Framework_Error
+ */
+ public function renameFileIntoFile()
+ {
+ // foo/baz2 is a file, so it can not be turned into a directory
+ $baz3URL = vfsStream::url('foo/baz2/baz3');
+ $this->assertTrue(rename($this->baz1URL, $baz3URL));
+ $this->assertFileExists($baz3URL);
+ $this->assertFileNotExists($this->baz1URL);
+ }
+
+ /**
+ * @test
+ * @author Benoit Aubuchon
+ */
+ public function renameFileToDirectory()
+ {
+ // move foo/bar/baz1 to foo/baz3
+ $baz3URL = vfsStream::url('foo/baz3');
+ $this->assertTrue(rename($this->baz1URL, $baz3URL));
+ $this->assertFileExists($this->barURL);
+ $this->assertFileExists($baz3URL);
+ $this->assertFileNotExists($this->baz1URL);
+ }
+
+ /**
+ * assert that trying to rename from a non existing file trigger a warning
+ *
+ * @expectedException PHPUnit_Framework_Error
+ * @test
+ */
+ public function renameOnSourceFileNotFound()
+ {
+ rename(vfsStream::url('notfound'), $this->baz1URL);
+ }
+ /**
+ * assert that trying to rename to a directory that is not found trigger a warning
+
+ * @expectedException PHPUnit_Framework_Error
+ * @test
+ */
+ public function renameOnDestinationDirectoryFileNotFound()
+ {
+ rename($this->baz1URL, vfsStream::url('foo/notfound/file2'));
+ }
+ /**
+ * stat() and fstat() should return the same result
+ *
+ * @test
+ */
+ public function statAndFstatReturnSameResult()
+ {
+ $fp = fopen($this->baz2URL, 'r');
+ $this->assertEquals(stat($this->baz2URL),
+ fstat($fp)
+ );
+ fclose($fp);
+ }
+
+ /**
+ * stat() returns full data
+ *
+ * @test
+ */
+ public function statReturnsFullDataForFiles()
+ {
+ $this->assertEquals(array(0 => 0,
+ 1 => 0,
+ 2 => 0100666,
+ 3 => 0,
+ 4 => vfsStream::getCurrentUser(),
+ 5 => vfsStream::getCurrentGroup(),
+ 6 => 0,
+ 7 => 4,
+ 8 => 400,
+ 9 => 400,
+ 10 => 400,
+ 11 => -1,
+ 12 => -1,
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => 0100666,
+ 'nlink' => 0,
+ 'uid' => vfsStream::getCurrentUser(),
+ 'gid' => vfsStream::getCurrentGroup(),
+ 'rdev' => 0,
+ 'size' => 4,
+ 'atime' => 400,
+ 'mtime' => 400,
+ 'ctime' => 400,
+ 'blksize' => -1,
+ 'blocks' => -1
+ ),
+ stat($this->baz2URL)
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function statReturnsFullDataForDirectories()
+ {
+ $this->assertEquals(array(0 => 0,
+ 1 => 0,
+ 2 => 0040777,
+ 3 => 0,
+ 4 => vfsStream::getCurrentUser(),
+ 5 => vfsStream::getCurrentGroup(),
+ 6 => 0,
+ 7 => 0,
+ 8 => 100,
+ 9 => 100,
+ 10 => 100,
+ 11 => -1,
+ 12 => -1,
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => 0040777,
+ 'nlink' => 0,
+ 'uid' => vfsStream::getCurrentUser(),
+ 'gid' => vfsStream::getCurrentGroup(),
+ 'rdev' => 0,
+ 'size' => 0,
+ 'atime' => 100,
+ 'mtime' => 100,
+ 'ctime' => 100,
+ 'blksize' => -1,
+ 'blocks' => -1
+ ),
+ stat($this->fooURL)
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function statReturnsFullDataForDirectoriesWithDot()
+ {
+ $this->assertEquals(array(0 => 0,
+ 1 => 0,
+ 2 => 0040777,
+ 3 => 0,
+ 4 => vfsStream::getCurrentUser(),
+ 5 => vfsStream::getCurrentGroup(),
+ 6 => 0,
+ 7 => 0,
+ 8 => 100,
+ 9 => 100,
+ 10 => 100,
+ 11 => -1,
+ 12 => -1,
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => 0040777,
+ 'nlink' => 0,
+ 'uid' => vfsStream::getCurrentUser(),
+ 'gid' => vfsStream::getCurrentGroup(),
+ 'rdev' => 0,
+ 'size' => 0,
+ 'atime' => 100,
+ 'mtime' => 100,
+ 'ctime' => 100,
+ 'blksize' => -1,
+ 'blocks' => -1
+ ),
+ stat($this->fooURL . '/.')
+ );
+ }
+
+ /**
+ * @test
+ * @expectedException PHPUnit_Framework_Error
+ */
+ public function openFileWithoutDirectory()
+ {
+ vfsStreamWrapper::register();
+ $this->assertFalse(file_get_contents(vfsStream::url('file.txt')));
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ * @since 1.1.0
+ * @requires PHP 5.4.0
+ */
+ public function truncateRemovesSuperflouosContent()
+ {
+ if (strstr(PHP_VERSION, 'hiphop') !== false) {
+ $this->markTestSkipped('Not supported on hhvm');
+ }
+
+ $handle = fopen($this->baz1URL, "r+");
+ $this->assertTrue(ftruncate($handle, 0));
+ $this->assertEquals(0, filesize($this->baz1URL));
+ $this->assertEquals('', file_get_contents($this->baz1URL));
+ fclose($handle);
+ }
+
+ /**
+ * @test
+ * @group issue_33
+ * @since 1.1.0
+ * @requires PHP 5.4.0
+ */
+ public function truncateToGreaterSizeAddsZeroBytes()
+ {
+ if (strstr(PHP_VERSION, 'hiphop') !== false) {
+ $this->markTestSkipped('Not supported on hhvm');
+ }
+
+ $handle = fopen($this->baz1URL, "r+");
+ $this->assertTrue(ftruncate($handle, 25));
+ $this->assertEquals(25, filesize($this->baz1URL));
+ $this->assertEquals("baz 1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
+ file_get_contents($this->baz1URL));
+ fclose($handle);
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @requires PHP 5.4.0
+ */
+ public function touchCreatesNonExistingFile()
+ {
+ $this->assertTrue(touch($this->fooURL . '/new.txt'));
+ $this->assertTrue($this->foo->hasChild('new.txt'));
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @requires PHP 5.4.0
+ */
+ public function touchChangesAccessAndModificationTimeForFile()
+ {
+ $this->assertTrue(touch($this->baz1URL, 303, 313));
+ $this->assertEquals(303, $this->baz1->filemtime());
+ $this->assertEquals(313, $this->baz1->fileatime());
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @group issue_80
+ * @requires PHP 5.4.0
+ */
+ public function touchChangesTimesToCurrentTimestampWhenNoTimesGiven()
+ {
+ $this->assertTrue(touch($this->baz1URL));
+ $this->assertEquals(time(), $this->baz1->filemtime(), '', 1);
+ $this->assertEquals(time(), $this->baz1->fileatime(), '', 1);
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @requires PHP 5.4.0
+ */
+ public function touchWithModifiedTimeChangesAccessAndModifiedTime()
+ {
+ $this->assertTrue(touch($this->baz1URL, 303));
+ $this->assertEquals(303, $this->baz1->filemtime());
+ $this->assertEquals(303, $this->baz1->fileatime());
+ }
+
+ /**
+ * @test
+ * @group issue_11
+ * @requires PHP 5.4.0
+ */
+ public function touchChangesAccessAndModificationTimeForDirectory()
+ {
+ $this->assertTrue(touch($this->fooURL, 303, 313));
+ $this->assertEquals(303, $this->foo->filemtime());
+ $this->assertEquals(313, $this->foo->fileatime());
+ }
+
+ /**
+ * @test
+ * @group issue_34
+ * @since 1.2.0
+ */
+ public function pathesAreCorrectlySet()
+ {
+ $this->assertEquals(vfsStream::path($this->fooURL), $this->foo->path());
+ $this->assertEquals(vfsStream::path($this->barURL), $this->bar->path());
+ $this->assertEquals(vfsStream::path($this->baz1URL), $this->baz1->path());
+ $this->assertEquals(vfsStream::path($this->baz2URL), $this->baz2->path());
+ }
+
+ /**
+ * @test
+ * @group issue_34
+ * @since 1.2.0
+ */
+ public function urlsAreCorrectlySet()
+ {
+ $this->assertEquals($this->fooURL, $this->foo->url());
+ $this->assertEquals($this->barURL, $this->bar->url());
+ $this->assertEquals($this->baz1URL, $this->baz1->url());
+ $this->assertEquals($this->baz2URL, $this->baz2->url());
+ }
+
+ /**
+ * @test
+ * @group issue_34
+ * @since 1.2.0
+ */
+ public function pathIsUpdatedAfterMove()
+ {
+ // move foo/bar/baz1 to foo/baz3
+ $baz3URL = vfsStream::url('foo/baz3');
+ $this->assertTrue(rename($this->baz1URL, $baz3URL));
+ $this->assertEquals(vfsStream::path($baz3URL), $this->baz1->path());
+ }
+
+ /**
+ * @test
+ * @group issue_34
+ * @since 1.2.0
+ */
+ public function urlIsUpdatedAfterMove()
+ {
+ // move foo/bar/baz1 to foo/baz3
+ $baz3URL = vfsStream::url('foo/baz3');
+ $this->assertTrue(rename($this->baz1URL, $baz3URL));
+ $this->assertEquals($baz3URL, $this->baz1->url());
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperUnregisterTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperUnregisterTestCase.php
new file mode 100644
index 0000000..2457304
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperUnregisterTestCase.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper.
+ */
+class vfsStreamWrapperUnregisterTestCase extends \PHPUnit_Framework_TestCase
+{
+
+ /**
+ * Unregistering a registered URL wrapper.
+ *
+ * @test
+ */
+ public function unregisterRegisteredUrlWrapper()
+ {
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::unregister();
+ $this->assertNotContains(vfsStream::SCHEME, stream_get_wrappers());
+ }
+
+ /**
+ * Unregistering a third party wrapper for vfs:// fails.
+ *
+ * @test
+ * @expectedException org\bovigo\vfs\vfsStreamException
+ * @runInSeparateProcess
+ */
+ public function unregisterThirdPartyVfsScheme()
+ {
+ // Unregister possible registered URL wrapper.
+ vfsStreamWrapper::unregister();
+
+ $mock = $this->getMock('org\\bovigo\\vfs\\vfsStreamWrapper');
+ stream_wrapper_register(vfsStream::SCHEME, get_class($mock));
+
+ vfsStreamWrapper::unregister();
+ }
+
+ /**
+ * Unregistering when not in registered state will fail.
+ *
+ * @test
+ * @expectedException org\bovigo\vfs\vfsStreamException
+ * @runInSeparateProcess
+ */
+ public function unregisterWhenNotInRegisteredState()
+ {
+ vfsStreamWrapper::register();
+ stream_wrapper_unregister(vfsStream::SCHEME);
+ vfsStreamWrapper::unregister();
+ }
+
+ /**
+ * Unregistering while not registers won't fail.
+ *
+ * @test
+ */
+ public function unregisterWhenNotRegistered()
+ {
+ // Unregister possible registered URL wrapper.
+ vfsStreamWrapper::unregister();
+
+ $this->assertNotContains(vfsStream::SCHEME, stream_get_wrappers());
+ vfsStreamWrapper::unregister();
+ }
+}
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php
new file mode 100644
index 0000000..fab0c13
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper.
+ */
+class vfsStreamWrapperWithoutRootTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ vfsStreamWrapper::register();
+ }
+
+ /**
+ * no root > no directory to open
+ *
+ * @test
+ */
+ public function canNotOpenDirectory()
+ {
+ $this->assertFalse(@dir(vfsStream::url('foo')));
+ }
+
+ /**
+ * can not unlink without root
+ *
+ * @test
+ */
+ public function canNotUnlink()
+ {
+ $this->assertFalse(@unlink(vfsStream::url('foo')));
+ }
+
+ /**
+ * can not open a file without root
+ *
+ * @test
+ */
+ public function canNotOpen()
+ {
+ $this->assertFalse(@fopen(vfsStream::url('foo'), 'r'));
+ }
+
+ /**
+ * can not rename a file without root
+ *
+ * @test
+ */
+ public function canNotRename()
+ {
+ $this->assertFalse(@rename(vfsStream::url('foo'), vfsStream::url('bar')));
+ }
+}
+?>
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php
new file mode 100644
index 0000000..6aedcec
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Test for org\bovigo\vfs\vfsStreamWrapper in conjunction with ext/zip.
+ *
+ * @group zip
+ */
+class vfsStreamZipTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ if (extension_loaded('zip') === false) {
+ $this->markTestSkipped('No ext/zip installed, skipping test.');
+ }
+
+ $this->markTestSkipped('Zip extension can not work with vfsStream urls.');
+
+ vfsStreamWrapper::register();
+ vfsStreamWrapper::setRoot(vfsStream::newDirectory('root'));
+
+ }
+
+ /**
+ * @test
+ */
+ public function createZipArchive()
+ {
+ $zip = new ZipArchive();
+ $this->assertTrue($zip->open(vfsStream::url('root/test.zip'), ZipArchive::CREATE));
+ $this->assertTrue($zip->addFromString("testfile1.txt", "#1 This is a test string added as testfile1.txt.\n"));
+ $this->assertTrue($zip->addFromString("testfile2.txt", "#2 This is a test string added as testfile2.txt.\n"));
+ $zip->setArchiveComment('a test');
+ var_dump($zip);
+ $this->assertTrue($zip->close());
+ var_dump($zip->getStatusString());
+ var_dump($zip->close());
+ var_dump($zip->getStatusString());
+ var_dump($zip);
+ var_dump(file_exists(vfsStream::url('root/test.zip')));
+ }
+}
+?> \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php
new file mode 100644
index 0000000..d7bb49e
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php
@@ -0,0 +1,99 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs\visitor;
+use org\bovigo\vfs\vfsStreamDirectory;
+use org\bovigo\vfs\vfsStreamFile;
+use org\bovigo\vfs\vfsStreamBlock;
+/**
+ * Test for org\bovigo\vfs\visitor\vfsStreamAbstractVisitor.
+ *
+ * @since 0.10.0
+ * @see https://github.com/mikey179/vfsStream/issues/10
+ * @group issue_10
+ */
+class vfsStreamAbstractVisitorTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * instance to test
+ *
+ * @var vfsStreamAbstractVisitor
+ */
+ protected $abstractVisitor;
+
+ /**
+ * set up test environment
+ */
+ public function setUp()
+ {
+ $this->abstractVisitor = $this->getMock('org\\bovigo\\vfs\\visitor\\vfsStreamAbstractVisitor',
+ array('visitFile', 'visitDirectory')
+ );
+ }
+
+ /**
+ * @test
+ * @expectedException \InvalidArgumentException
+ */
+ public function visitThrowsInvalidArgumentExceptionOnUnknownContentType()
+ {
+ $mockContent = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent');
+ $mockContent->expects($this->any())
+ ->method('getType')
+ ->will($this->returnValue('invalid'));
+ $this->assertSame($this->abstractVisitor,
+ $this->abstractVisitor->visit($mockContent)
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function visitWithFileCallsVisitFile()
+ {
+ $file = new vfsStreamFile('foo.txt');
+ $this->abstractVisitor->expects($this->once())
+ ->method('visitFile')
+ ->with($this->equalTo($file));
+ $this->assertSame($this->abstractVisitor,
+ $this->abstractVisitor->visit($file)
+ );
+ }
+
+ /**
+ * tests that a block device eventually calls out to visit file
+ *
+ * @test
+ */
+ public function visitWithBlockCallsVisitFile()
+ {
+ $block = new vfsStreamBlock('foo');
+ $this->abstractVisitor->expects($this->once())
+ ->method('visitFile')
+ ->with($this->equalTo($block));
+ $this->assertSame($this->abstractVisitor,
+ $this->abstractVisitor->visit($block)
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function visitWithDirectoryCallsVisitDirectory()
+ {
+ $dir = new vfsStreamDirectory('bar');
+ $this->abstractVisitor->expects($this->once())
+ ->method('visitDirectory')
+ ->with($this->equalTo($dir));
+ $this->assertSame($this->abstractVisitor,
+ $this->abstractVisitor->visit($dir)
+ );
+ }
+}
+?>
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php
new file mode 100644
index 0000000..05a11ac
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php
@@ -0,0 +1,103 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs\visitor;
+use org\bovigo\vfs\vfsStream;
+use org\bovigo\vfs\vfsStreamDirectory;
+use org\bovigo\vfs\vfsStreamFile;
+/**
+ * Test for org\bovigo\vfs\visitor\vfsStreamPrintVisitor.
+ *
+ * @since 0.10.0
+ * @see https://github.com/mikey179/vfsStream/issues/10
+ * @group issue_10
+ */
+class vfsStreamPrintVisitorTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @test
+ * @expectedException \InvalidArgumentException
+ */
+ public function constructWithNonResourceThrowsInvalidArgumentException()
+ {
+ new vfsStreamPrintVisitor('invalid');
+ }
+
+ /**
+ * @test
+ * @expectedException \InvalidArgumentException
+ */
+ public function constructWithNonStreamResourceThrowsInvalidArgumentException()
+ {
+ new vfsStreamPrintVisitor(xml_parser_create());
+ }
+
+ /**
+ * @test
+ */
+ public function visitFileWritesFileNameToStream()
+ {
+ $output = vfsStream::newFile('foo.txt')
+ ->at(vfsStream::setup());
+ $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb'));
+ $this->assertSame($printVisitor,
+ $printVisitor->visitFile(vfsStream::newFile('bar.txt'))
+ );
+ $this->assertEquals("- bar.txt\n", $output->getContent());
+ }
+
+ /**
+ * @test
+ */
+ public function visitFileWritesBlockDeviceToStream()
+ {
+ $output = vfsStream::newFile('foo.txt')
+ ->at(vfsStream::setup());
+ $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb'));
+ $this->assertSame($printVisitor,
+ $printVisitor->visitBlockDevice(vfsStream::newBlock('bar'))
+ );
+ $this->assertEquals("- [bar]\n", $output->getContent());
+ }
+
+ /**
+ * @test
+ */
+ public function visitDirectoryWritesDirectoryNameToStream()
+ {
+ $output = vfsStream::newFile('foo.txt')
+ ->at(vfsStream::setup());
+ $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb'));
+ $this->assertSame($printVisitor,
+ $printVisitor->visitDirectory(vfsStream::newDirectory('baz'))
+ );
+ $this->assertEquals("- baz\n", $output->getContent());
+ }
+
+ /**
+ * @test
+ */
+ public function visitRecursiveDirectoryStructure()
+ {
+ $root = vfsStream::setup('root',
+ null,
+ array('test' => array('foo' => array('test.txt' => 'hello'),
+ 'baz.txt' => 'world'
+ ),
+ 'foo.txt' => ''
+ )
+ );
+ $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb'));
+ $this->assertSame($printVisitor,
+ $printVisitor->visitDirectory($root)
+ );
+ $this->assertEquals("- root\n - test\n - foo\n - test.txt\n - baz.txt\n - foo.txt\n", file_get_contents('vfs://root/foo.txt'));
+ }
+}
+?>
diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php
new file mode 100644
index 0000000..ad93a2c
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php
@@ -0,0 +1,86 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package org\bovigo\vfs
+ */
+namespace org\bovigo\vfs\visitor;
+use org\bovigo\vfs\vfsStream;
+/**
+ * Test for org\bovigo\vfs\visitor\vfsStreamStructureVisitor.
+ *
+ * @since 0.10.0
+ * @see https://github.com/mikey179/vfsStream/issues/10
+ * @group issue_10
+ */
+class vfsStreamStructureVisitorTestCase extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @test
+ */
+ public function visitFileCreatesStructureForFile()
+ {
+ $structureVisitor = new vfsStreamStructureVisitor();
+ $this->assertEquals(array('foo.txt' => 'test'),
+ $structureVisitor->visitFile(vfsStream::newFile('foo.txt')
+ ->withContent('test')
+ )
+ ->getStructure()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function visitFileCreatesStructureForBlock()
+ {
+ $structureVisitor = new vfsStreamStructureVisitor();
+ $this->assertEquals(array('[foo]' => 'test'),
+ $structureVisitor->visitBlockDevice(vfsStream::newBlock('foo')
+ ->withContent('test')
+ )
+ ->getStructure()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function visitDirectoryCreatesStructureForDirectory()
+ {
+ $structureVisitor = new vfsStreamStructureVisitor();
+ $this->assertEquals(array('baz' => array()),
+ $structureVisitor->visitDirectory(vfsStream::newDirectory('baz'))
+ ->getStructure()
+ );
+ }
+
+ /**
+ * @test
+ */
+ public function visitRecursiveDirectoryStructure()
+ {
+ $root = vfsStream::setup('root',
+ null,
+ array('test' => array('foo' => array('test.txt' => 'hello'),
+ 'baz.txt' => 'world'
+ ),
+ 'foo.txt' => ''
+ )
+ );
+ $structureVisitor = new vfsStreamStructureVisitor();
+ $this->assertEquals(array('root' => array('test' => array('foo' => array('test.txt' => 'hello'),
+ 'baz.txt' => 'world'
+ ),
+ 'foo.txt' => ''
+ ),
+ ),
+ $structureVisitor->visitDirectory($root)
+ ->getStructure()
+ );
+ }
+}
+?>
diff --git a/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt b/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt
new file mode 100644
index 0000000..1910281
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt
@@ -0,0 +1 @@
+foo \ No newline at end of file
diff --git a/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt b/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt
new file mode 100644
index 0000000..f6ea049
--- /dev/null
+++ b/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt
@@ -0,0 +1 @@
+foobar \ No newline at end of file
diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md b/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md
index 115e46e..353b6f6 100644
--- a/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md
+++ b/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md
@@ -2,6 +2,12 @@
All notable changes of the PHP_CodeCoverage 2.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
+## [2.2.4] - 2015-10-06
+
+### Fixed
+
+* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `</abbr>` tag
+
## [2.2.3] - 2015-09-14
### Fixed
@@ -42,7 +48,8 @@ All notable changes of the PHP_CodeCoverage 2.2 release series are documented in
* The dedicated driver for HHVM, `PHP_CodeCoverage_Driver_HHVM` has been removed
-[2.2.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.3...2.2.3
+[2.2.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.3...2.2.4
+[2.2.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.2...2.2.3
[2.2.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.1...2.2.2
[2.2.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.0...2.2.1
[2.2.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.1...2.2.0
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php
index aacac88..51aa15e 100644
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php
+++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php
@@ -58,7 +58,7 @@ abstract class PHP_CodeCoverage_Report_HTML_Renderer
*/
public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound)
{
- $version = new SebastianBergmann\Version('2.2.3', dirname(dirname(dirname(dirname(__DIR__)))));
+ $version = new SebastianBergmann\Version('2.2.4', dirname(dirname(dirname(dirname(__DIR__)))));
$this->templatePath = $templatePath;
$this->generator = $generator;
diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php
index a29b7f3..f648097 100644
--- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php
+++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php
@@ -213,7 +213,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R
list($class, $method) = explode('::', $methodName);
$result['method'] .= sprintf(
- ' <tr><td><a href="%s"><abbr title="%s">%s</a></a></td><td class="text-right">%d%%</td></tr>' . "\n",
+ ' <tr><td><a href="%s"><abbr title="%s">%s</abbr></a></td><td class="text-right">%d%%</td></tr>' . "\n",
str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']),
$methodName,
$method,
diff --git a/vendor/phpunit/phpunit/ChangeLog-4.8.md b/vendor/phpunit/phpunit/ChangeLog-4.8.md
index 9752eb7..9fc5845 100644
--- a/vendor/phpunit/phpunit/ChangeLog-4.8.md
+++ b/vendor/phpunit/phpunit/ChangeLog-4.8.md
@@ -2,6 +2,16 @@
All notable changes of the PHPUnit 4.8 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
+## [4.8.11] - 2015-10-07
+
+### Fixed
+
+* Merged [#1885](https://github.com/sebastianbergmann/phpunit/issues/1885): Fixed handling of PHP configuration settings for process isolation
+* Fixed [#1857](https://github.com/sebastianbergmann/phpunit/issues/1857): `@covers` and `@uses` should only take a single word
+* Fixed [#1879](https://github.com/sebastianbergmann/phpunit/issues/1879): `assertEqualXMLStructure()` cannot compare nodes with an ID
+* Fixed [#1898](https://github.com/sebastianbergmann/phpunit/issues/1898): `@covers` and `@uses` cannot be used for namespaced functions
+* Fixed [#1901](https://github.com/sebastianbergmann/phpunit/issues/1901): `--self-update` updates to PHPUnit 5, even on PHP < 5.6
+
## [4.8.10] - 2015-10-01
### Fixed
@@ -75,6 +85,7 @@ New PHAR release due to updated dependencies
* Made the argument check of `assertContains()` and `assertNotContains()` more strict to prevent undefined behavior such as [#1808](https://github.com/sebastianbergmann/phpunit/issues/1808)
* Changed the name of the default group from `__nogroup__` to `default`
+[4.8.11]: https://github.com/sebastianbergmann/phpunit/compare/4.8.10...4.8.11
[4.8.10]: https://github.com/sebastianbergmann/phpunit/compare/4.8.9...4.8.10
[4.8.9]: https://github.com/sebastianbergmann/phpunit/compare/4.8.8...4.8.9
[4.8.8]: https://github.com/sebastianbergmann/phpunit/compare/4.8.7...4.8.8
diff --git a/vendor/phpunit/phpunit/src/Framework/Assert.php b/vendor/phpunit/phpunit/src/Framework/Assert.php
index 948a599..4da7cff 100644
--- a/vendor/phpunit/phpunit/src/Framework/Assert.php
+++ b/vendor/phpunit/phpunit/src/Framework/Assert.php
@@ -1795,8 +1795,13 @@ abstract class PHPUnit_Framework_Assert
*/
public static function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, $checkAttributes = false, $message = '')
{
- $expectedElement = clone $expectedElement;
- $actualElement = clone $actualElement;
+ $tmp = new DOMDocument;
+ $expectedElement = $tmp->importNode($expectedElement, true);
+
+ $tmp = new DOMDocument;
+ $actualElement= $tmp->importNode($actualElement, true);
+
+ unset($tmp);
self::assertEquals(
$expectedElement->tagName,
diff --git a/vendor/phpunit/phpunit/src/Framework/TestCase.php b/vendor/phpunit/phpunit/src/Framework/TestCase.php
index 22f344a..ea65fbc 100644
--- a/vendor/phpunit/phpunit/src/Framework/TestCase.php
+++ b/vendor/phpunit/phpunit/src/Framework/TestCase.php
@@ -670,6 +670,8 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
$includePath = "'." . $includePath . ".'";
$codeCoverageFilter = "'." . $codeCoverageFilter . ".'";
+ $configurationFilePath = (isset($GLOBALS['__PHPUNIT_CONFIGURATION_FILE']) ? $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] : '');
+
$template->setVar(
array(
'composerAutoload' => $composerAutoload,
@@ -690,7 +692,8 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
'isStrictAboutOutputDuringTests' => $isStrictAboutOutputDuringTests,
'isStrictAboutTestSize' => $isStrictAboutTestSize,
'isStrictAboutTodoAnnotatedTests' => $isStrictAboutTodoAnnotatedTests,
- 'codeCoverageFilter' => $codeCoverageFilter
+ 'codeCoverageFilter' => $codeCoverageFilter,
+ 'configurationFilePath' => $configurationFilePath
)
);
diff --git a/vendor/phpunit/phpunit/src/Runner/Version.php b/vendor/phpunit/phpunit/src/Runner/Version.php
index 884dd5b..58e3390 100644
--- a/vendor/phpunit/phpunit/src/Runner/Version.php
+++ b/vendor/phpunit/phpunit/src/Runner/Version.php
@@ -30,7 +30,7 @@ class PHPUnit_Runner_Version
}
if (self::$version === null) {
- $version = new SebastianBergmann\Version('4.8.10', dirname(dirname(__DIR__)));
+ $version = new SebastianBergmann\Version('4.8.11', dirname(dirname(__DIR__)));
self::$version = $version->getVersion();
}
diff --git a/vendor/phpunit/phpunit/src/TextUI/Command.php b/vendor/phpunit/phpunit/src/TextUI/Command.php
index bad0288..6a73409 100644
--- a/vendor/phpunit/phpunit/src/TextUI/Command.php
+++ b/vendor/phpunit/phpunit/src/TextUI/Command.php
@@ -786,10 +786,11 @@ class PHPUnit_TextUI_Command
exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
}
- $remoteFilename = sprintf(
- 'https://phar.phpunit.de/phpunit%s.phar',
- PHPUnit_Runner_Version::getReleaseChannel()
- );
+ if (PHP_VERSION_ID < 50600) {
+ $remoteFilename = sprintf('https://phar.phpunit.de/phpunit-old.phar');
+ } else {
+ $remoteFilename = sprintf('https://phar.phpunit.de/phpunit.phar');
+ }
$tempFilename = tempnam(sys_get_temp_dir(), 'phpunit') . '.phar';
diff --git a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php b/vendor/phpunit/phpunit/src/TextUI/TestRunner.php
index 66df075..94909d9 100644
--- a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php
+++ b/vendor/phpunit/phpunit/src/TextUI/TestRunner.php
@@ -142,6 +142,10 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
*/
public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
{
+ if (isset($arguments['configuration'])) {
+ $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] = $arguments['configuration'];
+ }
+
$this->handleConfiguration($arguments);
$this->processSuiteFilters($suite, $arguments);
diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist
index ed90c9c..e595099 100644
--- a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist
+++ b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist
@@ -70,6 +70,13 @@ function __phpunit_run_isolated_test()
);
}
+$configurationFilePath = '{configurationFilePath}';
+
+if ('' !== $configurationFilePath) {
+ $configuration = PHPUnit_Util_Configuration::getInstance($configurationFilePath);
+ $configuration->handlePHPConfiguration();
+}
+
{constants}
{included_files}
{globals}
diff --git a/vendor/phpunit/phpunit/src/Util/Test.php b/vendor/phpunit/phpunit/src/Util/Test.php
index 0912ce0..583bab9 100644
--- a/vendor/phpunit/phpunit/src/Util/Test.php
+++ b/vendor/phpunit/phpunit/src/Util/Test.php
@@ -147,6 +147,8 @@ class PHPUnit_Util_Test
}
$element = preg_replace('/[\s()]+$/', '', $element);
+ $element = explode(' ', $element);
+ $element = $element[0];
$codeList = array_merge(
$codeList,
@@ -846,7 +848,9 @@ class PHPUnit_Util_Test
{
$codeToCoverList = array();
- if (strpos($element, '::') !== false) {
+ if (strpos($element, '\\') !== false && function_exists($element)) {
+ $codeToCoverList[] = new ReflectionFunction($element);
+ } else if (strpos($element, '::') !== false) {
list($className, $methodName) = explode('::', $element);
if (isset($methodName[0]) && $methodName[0] == '<') {
diff --git a/vendor/phpunit/phpunit/src/Util/XML.php b/vendor/phpunit/phpunit/src/Util/XML.php
index 16c4c0e..552efe2 100644
--- a/vendor/phpunit/phpunit/src/Util/XML.php
+++ b/vendor/phpunit/phpunit/src/Util/XML.php
@@ -100,7 +100,7 @@ class PHPUnit_Util_XML
@chdir(dirname($filename));
}
- $document = new DOMDocument;
+ $document = new DOMDocument;
$document->preserveWhiteSpace = false;
$internal = libxml_use_internal_errors(true);
diff --git a/vendor/phpunit/phpunit/tests/Util/TestTest.php b/vendor/phpunit/phpunit/tests/Util/TestTest.php
index 1ea947b..0eb13fa 100644
--- a/vendor/phpunit/phpunit/tests/Util/TestTest.php
+++ b/vendor/phpunit/phpunit/tests/Util/TestTest.php
@@ -16,6 +16,9 @@ if (!defined('TEST_FILES_PATH')) {
);
}
+require TEST_FILES_PATH . 'CoverageNamespacedFunctionTest.php';
+require TEST_FILES_PATH . 'NamespaceCoveredFunction.php';
+
/**
* @since Class available since Release 3.3.6
*/
@@ -545,6 +548,23 @@ class Util_TestTest extends PHPUnit_Framework_TestCase
);
}
+ /**
+ * @covers PHPUnit_Util_Test::getLinesToBeCovered
+ * @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
+ */
+ public function testNamespacedFunctionCanBeCoveredOrUsed()
+ {
+ $this->assertEquals(
+ array(
+ TEST_FILES_PATH . 'NamespaceCoveredFunction.php' => range(4, 7)
+ ),
+ PHPUnit_Util_Test::getLinesToBeCovered(
+ 'CoverageNamespacedFunctionTest',
+ 'testFunc'
+ )
+ );
+ }
+
public function getLinesToBeCoveredProvider()
{
return array(
diff --git a/vendor/phpunit/phpunit/tests/_files/CoverageNamespacedFunctionTest.php b/vendor/phpunit/phpunit/tests/_files/CoverageNamespacedFunctionTest.php
new file mode 100644
index 0000000..9fc056f
--- /dev/null
+++ b/vendor/phpunit/phpunit/tests/_files/CoverageNamespacedFunctionTest.php
@@ -0,0 +1,11 @@
+<?php
+class CoverageNamespacedFunctionTest extends PHPUnit_Framework_TestCase
+{
+ /**
+ * @covers foo\func()
+ */
+ public function testFunc()
+ {
+ foo\func();
+ }
+}
diff --git a/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredFunction.php b/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredFunction.php
new file mode 100644
index 0000000..afc00d7
--- /dev/null
+++ b/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredFunction.php
@@ -0,0 +1,7 @@
+<?php
+namespace foo;
+
+function func()
+{
+ return true;
+}
diff --git a/vendor/zendframework/zend-hydrator/CHANGELOG.md b/vendor/zendframework/zend-hydrator/CHANGELOG.md
new file mode 100644
index 0000000..6911686
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/CHANGELOG.md
@@ -0,0 +1,39 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 1.0.0 - 2015-09-17
+
+Initial release. This ports all hydrator classes and functionality from
+[zend-stdlib](https://github.com/zendframework/zend-stdlib) to a standalone
+repository. All final keywords are removed, to allow a deprecation cycle in the
+zend-stdlib component.
+
+Please note: the following classes will be marked as `final` for a version 2.0.0
+release to immediately follow 1.0.0:
+
+- `Zend\Hydrator\NamingStrategy\IdentityNamingStrategy`
+- `Zend\Hydrator\NamingStrategy\ArrayMapNamingStrategy`
+- `Zend\Hydrator\NamingStrategy\CompositeNamingStrategy`
+- `Zend\Hydrator\Strategy\ExplodeStrategy`
+- `Zend\Hydrator\Strategy\StrategyChain`
+- `Zend\Hydrator\Strategy\DateTimeFormatterStrategy`
+- `Zend\Hydrator\Strategy\BooleanStrategy`
+
+As such, you should not extend them.
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Nothing.
diff --git a/vendor/zendframework/zend-hydrator/CONTRIBUTING.md b/vendor/zendframework/zend-hydrator/CONTRIBUTING.md
new file mode 100644
index 0000000..ddfff50
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/CONTRIBUTING.md
@@ -0,0 +1,229 @@
+# CONTRIBUTING
+
+## RESOURCES
+
+If you wish to contribute to Zend Framework, please be sure to
+read/subscribe to the following resources:
+
+ - [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
+ - [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
+ - ZF Contributor's mailing list:
+ Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
+ Subscribe: zf-contributors-subscribe@lists.zend.com
+ - ZF Contributor's IRC channel:
+ #zftalk.dev on Freenode.net
+
+If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-hydrator/issues/new).
+
+## Reporting Potential Security Issues
+
+If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
+issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead.
+We will work with you to verify the vulnerability and patch it as soon as possible.
+
+When reporting issues, please provide the following information:
+
+- Component(s) affected
+- A description indicating how to reproduce the issue
+- A summary of the security vulnerability and impact
+
+We request that you contact us via the email address above and give the project
+contributors a chance to resolve the vulnerability and issue a new release prior
+to any public exposure; this helps protect users and provides them with a chance
+to upgrade and/or update in order to protect their applications.
+
+For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
+
+## RUNNING TESTS
+
+> ### Note: testing versions prior to 2.4
+>
+> This component originates with Zend Framework 2. During the lifetime of ZF2,
+> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
+> changes were necessary. However, due to the migration, tests may not run on
+> versions < 2.4. As such, you may need to change the PHPUnit dependency if
+> attempting a fix on such a version.
+
+To run tests:
+
+- Clone the repository:
+
+ ```console
+ $ git clone git@github.com:zendframework/zend-hydrator.git
+ $ cd
+ ```
+
+- Install dependencies via composer:
+
+ ```console
+ $ curl -sS https://getcomposer.org/installer | php --
+ $ ./composer.phar install
+ ```
+
+ If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
+
+- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
+
+ ```console
+ $ ./vendor/bin/phpunit
+ ```
+
+You can turn on conditional tests with the phpunit.xml file.
+To do so:
+
+ - Copy `phpunit.xml.dist` file to `phpunit.xml`
+ - Edit `phpunit.xml` to enable any specific functionality you
+ want to test, as well as to provide test values to utilize.
+
+## Running Coding Standards Checks
+
+This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding
+standards checks, and provides configuration for our selected checks.
+`phpcs` is installed by default via Composer.
+
+To run checks only:
+
+```console
+$ ./vendor/bin/phpcs
+```
+
+`phpcs` also provides a tool that can automatically fix many CS issues,
+`phpcbf`:
+
+```console
+$ ./vendor/bin/phpcbf
+```
+
+If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure
+they pass, and make sure you add and commit the changes after verification.
+
+## Recommended Workflow for Contributions
+
+Your first step is to establish a public repository from which we can
+pull your work into the master repository. We recommend using
+[GitHub](https://github.com), as that is where the component is already hosted.
+
+1. Setup a [GitHub account](http://github.com/), if you haven't yet
+2. Fork the repository (http://github.com/zendframework/zend-hydrator)
+3. Clone the canonical repository locally and enter it.
+
+ ```console
+ $ git clone git://github.com:zendframework/zend-hydrator.git
+ $ cd zend-hydrator
+ ```
+
+4. Add a remote to your fork; substitute your GitHub username in the command
+ below.
+
+ ```console
+ $ git remote add {username} git@github.com:{username}/zend-hydrator.git
+ $ git fetch {username}
+ ```
+
+### Keeping Up-to-Date
+
+Periodically, you should update your fork or personal repository to
+match the canonical ZF repository. Assuming you have setup your local repository
+per the instructions above, you can do the following:
+
+
+```console
+$ git checkout master
+$ git fetch origin
+$ git rebase origin/master
+# OPTIONALLY, to keep your remote up-to-date -
+$ git push {username} master:master
+```
+
+If you're tracking other branches -- for example, the "develop" branch, where
+new feature development occurs -- you'll want to do the same operations for that
+branch; simply substitute "develop" for "master".
+
+### Working on a patch
+
+We recommend you do each new feature or bugfix in a new branch. This simplifies
+the task of code review as well as the task of merging your changes into the
+canonical repository.
+
+A typical workflow will then consist of the following:
+
+1. Create a new local branch based off either your master or develop branch.
+2. Switch to your new local branch. (This step can be combined with the
+ previous step with the use of `git checkout -b`.)
+3. Do some work, commit, repeat as necessary.
+4. Push the local branch to your remote repository.
+5. Send a pull request.
+
+The mechanics of this process are actually quite trivial. Below, we will
+create a branch for fixing an issue in the tracker.
+
+```console
+$ git checkout -b hotfix/9295
+Switched to a new branch 'hotfix/9295'
+```
+
+... do some work ...
+
+
+```console
+$ git commit
+```
+
+... write your log message ...
+
+
+```console
+$ git push {username} hotfix/9295:hotfix/9295
+Counting objects: 38, done.
+Delta compression using up to 2 threads.
+Compression objects: 100% (18/18), done.
+Writing objects: 100% (20/20), 8.19KiB, done.
+Total 20 (delta 12), reused 0 (delta 0)
+To ssh://git@github.com/{username}/zend-hydrator.git
+ b5583aa..4f51698 HEAD -> master
+```
+
+To send a pull request, you have two options.
+
+If using GitHub, you can do the pull request from there. Navigate to
+your repository, select the branch you just created, and then select the
+"Pull Request" button in the upper right. Select the user/organization
+"zendframework" as the recipient.
+
+If using your own repository - or even if using GitHub - you can use `git
+format-patch` to create a patchset for us to apply; in fact, this is
+**recommended** for security-related patches. If you use `format-patch`, please
+send the patches as attachments to:
+
+- zf-devteam@zend.com for patches without security implications
+- zf-security@zend.com for security patches
+
+#### What branch to issue the pull request against?
+
+Which branch should you issue a pull request against?
+
+- For fixes against the stable release, issue the pull request against the
+ "master" branch.
+- For new features, or fixes that introduce new elements to the public API (such
+ as new public methods or properties), issue the pull request against the
+ "develop" branch.
+
+### Branch Cleanup
+
+As you might imagine, if you are a frequent contributor, you'll start to
+get a ton of branches both locally and on your remote.
+
+Once you know that your changes have been accepted to the master
+repository, we suggest doing some cleanup of these branches.
+
+- Local branch cleanup
+
+ ```console
+ $ git branch -d <branchname>
+ ```
+
+- Remote branch removal
+
+ ```console
+ $ git push {username} :<branchname>
+ ```
diff --git a/vendor/zendframework/zend-hydrator/LICENSE.md b/vendor/zendframework/zend-hydrator/LICENSE.md
new file mode 100644
index 0000000..dbb1b49
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/LICENSE.md
@@ -0,0 +1,28 @@
+Copyright (c) 2005-2015, Zend Technologies USA, Inc.
+
+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 Zend Technologies USA, Inc. nor the names of its
+ 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.
diff --git a/vendor/zendframework/zend-hydrator/README.md b/vendor/zendframework/zend-hydrator/README.md
new file mode 100644
index 0000000..7608334
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/README.md
@@ -0,0 +1,11 @@
+# zend-hydrator
+
+[![Build Status](https://secure.travis-ci.org/zendframework/zend-hydrator.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-hydrator)
+[![Coverage Status](https://coveralls.io/repos/zendframework/zend-hydrator/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-hydrator?branch=master)
+
+`Zend\Hydrator` provides utilities for mapping arrays to objects, and vice
+versa, including facilities for filtering which data is mapped as well as
+providing mechanisms for mapping nested structures.
+
+- File issues at https://github.com/zendframework/zend-hydrator/issues
+- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-stdlib
diff --git a/vendor/zendframework/zend-hydrator/composer.json b/vendor/zendframework/zend-hydrator/composer.json
new file mode 100644
index 0000000..21b4afe
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/composer.json
@@ -0,0 +1,47 @@
+{
+ "name": "zendframework/zend-hydrator",
+ "description": " ",
+ "license": "BSD-3-Clause",
+ "keywords": [
+ "zf2",
+ "hydrator"
+ ],
+ "homepage": "https://github.com/zendframework/zend-hydrator",
+ "autoload": {
+ "psr-4": {
+ "Zend\\Hydrator\\": "src/"
+ }
+ },
+ "require": {
+ "php": ">=5.5",
+ "zendframework/zend-stdlib": "^2.5.1"
+ },
+ "require-dev": {
+ "zendframework/zend-eventmanager": "^2.5.1",
+ "zendframework/zend-inputfilter": "^2.5.1",
+ "zendframework/zend-serializer": "^2.5.1",
+ "zendframework/zend-servicemanager": "^2.5.1",
+ "zendframework/zend-filter": "^2.5.1",
+ "phpunit/PHPUnit": "~4.0",
+ "squizlabs/php_codesniffer": "^2.0@dev"
+ },
+ "suggest": {
+ "zendframework/zend-eventmanager": "^2.5.1, to support aggregate hydrator usage",
+ "zendframework/zend-serializer": "^2.5.1, to use the SerializableStrategy",
+ "zendframework/zend-servicemanager": "^2.5.1, to support hydrator plugin manager usage",
+ "zendframework/zend-filter": "^2.5.1, to support naming strategy hydrator usage"
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev",
+ "dev-develop": "1.1-dev"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "ZendTest\\Hydrator\\": "test/"
+ }
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/phpcs.xml b/vendor/zendframework/zend-hydrator/phpcs.xml
new file mode 100644
index 0000000..e994eae
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/phpcs.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<ruleset name="Zend Framework coding standard">
+ <description>Zend Framework coding standard</description>
+
+ <!-- display progress -->
+ <arg value="p"/>
+ <arg name="colors"/>
+
+ <!-- inherit rules from: -->
+ <rule ref="PSR2"/>
+ <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
+ <properties>
+ <property name="ignoreBlankLines" value="false"/>
+ </properties>
+ </rule>
+
+ <!-- Paths to check -->
+ <file>src</file>
+ <file>test</file>
+</ruleset>
diff --git a/vendor/zendframework/zend-hydrator/src/AbstractHydrator.php b/vendor/zendframework/zend-hydrator/src/AbstractHydrator.php
new file mode 100644
index 0000000..6f3f0a9
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/AbstractHydrator.php
@@ -0,0 +1,283 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use ArrayObject;
+
+abstract class AbstractHydrator implements
+ HydratorInterface,
+ StrategyEnabledInterface,
+ FilterEnabledInterface,
+ NamingStrategyEnabledInterface
+{
+ /**
+ * The list with strategies that this hydrator has.
+ *
+ * @var ArrayObject
+ */
+ protected $strategies;
+
+ /**
+ * An instance of NamingStrategy\NamingStrategyInterface
+ *
+ * @var NamingStrategy\NamingStrategyInterface
+ */
+ protected $namingStrategy;
+
+ /**
+ * Composite to filter the methods, that need to be hydrated
+ *
+ * @var Filter\FilterComposite
+ */
+ protected $filterComposite;
+
+ /**
+ * Initializes a new instance of this class.
+ */
+ public function __construct()
+ {
+ $this->strategies = new ArrayObject();
+ $this->filterComposite = new Filter\FilterComposite();
+ }
+
+ /**
+ * Gets the strategy with the given name.
+ *
+ * @param string $name The name of the strategy to get.
+ *
+ * @throws Exception\InvalidArgumentException
+ * @return Strategy\StrategyInterface
+ */
+ public function getStrategy($name)
+ {
+ if (isset($this->strategies[$name])) {
+ return $this->strategies[$name];
+ }
+
+ if (!isset($this->strategies['*'])) {
+ throw new Exception\InvalidArgumentException(sprintf(
+ '%s: no strategy by name of "%s", and no wildcard strategy present',
+ __METHOD__,
+ $name
+ ));
+ }
+
+ return $this->strategies['*'];
+ }
+
+ /**
+ * Checks if the strategy with the given name exists.
+ *
+ * @param string $name The name of the strategy to check for.
+ * @return bool
+ */
+ public function hasStrategy($name)
+ {
+ return array_key_exists($name, $this->strategies)
+ || array_key_exists('*', $this->strategies);
+ }
+
+ /**
+ * Adds the given strategy under the given name.
+ *
+ * @param string $name The name of the strategy to register.
+ * @param Strategy\StrategyInterface $strategy The strategy to register.
+ * @return HydratorInterface
+ */
+ public function addStrategy($name, Strategy\StrategyInterface $strategy)
+ {
+ $this->strategies[$name] = $strategy;
+ return $this;
+ }
+
+ /**
+ * Removes the strategy with the given name.
+ *
+ * @param string $name The name of the strategy to remove.
+ * @return HydratorInterface
+ */
+ public function removeStrategy($name)
+ {
+ unset($this->strategies[$name]);
+ return $this;
+ }
+
+ /**
+ * Converts a value for extraction. If no strategy exists the plain value is returned.
+ *
+ * @param string $name The name of the strategy to use.
+ * @param mixed $value The value that should be converted.
+ * @param mixed $object The object is optionally provided as context.
+ * @return mixed
+ */
+ public function extractValue($name, $value, $object = null)
+ {
+ if ($this->hasStrategy($name)) {
+ $strategy = $this->getStrategy($name);
+ $value = $strategy->extract($value, $object);
+ }
+ return $value;
+ }
+
+ /**
+ * Converts a value for hydration. If no strategy exists the plain value is returned.
+ *
+ * @param string $name The name of the strategy to use.
+ * @param mixed $value The value that should be converted.
+ * @param array $data The whole data is optionally provided as context.
+ * @return mixed
+ */
+ public function hydrateValue($name, $value, $data = null)
+ {
+ if ($this->hasStrategy($name)) {
+ $strategy = $this->getStrategy($name);
+ $value = $strategy->hydrate($value, $data);
+ }
+ return $value;
+ }
+
+ /**
+ * Convert a name for extraction. If no naming strategy exists, the plain value is returned.
+ *
+ * @param string $name The name to convert.
+ * @param null $object The object is optionally provided as context.
+ * @return mixed
+ */
+ public function extractName($name, $object = null)
+ {
+ if ($this->hasNamingStrategy()) {
+ $name = $this->getNamingStrategy()->extract($name, $object);
+ }
+ return $name;
+ }
+
+ /**
+ * Converts a value for hydration. If no naming strategy exists, the plain value is returned.
+ *
+ * @param string $name The name to convert.
+ * @param array $data The whole data is optionally provided as context.
+ * @return mixed
+ */
+ public function hydrateName($name, $data = null)
+ {
+ if ($this->hasNamingStrategy()) {
+ $name = $this->getNamingStrategy()->hydrate($name, $data);
+ }
+ return $name;
+ }
+
+ /**
+ * Get the filter instance
+ *
+ * @return Filter\FilterComposite
+ */
+ public function getFilter()
+ {
+ return $this->filterComposite;
+ }
+
+ /**
+ * Add a new filter to take care of what needs to be hydrated.
+ * To exclude e.g. the method getServiceLocator:
+ *
+ * <code>
+ * $composite->addFilter("servicelocator",
+ * function ($property) {
+ * list($class, $method) = explode('::', $property);
+ * if ($method === 'getServiceLocator') {
+ * return false;
+ * }
+ * return true;
+ * }, FilterComposite::CONDITION_AND
+ * );
+ * </code>
+ *
+ * @param string $name Index in the composite
+ * @param callable|Filter\FilterInterface $filter
+ * @param int $condition
+ * @return Filter\FilterComposite
+ */
+ public function addFilter($name, $filter, $condition = Filter\FilterComposite::CONDITION_OR)
+ {
+ return $this->filterComposite->addFilter($name, $filter, $condition);
+ }
+
+ /**
+ * Check whether a specific filter exists at key $name or not
+ *
+ * @param string $name Index in the composite
+ * @return bool
+ */
+ public function hasFilter($name)
+ {
+ return $this->filterComposite->hasFilter($name);
+ }
+
+ /**
+ * Remove a filter from the composition.
+ * To not extract "has" methods, you simply need to unregister it
+ *
+ * <code>
+ * $filterComposite->removeFilter('has');
+ * </code>
+ *
+ * @param $name
+ * @return Filter\FilterComposite
+ */
+ public function removeFilter($name)
+ {
+ return $this->filterComposite->removeFilter($name);
+ }
+
+ /**
+ * Adds the given naming strategy
+ *
+ * @param NamingStrategy\NamingStrategyInterface $strategy The naming to register.
+ * @return self
+ */
+ public function setNamingStrategy(NamingStrategy\NamingStrategyInterface $strategy)
+ {
+ $this->namingStrategy = $strategy;
+
+ return $this;
+ }
+
+ /**
+ * Gets the naming strategy.
+ *
+ * @return NamingStrategy\NamingStrategyInterface
+ */
+ public function getNamingStrategy()
+ {
+ return $this->namingStrategy;
+ }
+
+ /**
+ * Checks if a naming strategy exists.
+ *
+ * @return bool
+ */
+ public function hasNamingStrategy()
+ {
+ return isset($this->namingStrategy);
+ }
+
+ /**
+ * Removes the naming strategy
+ *
+ * @return self
+ */
+ public function removeNamingStrategy()
+ {
+ $this->namingStrategy = null;
+
+ return $this;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Aggregate/AggregateHydrator.php b/vendor/zendframework/zend-hydrator/src/Aggregate/AggregateHydrator.php
new file mode 100644
index 0000000..fa384ad
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Aggregate/AggregateHydrator.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Aggregate;
+
+use Zend\EventManager\EventManager;
+use Zend\EventManager\EventManagerAwareInterface;
+use Zend\EventManager\EventManagerInterface;
+use Zend\Hydrator\HydratorInterface;
+
+/**
+ * Aggregate hydrator that composes multiple hydrators via events
+ */
+class AggregateHydrator implements HydratorInterface, EventManagerAwareInterface
+{
+ const DEFAULT_PRIORITY = 1;
+
+ /**
+ * @var EventManagerInterface|null
+ */
+ protected $eventManager;
+
+ /**
+ * Attaches the provided hydrator to the list of hydrators to be used while hydrating/extracting data
+ *
+ * @param HydratorInterface $hydrator
+ * @param int $priority
+ */
+ public function add(HydratorInterface $hydrator, $priority = self::DEFAULT_PRIORITY)
+ {
+ $this->getEventManager()->attachAggregate(new HydratorListener($hydrator), $priority);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function extract($object)
+ {
+ $event = new ExtractEvent($this, $object);
+
+ $this->getEventManager()->trigger($event);
+
+ return $event->getExtractedData();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function hydrate(array $data, $object)
+ {
+ $event = new HydrateEvent($this, $object, $data);
+
+ $this->getEventManager()->trigger($event);
+
+ return $event->getHydratedObject();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function setEventManager(EventManagerInterface $eventManager)
+ {
+ $eventManager->setIdentifiers([__CLASS__, get_class($this)]);
+
+ $this->eventManager = $eventManager;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getEventManager()
+ {
+ if (null === $this->eventManager) {
+ $this->setEventManager(new EventManager());
+ }
+
+ return $this->eventManager;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Aggregate/ExtractEvent.php b/vendor/zendframework/zend-hydrator/src/Aggregate/ExtractEvent.php
new file mode 100644
index 0000000..1395917
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Aggregate/ExtractEvent.php
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Aggregate;
+
+use Zend\EventManager\Event;
+
+/**
+ * Event triggered when the {@see AggregateHydrator} extracts
+ * data from an object
+ */
+class ExtractEvent extends Event
+{
+ const EVENT_EXTRACT = 'extract';
+
+ /**
+ * {@inheritDoc}
+ */
+ protected $name = self::EVENT_EXTRACT;
+
+ /**
+ * @var object
+ */
+ protected $extractionObject;
+
+ /**
+ * @var array
+ */
+ protected $extractedData = [];
+
+ /**
+ * @param object $target
+ * @param object $extractionObject
+ */
+ public function __construct($target, $extractionObject)
+ {
+ $this->target = $target;
+ $this->extractionObject = $extractionObject;
+ }
+
+ /**
+ * Retrieves the object from which data is extracted
+ *
+ * @return object
+ */
+ public function getExtractionObject()
+ {
+ return $this->extractionObject;
+ }
+
+ /**
+ * @param object $extractionObject
+ *
+ * @return void
+ */
+ public function setExtractionObject($extractionObject)
+ {
+ $this->extractionObject = $extractionObject;
+ }
+
+ /**
+ * Retrieves the data that has been extracted
+ *
+ * @return array
+ */
+ public function getExtractedData()
+ {
+ return $this->extractedData;
+ }
+
+ /**
+ * @param array $extractedData
+ *
+ * @return void
+ */
+ public function setExtractedData(array $extractedData)
+ {
+ $this->extractedData = $extractedData;
+ }
+
+ /**
+ * Merge provided data with the extracted data
+ *
+ * @param array $additionalData
+ *
+ * @return void
+ */
+ public function mergeExtractedData(array $additionalData)
+ {
+ $this->extractedData = array_merge($this->extractedData, $additionalData);
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Aggregate/HydrateEvent.php b/vendor/zendframework/zend-hydrator/src/Aggregate/HydrateEvent.php
new file mode 100644
index 0000000..7865964
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Aggregate/HydrateEvent.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Aggregate;
+
+use Zend\EventManager\Event;
+
+/**
+ * Event triggered when the {@see AggregateHydrator} hydrates
+ * data into an object
+ */
+class HydrateEvent extends Event
+{
+ const EVENT_HYDRATE = 'hydrate';
+
+ /**
+ * {@inheritDoc}
+ */
+ protected $name = self::EVENT_HYDRATE;
+
+ /**
+ * @var object
+ */
+ protected $hydratedObject;
+
+ /**
+ * @var array
+ */
+ protected $hydrationData;
+
+ /**
+ * @param object $target
+ * @param object $hydratedObject
+ * @param array $hydrationData
+ */
+ public function __construct($target, $hydratedObject, array $hydrationData)
+ {
+ $this->target = $target;
+ $this->hydratedObject = $hydratedObject;
+ $this->hydrationData = $hydrationData;
+ }
+
+ /**
+ * Retrieves the object that is being hydrated
+ *
+ * @return object
+ */
+ public function getHydratedObject()
+ {
+ return $this->hydratedObject;
+ }
+
+ /**
+ * @param object $hydratedObject
+ */
+ public function setHydratedObject($hydratedObject)
+ {
+ $this->hydratedObject = $hydratedObject;
+ }
+
+ /**
+ * Retrieves the data that is being used for hydration
+ *
+ * @return array
+ */
+ public function getHydrationData()
+ {
+ return $this->hydrationData;
+ }
+
+ /**
+ * @param array $hydrationData
+ */
+ public function setHydrationData(array $hydrationData)
+ {
+ $this->hydrationData = $hydrationData;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Aggregate/HydratorListener.php b/vendor/zendframework/zend-hydrator/src/Aggregate/HydratorListener.php
new file mode 100644
index 0000000..c8260a4
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Aggregate/HydratorListener.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Aggregate;
+
+use Zend\EventManager\AbstractListenerAggregate;
+use Zend\EventManager\EventManagerInterface;
+use Zend\Hydrator\HydratorInterface;
+
+/**
+ * Aggregate listener wrapping around a hydrator.
+ *
+ * Listens to {@see HydrateEvent::EVENT_HYDRATE} and {@see ExtractEvent::EVENT_EXTRACT}
+ */
+class HydratorListener extends AbstractListenerAggregate
+{
+ /**
+ * @var HydratorInterface
+ */
+ protected $hydrator;
+
+ /**
+ * @param HydratorInterface $hydrator
+ */
+ public function __construct(HydratorInterface $hydrator)
+ {
+ $this->hydrator = $hydrator;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function attach(EventManagerInterface $events, $priority = 1)
+ {
+ $this->listeners[] = $events->attach(HydrateEvent::EVENT_HYDRATE, [$this, 'onHydrate'], $priority);
+ $this->listeners[] = $events->attach(ExtractEvent::EVENT_EXTRACT, [$this, 'onExtract'], $priority);
+ }
+
+ /**
+ * Callback to be used when {@see HydrateEvent::EVENT_HYDRATE} is triggered
+ *
+ * @param HydrateEvent $event
+ * @return object
+ * @internal
+ */
+ public function onHydrate(HydrateEvent $event)
+ {
+ $object = $this->hydrator->hydrate($event->getHydrationData(), $event->getHydratedObject());
+ $event->setHydratedObject($object);
+ return $object;
+ }
+
+ /**
+ * Callback to be used when {@see ExtractEvent::EVENT_EXTRACT} is triggered
+ *
+ * @param ExtractEvent $event
+ * @return array
+ * @internal
+ */
+ public function onExtract(ExtractEvent $event)
+ {
+ $data = $this->hydrator->extract($event->getExtractionObject());
+ $event->mergeExtractedData($data);
+ return $data;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/ArraySerializable.php b/vendor/zendframework/zend-hydrator/src/ArraySerializable.php
new file mode 100644
index 0000000..24edee5
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/ArraySerializable.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+class ArraySerializable extends AbstractHydrator
+{
+ /**
+ * Extract values from the provided object
+ *
+ * Extracts values via the object's getArrayCopy() method.
+ *
+ * @param object $object
+ * @return array
+ * @throws Exception\BadMethodCallException for an $object not implementing getArrayCopy()
+ */
+ public function extract($object)
+ {
+ if (! is_callable([$object, 'getArrayCopy'])) {
+ throw new Exception\BadMethodCallException(
+ sprintf('%s expects the provided object to implement getArrayCopy()', __METHOD__)
+ );
+ }
+
+ $data = $object->getArrayCopy();
+ $filter = $this->getFilter();
+
+ foreach ($data as $name => $value) {
+ if (!$filter->filter($name)) {
+ unset($data[$name]);
+ continue;
+ }
+ $extractedName = $this->extractName($name, $object);
+ // replace the original key with extracted, if differ
+ if ($extractedName !== $name) {
+ unset($data[$name]);
+ $name = $extractedName;
+ }
+ $data[$name] = $this->extractValue($name, $value, $object);
+ }
+
+ return $data;
+ }
+
+ /**
+ * Hydrate an object
+ *
+ * Hydrates an object by passing $data to either its exchangeArray() or
+ * populate() method.
+ *
+ * @param array $data
+ * @param object $object
+ * @return object
+ * @throws Exception\BadMethodCallException for an $object not implementing exchangeArray() or populate()
+ */
+ public function hydrate(array $data, $object)
+ {
+ $replacement = [];
+ foreach ($data as $key => $value) {
+ $name = $this->hydrateName($key, $data);
+ $replacement[$name] = $this->hydrateValue($name, $value, $data);
+ }
+
+ if (is_callable([$object, 'exchangeArray'])) {
+ $object->exchangeArray($replacement);
+ } elseif (is_callable([$object, 'populate'])) {
+ $object->populate($replacement);
+ } else {
+ throw new Exception\BadMethodCallException(
+ sprintf('%s expects the provided object to implement exchangeArray() or populate()', __METHOD__)
+ );
+ }
+ return $object;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/ClassMethods.php b/vendor/zendframework/zend-hydrator/src/ClassMethods.php
new file mode 100644
index 0000000..80cce84
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/ClassMethods.php
@@ -0,0 +1,268 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Traversable;
+use Zend\Stdlib\ArrayUtils;
+
+class ClassMethods extends AbstractHydrator implements HydratorOptionsInterface
+{
+ /**
+ * Holds the names of the methods used for hydration, indexed by class::property name,
+ * false if the hydration method is not callable/usable for hydration purposes
+ *
+ * @var string[]|bool[]
+ */
+ private $hydrationMethodsCache = [];
+
+ /**
+ * A map of extraction methods to property name to be used during extraction, indexed
+ * by class name and method name
+ *
+ * @var string[][]
+ */
+ private $extractionMethodsCache = [];
+
+ /**
+ * Flag defining whether array keys are underscore-separated (true) or camel case (false)
+ *
+ * @var bool
+ */
+ protected $underscoreSeparatedKeys = true;
+
+ /**
+ * @var Filter\FilterInterface
+ */
+ private $callableMethodFilter;
+
+ /**
+ * Define if extract values will use camel case or name with underscore
+ * @param bool|array $underscoreSeparatedKeys
+ */
+ public function __construct($underscoreSeparatedKeys = true)
+ {
+ parent::__construct();
+ $this->setUnderscoreSeparatedKeys($underscoreSeparatedKeys);
+
+ $this->callableMethodFilter = new Filter\OptionalParametersFilter();
+
+ $this->filterComposite->addFilter('is', new Filter\IsFilter());
+ $this->filterComposite->addFilter('has', new Filter\HasFilter());
+ $this->filterComposite->addFilter('get', new Filter\GetFilter());
+ $this->filterComposite->addFilter(
+ 'parameter',
+ new Filter\OptionalParametersFilter(),
+ Filter\FilterComposite::CONDITION_AND
+ );
+ }
+
+ /**
+ * @param array|Traversable $options
+ * @return ClassMethods
+ * @throws Exception\InvalidArgumentException
+ */
+ public function setOptions($options)
+ {
+ if ($options instanceof Traversable) {
+ $options = ArrayUtils::iteratorToArray($options);
+ } elseif (!is_array($options)) {
+ throw new Exception\InvalidArgumentException(
+ 'The options parameter must be an array or a Traversable'
+ );
+ }
+ if (isset($options['underscoreSeparatedKeys'])) {
+ $this->setUnderscoreSeparatedKeys($options['underscoreSeparatedKeys']);
+ }
+
+ return $this;
+ }
+
+ /**
+ * @param bool $underscoreSeparatedKeys
+ * @return ClassMethods
+ */
+ public function setUnderscoreSeparatedKeys($underscoreSeparatedKeys)
+ {
+ $this->underscoreSeparatedKeys = (bool) $underscoreSeparatedKeys;
+
+ if ($this->underscoreSeparatedKeys) {
+ $this->setNamingStrategy(new NamingStrategy\UnderscoreNamingStrategy);
+ } elseif ($this->getNamingStrategy() instanceof NamingStrategy\UnderscoreNamingStrategy) {
+ $this->removeNamingStrategy();
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function getUnderscoreSeparatedKeys()
+ {
+ return $this->underscoreSeparatedKeys;
+ }
+
+ /**
+ * Extract values from an object with class methods
+ *
+ * Extracts the getter/setter of the given $object.
+ *
+ * @param object $object
+ * @return array
+ * @throws Exception\BadMethodCallException for a non-object $object
+ */
+ public function extract($object)
+ {
+ if (!is_object($object)) {
+ throw new Exception\BadMethodCallException(sprintf(
+ '%s expects the provided $object to be a PHP object)',
+ __METHOD__
+ ));
+ }
+
+ $objectClass = get_class($object);
+
+ // reset the hydrator's hydrator's cache for this object, as the filter may be per-instance
+ if ($object instanceof Filter\FilterProviderInterface) {
+ $this->extractionMethodsCache[$objectClass] = null;
+ }
+
+ // pass 1 - finding out which properties can be extracted, with which methods (populate hydration cache)
+ if (! isset($this->extractionMethodsCache[$objectClass])) {
+ $this->extractionMethodsCache[$objectClass] = [];
+ $filter = $this->filterComposite;
+ $methods = get_class_methods($object);
+
+ if ($object instanceof Filter\FilterProviderInterface) {
+ $filter = new Filter\FilterComposite(
+ [$object->getFilter()],
+ [new Filter\MethodMatchFilter('getFilter')]
+ );
+ }
+
+ foreach ($methods as $method) {
+ $methodFqn = $objectClass . '::' . $method;
+
+ if (! ($filter->filter($methodFqn) && $this->callableMethodFilter->filter($methodFqn))) {
+ continue;
+ }
+
+ $attribute = $method;
+
+ if (strpos($method, 'get') === 0) {
+ $attribute = substr($method, 3);
+ if (!property_exists($object, $attribute)) {
+ $attribute = lcfirst($attribute);
+ }
+ }
+
+ $this->extractionMethodsCache[$objectClass][$method] = $attribute;
+ }
+ }
+
+ $values = [];
+
+ // pass 2 - actually extract data
+ foreach ($this->extractionMethodsCache[$objectClass] as $methodName => $attributeName) {
+ $realAttributeName = $this->extractName($attributeName, $object);
+ $values[$realAttributeName] = $this->extractValue($realAttributeName, $object->$methodName(), $object);
+ }
+
+ return $values;
+ }
+
+ /**
+ * Hydrate an object by populating getter/setter methods
+ *
+ * Hydrates an object by getter/setter methods of the object.
+ *
+ * @param array $data
+ * @param object $object
+ * @return object
+ * @throws Exception\BadMethodCallException for a non-object $object
+ */
+ public function hydrate(array $data, $object)
+ {
+ if (!is_object($object)) {
+ throw new Exception\BadMethodCallException(sprintf(
+ '%s expects the provided $object to be a PHP object)',
+ __METHOD__
+ ));
+ }
+
+ $objectClass = get_class($object);
+
+ foreach ($data as $property => $value) {
+ $propertyFqn = $objectClass . '::$' . $property;
+
+ if (! isset($this->hydrationMethodsCache[$propertyFqn])) {
+ $setterName = 'set' . ucfirst($this->hydrateName($property, $data));
+
+ $this->hydrationMethodsCache[$propertyFqn] = is_callable([$object, $setterName])
+ ? $setterName
+ : false;
+ }
+
+ if ($this->hydrationMethodsCache[$propertyFqn]) {
+ $object->{$this->hydrationMethodsCache[$propertyFqn]}($this->hydrateValue($property, $value, $data));
+ }
+ }
+
+ return $object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function addFilter($name, $filter, $condition = Filter\FilterComposite::CONDITION_OR)
+ {
+ $this->resetCaches();
+
+ return parent::addFilter($name, $filter, $condition);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function removeFilter($name)
+ {
+ $this->resetCaches();
+
+ return parent::removeFilter($name);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function setNamingStrategy(NamingStrategy\NamingStrategyInterface $strategy)
+ {
+ $this->resetCaches();
+
+ return parent::setNamingStrategy($strategy);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function removeNamingStrategy()
+ {
+ $this->resetCaches();
+
+ return parent::removeNamingStrategy();
+ }
+
+ /**
+ * Reset all local hydration/extraction caches
+ */
+ private function resetCaches()
+ {
+ $this->hydrationMethodsCache = $this->extractionMethodsCache = [];
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/DelegatingHydrator.php b/vendor/zendframework/zend-hydrator/src/DelegatingHydrator.php
new file mode 100644
index 0000000..a6f3f94
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/DelegatingHydrator.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class DelegatingHydrator implements HydratorInterface
+{
+ /**
+ * @var ServiceLocatorInterface
+ */
+ protected $hydrators;
+
+ /**
+ * Constructor
+ *
+ * @param ServiceLocatorInterface $hydrators
+ */
+ public function __construct(ServiceLocatorInterface $hydrators)
+ {
+ $this->hydrators = $hydrators;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hydrate(array $data, $object)
+ {
+ return $this->getHydrator($object)->hydrate($data, $object);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function extract($object)
+ {
+ return $this->getHydrator($object)->extract($object);
+ }
+
+ /**
+ * Gets hydrator of an object
+ *
+ * @param object $object
+ * @return HydratorInterface
+ */
+ protected function getHydrator($object)
+ {
+ return $this->hydrators->get(get_class($object));
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/DelegatingHydratorFactory.php b/vendor/zendframework/zend-hydrator/src/DelegatingHydratorFactory.php
new file mode 100644
index 0000000..89f2841
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/DelegatingHydratorFactory.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Zend\ServiceManager\FactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class DelegatingHydratorFactory implements FactoryInterface
+{
+ /**
+ * Creates DelegatingHydrator
+ *
+ * @param ServiceLocatorInterface $serviceLocator
+ * @return DelegatingHydrator
+ */
+ public function createService(ServiceLocatorInterface $serviceLocator)
+ {
+ // Assume that this factory is registered with the HydratorManager,
+ // and just pass it directly on.
+ return new DelegatingHydrator($serviceLocator);
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Exception/BadMethodCallException.php b/vendor/zendframework/zend-hydrator/src/Exception/BadMethodCallException.php
new file mode 100644
index 0000000..a8503e2
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Exception/BadMethodCallException.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Bad method call exception
+ */
+class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Exception/DomainException.php b/vendor/zendframework/zend-hydrator/src/Exception/DomainException.php
new file mode 100644
index 0000000..40baf4f
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Exception/DomainException.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Domain exception
+ */
+class DomainException extends \DomainException implements ExceptionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Exception/ExceptionInterface.php b/vendor/zendframework/zend-hydrator/src/Exception/ExceptionInterface.php
new file mode 100644
index 0000000..888c6a0
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Exception/ExceptionInterface.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Exception marker interface
+ */
+interface ExceptionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Exception/ExtensionNotLoadedException.php b/vendor/zendframework/zend-hydrator/src/Exception/ExtensionNotLoadedException.php
new file mode 100644
index 0000000..ff5fd8e
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Exception/ExtensionNotLoadedException.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Extension not loaded exception
+ */
+class ExtensionNotLoadedException extends RuntimeException
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Exception/InvalidArgumentException.php b/vendor/zendframework/zend-hydrator/src/Exception/InvalidArgumentException.php
new file mode 100644
index 0000000..56c2d14
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Exception/InvalidArgumentException.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Invalid Argument Exception
+ */
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Exception/InvalidCallbackException.php b/vendor/zendframework/zend-hydrator/src/Exception/InvalidCallbackException.php
new file mode 100644
index 0000000..263e9fb
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Exception/InvalidCallbackException.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Invalid callback exception
+ */
+class InvalidCallbackException extends DomainException implements ExceptionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Exception/LogicException.php b/vendor/zendframework/zend-hydrator/src/Exception/LogicException.php
new file mode 100644
index 0000000..89ff89c
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Exception/LogicException.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Logic exception
+ */
+class LogicException extends \LogicException implements ExceptionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Exception/RuntimeException.php b/vendor/zendframework/zend-hydrator/src/Exception/RuntimeException.php
new file mode 100644
index 0000000..766ece2
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Exception/RuntimeException.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Runtime exception
+ */
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/ExtractionInterface.php b/vendor/zendframework/zend-hydrator/src/ExtractionInterface.php
new file mode 100644
index 0000000..6b3c07f
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/ExtractionInterface.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface ExtractionInterface
+{
+ /**
+ * Extract values from an object
+ *
+ * @param object $object
+ * @return array
+ */
+ public function extract($object);
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Filter/FilterComposite.php b/vendor/zendframework/zend-hydrator/src/Filter/FilterComposite.php
new file mode 100644
index 0000000..6790713
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Filter/FilterComposite.php
@@ -0,0 +1,198 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+use ArrayObject;
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+class FilterComposite implements FilterInterface
+{
+ /**
+ * @var ArrayObject
+ */
+ protected $orFilter;
+
+ /**
+ * @var ArrayObject
+ */
+ protected $andFilter;
+
+ /**
+ * Constant to add with "or" conditition
+ */
+ const CONDITION_OR = 1;
+
+ /**
+ * Constant to add with "and" conditition
+ */
+ const CONDITION_AND = 2;
+
+ /**
+ * Define default Filter
+ *
+ * @param array $orFilter
+ * @param array $andFilter
+ * @throws InvalidArgumentException
+ */
+ public function __construct($orFilter = [], $andFilter = [])
+ {
+ array_walk(
+ $orFilter,
+ function ($value, $key) {
+ if (!is_callable($value) && !$value instanceof FilterInterface) {
+ throw new InvalidArgumentException(
+ 'The value of ' . $key . ' should be either a callable or ' .
+ 'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
+ );
+ }
+ }
+ );
+
+ array_walk(
+ $andFilter,
+ function ($value, $key) {
+ if (!is_callable($value) && !$value instanceof FilterInterface) {
+ throw new InvalidArgumentException(
+ 'The value of ' . $key . ' should be either a callable or ' .
+ 'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
+ );
+ }
+ }
+ );
+
+ $this->orFilter = new ArrayObject($orFilter);
+ $this->andFilter = new ArrayObject($andFilter);
+ }
+
+ /**
+ * Add a filter to the composite. Has to be indexed with $name in
+ * order to identify a specific filter.
+ *
+ * This example will exclude all methods from the hydration, that starts with 'getService'
+ * <code>
+ * $composite->addFilter('exclude',
+ * function ($method) {
+ * if (preg_match('/^getService/', $method) {
+ * return false;
+ * }
+ * return true;
+ * }, FilterComposite::CONDITION_AND
+ * );
+ * </code>
+ *
+ * @param string $name
+ * @param callable|FilterInterface $filter
+ * @param int $condition Can be either
+ * FilterComposite::CONDITION_OR or FilterComposite::CONDITION_AND
+ * @throws InvalidArgumentException
+ * @return FilterComposite
+ */
+ public function addFilter($name, $filter, $condition = self::CONDITION_OR)
+ {
+ if (!is_callable($filter) && !($filter instanceof FilterInterface)) {
+ throw new InvalidArgumentException(
+ 'The value of ' . $name . ' should be either a callable or ' .
+ 'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
+ );
+ }
+
+ if ($condition === self::CONDITION_OR) {
+ $this->orFilter[$name] = $filter;
+ } elseif ($condition === self::CONDITION_AND) {
+ $this->andFilter[$name] = $filter;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Remove a filter from the composition
+ *
+ * @param $name string Identifier for the filter
+ * @return FilterComposite
+ */
+ public function removeFilter($name)
+ {
+ if (isset($this->orFilter[$name])) {
+ unset($this->orFilter[$name]);
+ }
+
+ if (isset($this->andFilter[$name])) {
+ unset($this->andFilter[$name]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Check if $name has a filter registered
+ *
+ * @param $name string Identifier for the filter
+ * @return bool
+ */
+ public function hasFilter($name)
+ {
+ return isset($this->orFilter[$name]) || isset($this->andFilter[$name]);
+ }
+
+ /**
+ * Filter the composite based on the AND and OR condition
+ * Will return true if one from the "or conditions" and all from
+ * the "and condition" returns true. Otherwise false
+ *
+ * @param $property string Parameter will be e.g. Parent\Namespace\Class::method
+ * @return bool
+ */
+ public function filter($property)
+ {
+ $andCount = count($this->andFilter);
+ $orCount = count($this->orFilter);
+ // return true if no filters are registered
+ if ($orCount === 0 && $andCount === 0) {
+ return true;
+ } elseif ($orCount === 0 && $andCount !== 0) {
+ $returnValue = true;
+ } else {
+ $returnValue = false;
+ }
+
+ // Check if 1 from the or filters return true
+ foreach ($this->orFilter as $filter) {
+ if (is_callable($filter)) {
+ if ($filter($property) === true) {
+ $returnValue = true;
+ break;
+ }
+ continue;
+ } else {
+ if ($filter->filter($property) === true) {
+ $returnValue = true;
+ break;
+ }
+ }
+ }
+
+ // Check if all of the and condition return true
+ foreach ($this->andFilter as $filter) {
+ if (is_callable($filter)) {
+ if ($filter($property) === false) {
+ return false;
+ }
+ continue;
+ } else {
+ if ($filter->filter($property) === false) {
+ return false;
+ }
+ }
+ }
+
+ return $returnValue;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Filter/FilterInterface.php b/vendor/zendframework/zend-hydrator/src/Filter/FilterInterface.php
new file mode 100644
index 0000000..fb49918
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Filter/FilterInterface.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+interface FilterInterface
+{
+ /**
+ * Should return true, if the given filter
+ * does not match
+ *
+ * @param string $property The name of the property
+ * @return bool
+ */
+ public function filter($property);
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Filter/FilterProviderInterface.php b/vendor/zendframework/zend-hydrator/src/Filter/FilterProviderInterface.php
new file mode 100644
index 0000000..2826c33
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Filter/FilterProviderInterface.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+interface FilterProviderInterface
+{
+ /**
+ * Provides a filter for hydration
+ *
+ * @return FilterInterface
+ */
+ public function getFilter();
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Filter/GetFilter.php b/vendor/zendframework/zend-hydrator/src/Filter/GetFilter.php
new file mode 100644
index 0000000..220a1b5
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Filter/GetFilter.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+class GetFilter implements FilterInterface
+{
+ public function filter($property)
+ {
+ $pos = strpos($property, '::');
+ if ($pos !== false) {
+ $pos += 2;
+ } else {
+ $pos = 0;
+ }
+
+ if (substr($property, $pos, 3) === 'get') {
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Filter/HasFilter.php b/vendor/zendframework/zend-hydrator/src/Filter/HasFilter.php
new file mode 100644
index 0000000..d1ba4f9
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Filter/HasFilter.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+class HasFilter implements FilterInterface
+{
+ public function filter($property)
+ {
+ $pos = strpos($property, '::');
+ if ($pos !== false) {
+ $pos += 2;
+ } else {
+ $pos = 0;
+ }
+
+ if (substr($property, $pos, 3) === 'has') {
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Filter/IsFilter.php b/vendor/zendframework/zend-hydrator/src/Filter/IsFilter.php
new file mode 100644
index 0000000..b74fcd7
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Filter/IsFilter.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+class IsFilter implements FilterInterface
+{
+ public function filter($property)
+ {
+ $pos = strpos($property, '::');
+ if ($pos !== false) {
+ $pos += 2;
+ } else {
+ $pos = 0;
+ }
+
+ if (substr($property, $pos, 2) === 'is') {
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php b/vendor/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php
new file mode 100644
index 0000000..865b578
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+class MethodMatchFilter implements FilterInterface
+{
+ /**
+ * The method to exclude
+ * @var string
+ */
+ protected $method = null;
+
+ /**
+ * Either an exclude or an include
+ * @var bool
+ */
+ protected $exclude = null;
+
+ /**
+ * @param string $method The method to exclude or include
+ * @param bool $exclude If the method should be excluded
+ */
+ public function __construct($method, $exclude = true)
+ {
+ $this->method = $method;
+ $this->exclude = $exclude;
+ }
+
+ public function filter($property)
+ {
+ $pos = strpos($property, '::');
+ if ($pos !== false) {
+ $pos += 2;
+ } else {
+ $pos = 0;
+ }
+ if (substr($property, $pos) === $this->method) {
+ return !$this->exclude;
+ }
+ return $this->exclude;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Filter/NumberOfParameterFilter.php b/vendor/zendframework/zend-hydrator/src/Filter/NumberOfParameterFilter.php
new file mode 100644
index 0000000..abd8ee6
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Filter/NumberOfParameterFilter.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+use ReflectionException;
+use ReflectionMethod;
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+class NumberOfParameterFilter implements FilterInterface
+{
+ /**
+ * The number of parameters beeing accepted
+ * @var int
+ */
+ protected $numberOfParameters = null;
+
+ /**
+ * @param int $numberOfParameters Number of accepted parameters
+ */
+ public function __construct($numberOfParameters = 0)
+ {
+ $this->numberOfParameters = (int) $numberOfParameters;
+ }
+
+ /**
+ * @param string $property the name of the property
+ * @return bool
+ * @throws InvalidArgumentException
+ */
+ public function filter($property)
+ {
+ try {
+ $reflectionMethod = new ReflectionMethod($property);
+ } catch (ReflectionException $exception) {
+ throw new InvalidArgumentException(
+ "Method $property doesn't exist"
+ );
+ }
+
+ return $reflectionMethod->getNumberOfParameters() === $this->numberOfParameters;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Filter/OptionalParametersFilter.php b/vendor/zendframework/zend-hydrator/src/Filter/OptionalParametersFilter.php
new file mode 100644
index 0000000..25775d7
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Filter/OptionalParametersFilter.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+use ReflectionException;
+use ReflectionMethod;
+use ReflectionParameter;
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+/**
+ * Filter that includes methods which have no parameters or only optional parameters
+ */
+class OptionalParametersFilter implements FilterInterface
+{
+ /**
+ * Map of methods already analyzed
+ * by {@see OptionalParametersFilter::filter()},
+ * cached for performance reasons
+ *
+ * @var bool[]
+ */
+ protected static $propertiesCache = [];
+
+ /**
+ * {@inheritDoc}
+ */
+ public function filter($property)
+ {
+ if (isset(static::$propertiesCache[$property])) {
+ return static::$propertiesCache[$property];
+ }
+
+ try {
+ $reflectionMethod = new ReflectionMethod($property);
+ } catch (ReflectionException $exception) {
+ throw new InvalidArgumentException(sprintf('Method %s doesn\'t exist', $property));
+ }
+
+ $mandatoryParameters = array_filter(
+ $reflectionMethod->getParameters(),
+ function (ReflectionParameter $parameter) {
+ return ! $parameter->isOptional();
+ }
+ );
+
+ return static::$propertiesCache[$property] = empty($mandatoryParameters);
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/FilterEnabledInterface.php b/vendor/zendframework/zend-hydrator/src/FilterEnabledInterface.php
new file mode 100644
index 0000000..f95f8b4
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/FilterEnabledInterface.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface FilterEnabledInterface extends Filter\FilterProviderInterface
+{
+ /**
+ * Add a new filter to take care of what needs to be hydrated.
+ * To exclude e.g. the method getServiceLocator:
+ *
+ * <code>
+ * $composite->addFilter(
+ * "servicelocator",
+ * function ($property) {
+ * list($class, $method) = explode('::', $property);
+ * if ($method === 'getServiceLocator') {
+ * return false;
+ * }
+ * return true;
+ * },
+ * FilterComposite::CONDITION_AND
+ * );
+ * </code>
+ *
+ * @param string $name Index in the composite
+ * @param callable|Filter\FilterInterface $filter
+ * @param int $condition
+ * @return Filter\FilterComposite
+ */
+ public function addFilter($name, $filter, $condition = Filter\FilterComposite::CONDITION_OR);
+
+ /**
+ * Check whether a specific filter exists at key $name or not
+ *
+ * @param string $name Index in the composite
+ * @return bool
+ */
+ public function hasFilter($name);
+
+ /**
+ * Remove a filter from the composition.
+ * To not extract "has" methods, you simply need to unregister it
+ *
+ * <code>
+ * $filterComposite->removeFilter('has');
+ * </code>
+ *
+ * @param $name
+ * @return Filter\FilterComposite
+ */
+ public function removeFilter($name);
+}
diff --git a/vendor/zendframework/zend-hydrator/src/HydrationInterface.php b/vendor/zendframework/zend-hydrator/src/HydrationInterface.php
new file mode 100644
index 0000000..ca28983
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/HydrationInterface.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface HydrationInterface
+{
+ /**
+ * Hydrate $object with the provided $data.
+ *
+ * @param array $data
+ * @param object $object
+ * @return object
+ */
+ public function hydrate(array $data, $object);
+}
diff --git a/vendor/zendframework/zend-hydrator/src/HydratorAwareInterface.php b/vendor/zendframework/zend-hydrator/src/HydratorAwareInterface.php
new file mode 100644
index 0000000..8c89bc6
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/HydratorAwareInterface.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface HydratorAwareInterface
+{
+ /**
+ * Set hydrator
+ *
+ * @param HydratorInterface $hydrator
+ * @return HydratorAwareInterface
+ */
+ public function setHydrator(HydratorInterface $hydrator);
+
+ /**
+ * Retrieve hydrator
+ *
+ * @return HydratorInterface
+ */
+ public function getHydrator();
+}
diff --git a/vendor/zendframework/zend-hydrator/src/HydratorAwareTrait.php b/vendor/zendframework/zend-hydrator/src/HydratorAwareTrait.php
new file mode 100644
index 0000000..76c1989
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/HydratorAwareTrait.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+trait HydratorAwareTrait
+{
+ /**
+ * Hydrator instance
+ *
+ * @var HydratorInterface
+ * @access protected
+ */
+ protected $hydrator = null;
+
+ /**
+ * Set hydrator
+ *
+ * @param HydratorInterface $hydrator
+ * @return self
+ * @access public
+ */
+ public function setHydrator(HydratorInterface $hydrator)
+ {
+ $this->hydrator = $hydrator;
+
+ return $this;
+ }
+
+ /**
+ * Retrieve hydrator
+ *
+ * @param void
+ * @return null|HydratorInterface
+ * @access public
+ */
+ public function getHydrator()
+ {
+ return $this->hydrator;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/HydratorInterface.php b/vendor/zendframework/zend-hydrator/src/HydratorInterface.php
new file mode 100644
index 0000000..a48effa
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/HydratorInterface.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface HydratorInterface extends HydrationInterface, ExtractionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/HydratorOptionsInterface.php b/vendor/zendframework/zend-hydrator/src/HydratorOptionsInterface.php
new file mode 100644
index 0000000..20efbbf
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/HydratorOptionsInterface.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Traversable;
+
+interface HydratorOptionsInterface
+{
+ /**
+ * @param array|Traversable $options
+ * @return self
+ */
+ public function setOptions($options);
+}
diff --git a/vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php b/vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php
new file mode 100644
index 0000000..de13dd1
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Zend\ServiceManager\AbstractPluginManager;
+
+/**
+ * Plugin manager implementation for hydrators.
+ *
+ * Enforces that adapters retrieved are instances of HydratorInterface
+ */
+class HydratorPluginManager extends AbstractPluginManager
+{
+ /**
+ * Whether or not to share by default
+ *
+ * @var bool
+ */
+ protected $shareByDefault = false;
+
+ /**
+ * Default aliases
+ *
+ * @var array
+ */
+ protected $aliases = [
+ 'delegatinghydrator' => 'Zend\Hydrator\DelegatingHydrator',
+ ];
+
+ /**
+ * Default set of adapters
+ *
+ * @var array
+ */
+ protected $invokableClasses = [
+ 'arrayserializable' => 'Zend\Hydrator\ArraySerializable',
+ 'classmethods' => 'Zend\Hydrator\ClassMethods',
+ 'objectproperty' => 'Zend\Hydrator\ObjectProperty',
+ 'reflection' => 'Zend\Hydrator\Reflection'
+ ];
+
+ /**
+ * Default factory-based adapters
+ *
+ * @var array
+ */
+ protected $factories = [
+ 'Zend\Hydrator\DelegatingHydrator' => 'Zend\Hydrator\DelegatingHydratorFactory',
+ ];
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validatePlugin($plugin)
+ {
+ if ($plugin instanceof HydratorInterface) {
+ // we're okay
+ return;
+ }
+
+ throw new Exception\RuntimeException(sprintf(
+ 'Plugin of type %s is invalid; must implement Zend\Hydrator\HydratorInterface',
+ (is_object($plugin) ? get_class($plugin) : gettype($plugin))
+ ));
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Iterator/HydratingArrayIterator.php b/vendor/zendframework/zend-hydrator/src/Iterator/HydratingArrayIterator.php
new file mode 100644
index 0000000..8e14f03
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Iterator/HydratingArrayIterator.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Iterator;
+
+use ArrayIterator;
+use Zend\Hydrator\HydratorInterface;
+
+class HydratingArrayIterator extends HydratingIteratorIterator
+{
+ /**
+ * @var HydratorInterface
+ */
+ protected $hydrator;
+
+ /**
+ * @var object
+ */
+ protected $prototype;
+
+ /**
+ * @param HydratorInterface $hydrator
+ * @param array $data
+ * @param string|object $prototype Object, or class name to use for prototype.
+ */
+ public function __construct(HydratorInterface $hydrator, array $data, $prototype)
+ {
+ parent::__construct($hydrator, new ArrayIterator($data), $prototype);
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorInterface.php b/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorInterface.php
new file mode 100644
index 0000000..ec31040
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorInterface.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Iterator;
+
+use Iterator;
+use Zend\Hydrator\HydratorInterface;
+
+interface HydratingIteratorInterface extends Iterator
+{
+ /**
+ * This sets the prototype to hydrate.
+ *
+ * This prototype can be the name of the class or the object itself;
+ * iteration will clone the object.
+ *
+ * @param string|object $prototype
+ */
+ public function setPrototype($prototype);
+
+ /**
+ * Sets the hydrator to use during iteration.
+ *
+ * @param HydratorInterface $hydrator
+ */
+ public function setHydrator(HydratorInterface $hydrator);
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php b/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php
new file mode 100644
index 0000000..53e09f0
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Iterator;
+
+use Iterator;
+use IteratorIterator;
+use Zend\Hydrator\Exception\InvalidArgumentException;
+use Zend\Hydrator\HydratorInterface;
+
+class HydratingIteratorIterator extends IteratorIterator implements HydratingIteratorInterface
+{
+ /**
+ * @var HydratorInterface
+ */
+ protected $hydrator;
+
+ /**
+ * @var object
+ */
+ protected $prototype;
+
+ /**
+ * @param HydratorInterface $hydrator
+ * @param Iterator $data
+ * @param string|object $prototype Object or class name to use for prototype.
+ */
+ public function __construct(HydratorInterface $hydrator, Iterator $data, $prototype)
+ {
+ $this->setHydrator($hydrator);
+ $this->setPrototype($prototype);
+ parent::__construct($data);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function setPrototype($prototype)
+ {
+ if (is_object($prototype)) {
+ $this->prototype = $prototype;
+ return;
+ }
+
+ if (!class_exists($prototype)) {
+ throw new InvalidArgumentException(
+ sprintf('Method %s was passed an invalid class name: %s', __METHOD__, $prototype)
+ );
+ }
+
+ $this->prototype = new $prototype;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function setHydrator(HydratorInterface $hydrator)
+ {
+ $this->hydrator = $hydrator;
+ }
+
+ /**
+ * @return object Returns hydrated clone of $prototype
+ */
+ public function current()
+ {
+ $currentValue = parent::current();
+ $object = clone $this->prototype;
+ $this->hydrator->hydrate($currentValue, $object);
+ return $object;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/NamingStrategy/ArrayMapNamingStrategy.php b/vendor/zendframework/zend-hydrator/src/NamingStrategy/ArrayMapNamingStrategy.php
new file mode 100644
index 0000000..c6333e2
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/NamingStrategy/ArrayMapNamingStrategy.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+class ArrayMapNamingStrategy implements NamingStrategyInterface
+{
+ /**
+ * @var string[]
+ */
+ private $extractionMap = [];
+
+ /**
+ * @var string[]
+ */
+ private $hydrationMap = [];
+
+ /**
+ * Constructor
+ *
+ * @param array $extractionMap A map of string keys and values for symmetric translation of hydrated
+ * and extracted field names
+ */
+ public function __construct(array $extractionMap)
+ {
+ $this->extractionMap = $extractionMap;
+ $this->hydrationMap = array_flip($extractionMap);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function hydrate($name)
+ {
+ return isset($this->hydrationMap[$name]) ? $this->hydrationMap[$name] : $name;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function extract($name)
+ {
+ return isset($this->extractionMap[$name]) ? $this->extractionMap[$name] : $name;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/NamingStrategy/CompositeNamingStrategy.php b/vendor/zendframework/zend-hydrator/src/NamingStrategy/CompositeNamingStrategy.php
new file mode 100644
index 0000000..c2bae8c
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/NamingStrategy/CompositeNamingStrategy.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+class CompositeNamingStrategy implements NamingStrategyInterface
+{
+ /**
+ * @var array
+ */
+ private $namingStrategies = [];
+
+ /**
+ * @var NamingStrategyInterface
+ */
+ private $defaultNamingStrategy;
+
+ /**
+ * @param NamingStrategyInterface[] $strategies indexed by the name they translate
+ * @param NamingStrategyInterface|null $defaultNamingStrategy
+ */
+ public function __construct(array $strategies, NamingStrategyInterface $defaultNamingStrategy = null)
+ {
+ $this->namingStrategies = array_map(
+ function (NamingStrategyInterface $strategy) {
+ // this callback is here only to ensure type-safety
+ return $strategy;
+ },
+ $strategies
+ );
+
+ $this->defaultNamingStrategy = $defaultNamingStrategy ?: new IdentityNamingStrategy();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function extract($name)
+ {
+ $strategy = isset($this->namingStrategies[$name])
+ ? $this->namingStrategies[$name]
+ : $this->defaultNamingStrategy;
+
+ return $strategy->extract($name);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function hydrate($name)
+ {
+ $strategy = isset($this->namingStrategies[$name])
+ ? $this->namingStrategies[$name]
+ : $this->defaultNamingStrategy;
+
+ return $strategy->hydrate($name);
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/NamingStrategy/IdentityNamingStrategy.php b/vendor/zendframework/zend-hydrator/src/NamingStrategy/IdentityNamingStrategy.php
new file mode 100644
index 0000000..59e3fed
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/NamingStrategy/IdentityNamingStrategy.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+class IdentityNamingStrategy implements NamingStrategyInterface
+{
+ /**
+ * {@inheritDoc}
+ */
+ public function hydrate($name)
+ {
+ return $name;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function extract($name)
+ {
+ return $name;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php b/vendor/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php
new file mode 100644
index 0000000..7846bce
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+class MapNamingStrategy implements NamingStrategyInterface
+{
+ /**
+ * Map for hydrate name conversion.
+ *
+ * @var array
+ */
+ protected $mapping = [];
+
+ /**
+ * Reversed map for extract name conversion.
+ *
+ * @var array
+ */
+ protected $reverse = [];
+
+ /**
+ * Initialize.
+ *
+ * @param array $mapping Map for name conversion on hydration
+ * @param array $reverse Reverse map for name conversion on extraction
+ */
+ public function __construct(array $mapping, array $reverse = null)
+ {
+ $this->mapping = $mapping;
+ $this->reverse = $reverse ?: $this->flipMapping($mapping);
+ }
+
+ /**
+ * Safelly flip mapping array.
+ *
+ * @param array $array Array to flip
+ * @return array Flipped array
+ * @throws InvalidArgumentException
+ */
+ protected function flipMapping(array $array)
+ {
+ array_walk($array, function ($value) {
+ if (!is_string($value) && !is_int($value)) {
+ throw new InvalidArgumentException('Mapping array can\'t be flipped because of invalid value');
+ }
+ });
+
+ return array_flip($array);
+ }
+
+ /**
+ * Converts the given name so that it can be extracted by the hydrator.
+ *
+ * @param string $name The original name
+ * @return mixed The hydrated name
+ */
+ public function hydrate($name)
+ {
+ if (array_key_exists($name, $this->mapping)) {
+ return $this->mapping[$name];
+ }
+
+ return $name;
+ }
+
+ /**
+ * Converts the given name so that it can be hydrated by the hydrator.
+ *
+ * @param string $name The original name
+ * @return mixed The extracted name
+ */
+ public function extract($name)
+ {
+ if (array_key_exists($name, $this->reverse)) {
+ return $this->reverse[$name];
+ }
+
+ return $name;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/NamingStrategy/NamingStrategyInterface.php b/vendor/zendframework/zend-hydrator/src/NamingStrategy/NamingStrategyInterface.php
new file mode 100644
index 0000000..cb7ca94
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/NamingStrategy/NamingStrategyInterface.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+/**
+ * Allow property extraction / hydration for hydrator
+ */
+interface NamingStrategyInterface
+{
+ /**
+ * Converts the given name so that it can be extracted by the hydrator.
+ *
+ * @param string $name The original name
+ * @param object $object (optional) The original object for context.
+ * @return mixed The hydrated name
+ */
+ public function hydrate($name);
+
+ /**
+ * Converts the given name so that it can be hydrated by the hydrator.
+ *
+ * @param string $name The original name
+ * @param array $data (optional) The original data for context.
+ * @return mixed The extracted name
+ */
+ public function extract($name);
+}
diff --git a/vendor/zendframework/zend-hydrator/src/NamingStrategy/UnderscoreNamingStrategy.php b/vendor/zendframework/zend-hydrator/src/NamingStrategy/UnderscoreNamingStrategy.php
new file mode 100644
index 0000000..7fdfa53
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/NamingStrategy/UnderscoreNamingStrategy.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+use Zend\Filter\FilterChain;
+
+class UnderscoreNamingStrategy implements NamingStrategyInterface
+{
+ /**
+ * @var FilterChain|null
+ */
+ protected static $camelCaseToUnderscoreFilter;
+
+ /**
+ * @var FilterChain|null
+ */
+ protected static $underscoreToStudlyCaseFilter;
+
+ /**
+ * Remove underscores and capitalize letters
+ *
+ * @param string $name
+ * @return string
+ */
+ public function hydrate($name)
+ {
+ return $this->getUnderscoreToStudlyCaseFilter()->filter($name);
+ }
+
+ /**
+ * Remove capitalized letters and prepend underscores.
+ *
+ * @param string $name
+ * @return string
+ */
+ public function extract($name)
+ {
+ return $this->getCamelCaseToUnderscoreFilter()->filter($name);
+ }
+
+ /**
+ * @return FilterChain
+ */
+ protected function getUnderscoreToStudlyCaseFilter()
+ {
+ if (static::$underscoreToStudlyCaseFilter instanceof FilterChain) {
+ return static::$underscoreToStudlyCaseFilter;
+ }
+
+ $filter = new FilterChain();
+
+ $filter->attachByName('WordUnderscoreToStudlyCase');
+
+ return static::$underscoreToStudlyCaseFilter = $filter;
+ }
+
+ /**
+ * @return FilterChain
+ */
+ protected function getCamelCaseToUnderscoreFilter()
+ {
+ if (static::$camelCaseToUnderscoreFilter instanceof FilterChain) {
+ return static::$camelCaseToUnderscoreFilter;
+ }
+
+ $filter = new FilterChain();
+
+ $filter->attachByName('WordCamelCaseToUnderscore');
+ $filter->attachByName('StringToLower');
+
+ return static::$camelCaseToUnderscoreFilter = $filter;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/NamingStrategyEnabledInterface.php b/vendor/zendframework/zend-hydrator/src/NamingStrategyEnabledInterface.php
new file mode 100644
index 0000000..c01a527
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/NamingStrategyEnabledInterface.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface NamingStrategyEnabledInterface
+{
+ /**
+ * Adds the given naming strategy
+ *
+ * @param NamingStrategy\NamingStrategyInterface $strategy The naming to register.
+ * @return self
+ */
+ public function setNamingStrategy(NamingStrategy\NamingStrategyInterface $strategy);
+
+ /**
+ * Gets the naming strategy.
+ *
+ * @return NamingStrategy\NamingStrategyInterface
+ */
+ public function getNamingStrategy();
+
+ /**
+ * Checks if a naming strategy exists.
+ *
+ * @return bool
+ */
+ public function hasNamingStrategy();
+
+ /**
+ * Removes the naming with the given name.
+ *
+ * @return self
+ */
+ public function removeNamingStrategy();
+}
diff --git a/vendor/zendframework/zend-hydrator/src/ObjectProperty.php b/vendor/zendframework/zend-hydrator/src/ObjectProperty.php
new file mode 100644
index 0000000..db68fb2
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/ObjectProperty.php
@@ -0,0 +1,109 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use ReflectionClass;
+use ReflectionProperty;
+
+class ObjectProperty extends AbstractHydrator
+{
+ /**
+ * @var array[] indexed by class name and then property name
+ */
+ private static $skippedPropertiesCache = [];
+
+ /**
+ * {@inheritDoc}
+ *
+ * Extracts the accessible non-static properties of the given $object.
+ *
+ * @throws Exception\BadMethodCallException for a non-object $object
+ */
+ public function extract($object)
+ {
+ if (!is_object($object)) {
+ throw new Exception\BadMethodCallException(
+ sprintf('%s expects the provided $object to be a PHP object)', __METHOD__)
+ );
+ }
+
+ $data = get_object_vars($object);
+ $filter = $this->getFilter();
+
+ foreach ($data as $name => $value) {
+ // Filter keys, removing any we don't want
+ if (! $filter->filter($name)) {
+ unset($data[$name]);
+ continue;
+ }
+
+ // Replace name if extracted differ
+ $extracted = $this->extractName($name, $object);
+
+ if ($extracted !== $name) {
+ unset($data[$name]);
+ $name = $extracted;
+ }
+
+ $data[$name] = $this->extractValue($name, $value, $object);
+ }
+
+ return $data;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Hydrate an object by populating public properties
+ *
+ * Hydrates an object by setting public properties of the object.
+ *
+ * @throws Exception\BadMethodCallException for a non-object $object
+ */
+ public function hydrate(array $data, $object)
+ {
+ if (!is_object($object)) {
+ throw new Exception\BadMethodCallException(
+ sprintf('%s expects the provided $object to be a PHP object)', __METHOD__)
+ );
+ }
+
+ $properties = & self::$skippedPropertiesCache[get_class($object)];
+
+ if (! isset($properties)) {
+ $reflection = new ReflectionClass($object);
+ $properties = array_fill_keys(
+ array_map(
+ function (ReflectionProperty $property) {
+ return $property->getName();
+ },
+ $reflection->getProperties(
+ ReflectionProperty::IS_PRIVATE
+ + ReflectionProperty::IS_PROTECTED
+ + ReflectionProperty::IS_STATIC
+ )
+ ),
+ true
+ );
+ }
+
+ foreach ($data as $name => $value) {
+ $property = $this->hydrateName($name, $data);
+
+ if (isset($properties[$property])) {
+ continue;
+ }
+
+ $object->$property = $this->hydrateValue($property, $value, $data);
+ }
+
+ return $object;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Reflection.php b/vendor/zendframework/zend-hydrator/src/Reflection.php
new file mode 100644
index 0000000..019748b
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Reflection.php
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use ReflectionClass;
+use ReflectionProperty;
+
+class Reflection extends AbstractHydrator
+{
+ /**
+ * Simple in-memory array cache of ReflectionProperties used.
+ * @var ReflectionProperty[]
+ */
+ protected static $reflProperties = [];
+
+ /**
+ * Extract values from an object
+ *
+ * @param object $object
+ * @return array
+ */
+ public function extract($object)
+ {
+ $result = [];
+ foreach (self::getReflProperties($object) as $property) {
+ $propertyName = $this->extractName($property->getName(), $object);
+ if (!$this->filterComposite->filter($propertyName)) {
+ continue;
+ }
+
+ $value = $property->getValue($object);
+ $result[$propertyName] = $this->extractValue($propertyName, $value, $object);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Hydrate $object with the provided $data.
+ *
+ * @param array $data
+ * @param object $object
+ * @return object
+ */
+ public function hydrate(array $data, $object)
+ {
+ $reflProperties = self::getReflProperties($object);
+ foreach ($data as $key => $value) {
+ $name = $this->hydrateName($key, $data);
+ if (isset($reflProperties[$name])) {
+ $reflProperties[$name]->setValue($object, $this->hydrateValue($name, $value, $data));
+ }
+ }
+ return $object;
+ }
+
+ /**
+ * Get a reflection properties from in-memory cache and lazy-load if
+ * class has not been loaded.
+ *
+ * @param string|object $input
+ * @throws Exception\InvalidArgumentException
+ * @return ReflectionProperty[]
+ */
+ protected static function getReflProperties($input)
+ {
+ if (is_object($input)) {
+ $input = get_class($input);
+ } elseif (!is_string($input)) {
+ throw new Exception\InvalidArgumentException('Input must be a string or an object.');
+ }
+
+ if (isset(static::$reflProperties[$input])) {
+ return static::$reflProperties[$input];
+ }
+
+ static::$reflProperties[$input] = [];
+ $reflClass = new ReflectionClass($input);
+ $reflProperties = $reflClass->getProperties();
+
+ foreach ($reflProperties as $property) {
+ $property->setAccessible(true);
+ static::$reflProperties[$input][$property->getName()] = $property;
+ }
+
+ return static::$reflProperties[$input];
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/BooleanStrategy.php b/vendor/zendframework/zend-hydrator/src/Strategy/BooleanStrategy.php
new file mode 100644
index 0000000..dcb3a42
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/BooleanStrategy.php
@@ -0,0 +1,104 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+/**
+ * This Strategy extracts and hydrates int and string values to Boolean values
+ */
+class BooleanStrategy implements StrategyInterface
+{
+ /**
+ * @var int|string
+ */
+ private $trueValue;
+
+ /**
+ * @var int|string
+ */
+ private $falseValue;
+
+ /**
+ * @param int|string $trueValue
+ * @param int|string $falseValue
+ * @throws InvalidArgumentException
+ */
+ public function __construct($trueValue, $falseValue)
+ {
+ if (!is_int($trueValue) && !is_string($trueValue)) {
+ throw new InvalidArgumentException(sprintf(
+ 'Unable to instantiate BooleanStrategy. Expected int or string as $trueValue. %s was given',
+ is_object($trueValue) ? get_class($trueValue) : gettype($trueValue)
+ ));
+ }
+
+ if (!is_int($falseValue) && !is_string($falseValue)) {
+ throw new InvalidArgumentException(sprintf(
+ 'Unable to instantiate BooleanStrategy. Expected int or string as $falseValue. %s was given',
+ is_object($falseValue) ? get_class($falseValue) : gettype($falseValue)
+ ));
+ }
+
+ $this->trueValue = $trueValue;
+ $this->falseValue = $falseValue;
+ }
+
+ /**
+ * Converts the given value so that it can be extracted by the hydrator.
+ *
+ * @param bool $value The original value.
+ * @throws InvalidArgumentException
+ * @return int|string Returns the value that should be extracted.
+ */
+ public function extract($value)
+ {
+ if (!is_bool($value)) {
+ throw new InvalidArgumentException(sprintf(
+ 'Unable to extract. Expected bool. %s was given.',
+ is_object($value) ? get_class($value) : gettype($value)
+ ));
+ }
+
+ return $value === true ? $this->trueValue : $this->falseValue;
+ }
+
+ /**
+ * Converts the given value so that it can be hydrated by the hydrator.
+ *
+ * @param int|string $value The original value.
+ * @throws InvalidArgumentException
+ * @return bool Returns the value that should be hydrated.
+ */
+ public function hydrate($value)
+ {
+ if (!is_string($value) && !is_int($value)) {
+ throw new InvalidArgumentException(sprintf(
+ 'Unable to hydrate. Expected string or int. %s was given.',
+ is_object($value) ? get_class($value) : gettype($value)
+ ));
+ }
+
+ if ($value === $this->trueValue) {
+ return true;
+ }
+
+ if ($value === $this->falseValue) {
+ return false;
+ }
+
+ throw new InvalidArgumentException(sprintf(
+ 'Unexpected value %s can\'t be hydrated. Expect %s or %s as Value.',
+ $value,
+ $this->trueValue,
+ $this->falseValue
+ ));
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/ClosureStrategy.php b/vendor/zendframework/zend-hydrator/src/Strategy/ClosureStrategy.php
new file mode 100644
index 0000000..1f6526d
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/ClosureStrategy.php
@@ -0,0 +1,113 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+class ClosureStrategy implements StrategyInterface
+{
+ /**
+ * Function, used in extract method, default:
+ *
+ * <code>
+ * function ($value) {
+ * return $value;
+ * };
+ * </code>
+ *
+ * @var callable
+ */
+ protected $extractFunc = null;
+
+ /**
+ * Function, used in hydrate method, default:
+ *
+ * <code>
+ * function ($value) {
+ * return $value;
+ * };
+ * </code>
+ *
+ * @var callable
+ */
+ protected $hydrateFunc = null;
+
+ /**
+ * You can describe how your values will extract and hydrate, like this:
+ *
+ * <code>
+ * $hydrator->addStrategy('category', new ClosureStrategy(
+ * function (Category $value) {
+ * return (int) $value->id;
+ * },
+ * function ($value) {
+ * return new Category((int) $value);
+ * }
+ * ));
+ * </code>
+ *
+ * @param callable $extractFunc - anonymous function, that extract values
+ * from object
+ * @param callable $hydrateFunc - anonymous function, that hydrate values
+ * into object
+ */
+ public function __construct($extractFunc = null, $hydrateFunc = null)
+ {
+ if (isset($extractFunc)) {
+ if (!is_callable($extractFunc)) {
+ throw new \Exception('$extractFunc must be callable');
+ }
+
+ $this->extractFunc = $extractFunc;
+ } else {
+ $this->extractFunc = function ($value) {
+ return $value;
+ };
+ }
+
+ if (isset($hydrateFunc)) {
+ if (!is_callable($hydrateFunc)) {
+ throw new \Exception('$hydrateFunc must be callable');
+ }
+
+ $this->hydrateFunc = $hydrateFunc;
+ } else {
+ $this->hydrateFunc = function ($value) {
+ return $value;
+ };
+ }
+ }
+
+ /**
+ * Converts the given value so that it can be extracted by the hydrator.
+ *
+ * @param mixed $value The original value.
+ * @param array $object The object is optionally provided as context.
+ * @return mixed Returns the value that should be extracted.
+ */
+ public function extract($value, $object = null)
+ {
+ $func = $this->extractFunc;
+
+ return $func($value, $object);
+ }
+
+ /**
+ * Converts the given value so that it can be hydrated by the hydrator.
+ *
+ * @param mixed $value The original value.
+ * @param array $data The whole data is optionally provided as context.
+ * @return mixed Returns the value that should be hydrated.
+ */
+ public function hydrate($value, $data = null)
+ {
+ $func = $this->hydrateFunc;
+
+ return $func($value, $data);
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/DateTimeFormatterStrategy.php b/vendor/zendframework/zend-hydrator/src/Strategy/DateTimeFormatterStrategy.php
new file mode 100644
index 0000000..62dda71
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/DateTimeFormatterStrategy.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+use DateTime;
+use DateTimeZone;
+
+class DateTimeFormatterStrategy implements StrategyInterface
+{
+ /**
+ * @var string
+ */
+ private $format;
+
+ /**
+ * @var DateTimeZone|null
+ */
+ private $timezone;
+
+ /**
+ * Constructor
+ *
+ * @param string $format
+ * @param DateTimeZone|null $timezone
+ */
+ public function __construct($format = DateTime::RFC3339, DateTimeZone $timezone = null)
+ {
+ $this->format = (string) $format;
+ $this->timezone = $timezone;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Converts to date time string
+ *
+ * @param mixed|DateTime $value
+ *
+ * @return mixed|string
+ */
+ public function extract($value)
+ {
+ if ($value instanceof DateTime) {
+ return $value->format($this->format);
+ }
+
+ return $value;
+ }
+
+ /**
+ * Converts date time string to DateTime instance for injecting to object
+ *
+ * {@inheritDoc}
+ *
+ * @param mixed|string $value
+ *
+ * @return mixed|DateTime
+ */
+ public function hydrate($value)
+ {
+ if ($value === '' || $value === null) {
+ return;
+ }
+
+ if ($this->timezone) {
+ $hydrated = DateTime::createFromFormat($this->format, $value, $this->timezone);
+ } else {
+ $hydrated = DateTime::createFromFormat($this->format, $value);
+ }
+
+ return $hydrated ?: $value;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/DefaultStrategy.php b/vendor/zendframework/zend-hydrator/src/Strategy/DefaultStrategy.php
new file mode 100644
index 0000000..6fb8f45
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/DefaultStrategy.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+class DefaultStrategy implements StrategyInterface
+{
+ /**
+ * Converts the given value so that it can be extracted by the hydrator.
+ *
+ * @param mixed $value The original value.
+ * @return mixed Returns the value that should be extracted.
+ */
+ public function extract($value)
+ {
+ return $value;
+ }
+
+ /**
+ * Converts the given value so that it can be hydrated by the hydrator.
+ *
+ * @param mixed $value The original value.
+ * @return mixed Returns the value that should be hydrated.
+ */
+ public function hydrate($value)
+ {
+ return $value;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/Exception/ExceptionInterface.php b/vendor/zendframework/zend-hydrator/src/Strategy/Exception/ExceptionInterface.php
new file mode 100644
index 0000000..6c16ec7
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/Exception/ExceptionInterface.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy\Exception;
+
+interface ExceptionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/Exception/InvalidArgumentException.php b/vendor/zendframework/zend-hydrator/src/Strategy/Exception/InvalidArgumentException.php
new file mode 100644
index 0000000..c3175de
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/Exception/InvalidArgumentException.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy\Exception;
+
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php b/vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php
new file mode 100644
index 0000000..4eb54d6
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php
@@ -0,0 +1,113 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+class ExplodeStrategy implements StrategyInterface
+{
+ /**
+ * @var string
+ */
+ private $valueDelimiter;
+
+ /**
+ * @var int|null
+ */
+ private $explodeLimit;
+
+ /**
+ * Constructor
+ *
+ * @param string $delimiter String that the values will be split upon
+ * @param int|null $explodeLimit Explode limit
+ */
+ public function __construct($delimiter = ',', $explodeLimit = null)
+ {
+ $this->setValueDelimiter($delimiter);
+
+ $this->explodeLimit = ($explodeLimit === null) ? null : (int) $explodeLimit;
+ }
+
+ /**
+ * Sets the delimiter string that the values will be split upon
+ *
+ * @param string $delimiter
+ * @return self
+ */
+ private function setValueDelimiter($delimiter)
+ {
+ if (!is_string($delimiter)) {
+ throw new Exception\InvalidArgumentException(sprintf(
+ '%s expects Delimiter to be string, %s provided instead',
+ __METHOD__,
+ is_object($delimiter) ? get_class($delimiter) : gettype($delimiter)
+ ));
+ }
+
+ if (empty($delimiter)) {
+ throw new Exception\InvalidArgumentException('Delimiter cannot be empty.');
+ }
+
+ $this->valueDelimiter = $delimiter;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Split a string by delimiter
+ *
+ * @param string|null $value
+ *
+ * @return string[]
+ *
+ * @throws Exception\InvalidArgumentException
+ */
+ public function hydrate($value)
+ {
+ if (null === $value) {
+ return [];
+ }
+
+ if (!(is_string($value) || is_numeric($value))) {
+ throw new Exception\InvalidArgumentException(sprintf(
+ '%s expects argument 1 to be string, %s provided instead',
+ __METHOD__,
+ is_object($value) ? get_class($value) : gettype($value)
+ ));
+ }
+
+ if ($this->explodeLimit !== null) {
+ return explode($this->valueDelimiter, $value, $this->explodeLimit);
+ }
+
+ return explode($this->valueDelimiter, $value);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Join array elements with delimiter
+ *
+ * @param string[] $value The original value.
+ *
+ * @return string|null
+ */
+ public function extract($value)
+ {
+ if (!is_array($value)) {
+ throw new Exception\InvalidArgumentException(sprintf(
+ '%s expects argument 1 to be array, %s provided instead',
+ __METHOD__,
+ is_object($value) ? get_class($value) : gettype($value)
+ ));
+ }
+
+ return empty($value) ? null : implode($this->valueDelimiter, $value);
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/SerializableStrategy.php b/vendor/zendframework/zend-hydrator/src/Strategy/SerializableStrategy.php
new file mode 100644
index 0000000..bc49e7b
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/SerializableStrategy.php
@@ -0,0 +1,123 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+use Zend\Hydrator\Exception\InvalidArgumentException;
+use Zend\Serializer\Adapter\AdapterInterface as SerializerAdapter;
+use Zend\Serializer\Serializer as SerializerFactory;
+
+class SerializableStrategy implements StrategyInterface
+{
+ /**
+ * @var string|SerializerAdapter
+ */
+ protected $serializer;
+
+ /**
+ * @var array
+ */
+ protected $serializerOptions = [];
+
+ /**
+ *
+ * @param mixed $serializer string or SerializerAdapter
+ * @param mixed $serializerOptions
+ */
+ public function __construct($serializer, $serializerOptions = null)
+ {
+ $this->setSerializer($serializer);
+ if ($serializerOptions) {
+ $this->setSerializerOptions($serializerOptions);
+ }
+ }
+
+ /**
+ * Serialize the given value so that it can be extracted by the hydrator.
+ *
+ * @param mixed $value The original value.
+ * @return mixed Returns the value that should be extracted.
+ */
+ public function extract($value)
+ {
+ $serializer = $this->getSerializer();
+ return $serializer->serialize($value);
+ }
+
+ /**
+ * Unserialize the given value so that it can be hydrated by the hydrator.
+ *
+ * @param mixed $value The original value.
+ * @return mixed Returns the value that should be hydrated.
+ */
+ public function hydrate($value)
+ {
+ $serializer = $this->getSerializer();
+ return $serializer->unserialize($value);
+ }
+
+ /**
+ * Set serializer
+ *
+ * @param string|SerializerAdapter $serializer
+ * @return SerializableStrategy
+ */
+ public function setSerializer($serializer)
+ {
+ if (!is_string($serializer) && !$serializer instanceof SerializerAdapter) {
+ throw new InvalidArgumentException(sprintf(
+ '%s expects either a string serializer name or Zend\Serializer\Adapter\AdapterInterface instance; '
+ . 'received "%s"',
+ __METHOD__,
+ (is_object($serializer) ? get_class($serializer) : gettype($serializer))
+ ));
+ }
+ $this->serializer = $serializer;
+ return $this;
+ }
+
+ /**
+ * Get serializer
+ *
+ * @return SerializerAdapter
+ */
+ public function getSerializer()
+ {
+ if (is_string($this->serializer)) {
+ $options = $this->getSerializerOptions();
+ $this->setSerializer(SerializerFactory::factory($this->serializer, $options));
+ } elseif (null === $this->serializer) {
+ $this->setSerializer(SerializerFactory::getDefaultAdapter());
+ }
+
+ return $this->serializer;
+ }
+
+ /**
+ * Set configuration options for instantiating a serializer adapter
+ *
+ * @param mixed $serializerOptions
+ * @return SerializableStrategy
+ */
+ public function setSerializerOptions($serializerOptions)
+ {
+ $this->serializerOptions = $serializerOptions;
+ return $this;
+ }
+
+ /**
+ * Get configuration options for instantiating a serializer adapter
+ *
+ * @return mixed
+ */
+ public function getSerializerOptions()
+ {
+ return $this->serializerOptions;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/StrategyChain.php b/vendor/zendframework/zend-hydrator/src/Strategy/StrategyChain.php
new file mode 100644
index 0000000..49d514d
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/StrategyChain.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+use Traversable;
+use Zend\Stdlib\ArrayUtils;
+
+class StrategyChain implements StrategyInterface
+{
+ /**
+ * Strategy chain for extraction
+ *
+ * @var StrategyInterface[]
+ */
+ private $extractionStrategies;
+
+ /**
+ * Strategy chain for hydration
+ *
+ * @var StrategyInterface[]
+ */
+ private $hydrationStrategies;
+
+ /**
+ * Constructor
+ *
+ * @param array|Traversable $extractionStrategies
+ */
+ public function __construct($extractionStrategies)
+ {
+ $extractionStrategies = ArrayUtils::iteratorToArray($extractionStrategies);
+ $this->extractionStrategies = array_map(
+ function (StrategyInterface $strategy) {
+ // this callback is here only to ensure type-safety
+ return $strategy;
+ },
+ $extractionStrategies
+ );
+
+ $this->hydrationStrategies = array_reverse($extractionStrategies);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function extract($value)
+ {
+ foreach ($this->extractionStrategies as $strategy) {
+ $value = $strategy->extract($value);
+ }
+
+ return $value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function hydrate($value)
+ {
+ foreach ($this->hydrationStrategies as $strategy) {
+ $value = $strategy->hydrate($value);
+ }
+
+ return $value;
+ }
+}
diff --git a/vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php b/vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php
new file mode 100644
index 0000000..a705593
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+/**
+ * @todo v3.0, add optional object/data to extract/hydrate.
+ */
+interface StrategyInterface
+{
+ /**
+ * Converts the given value so that it can be extracted by the hydrator.
+ *
+ * @param mixed $value The original value.
+ * @param object $object (optional) The original object for context.
+ * @return mixed Returns the value that should be extracted.
+ */
+ public function extract($value);
+
+ /**
+ * Converts the given value so that it can be hydrated by the hydrator.
+ *
+ * @param mixed $value The original value.
+ * @param array $data (optional) The original data for context.
+ * @return mixed Returns the value that should be hydrated.
+ */
+ public function hydrate($value);
+}
diff --git a/vendor/zendframework/zend-hydrator/src/StrategyEnabledInterface.php b/vendor/zendframework/zend-hydrator/src/StrategyEnabledInterface.php
new file mode 100644
index 0000000..3c85b78
--- /dev/null
+++ b/vendor/zendframework/zend-hydrator/src/StrategyEnabledInterface.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface StrategyEnabledInterface
+{
+ /**
+ * Adds the given strategy under the given name.
+ *
+ * @param string $name The name of the strategy to register.
+ * @param Strategy\StrategyInterface $strategy The strategy to register.
+ * @return self
+ */
+ public function addStrategy($name, Strategy\StrategyInterface $strategy);
+
+ /**
+ * Gets the strategy with the given name.
+ *
+ * @param string $name The name of the strategy to get.
+ * @return Strategy\StrategyInterface
+ */
+ public function getStrategy($name);
+
+ /**
+ * Checks if the strategy with the given name exists.
+ *
+ * @param string $name The name of the strategy to check for.
+ * @return bool
+ */
+ public function hasStrategy($name);
+
+ /**
+ * Removes the strategy with the given name.
+ *
+ * @param string $name The name of the strategy to remove.
+ * @return self
+ */
+ public function removeStrategy($name);
+}
diff --git a/vendor/zendframework/zend-stdlib/CHANGELOG.md b/vendor/zendframework/zend-stdlib/CHANGELOG.md
index d594cc4..5ce14e6 100644
--- a/vendor/zendframework/zend-stdlib/CHANGELOG.md
+++ b/vendor/zendframework/zend-stdlib/CHANGELOG.md
@@ -2,6 +2,143 @@
All notable changes to this project will be documented in this file, in reverse chronological order by release.
+## 2.7.3 - 2015-09-24
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#27](https://github.com/zendframework/zend-stdlib/pull/27) fixes a race
+ condition in the `FastPriorityQueue::remove()` logic that occurs when removing
+ items iteratively from the same priority of a queue.
+
+## 2.7.2 - 2015-09-23
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#26](https://github.com/zendframework/zend-stdlib/pull/26) fixes a subtle
+ inheritance issue with deprecation in the hydrators, and updates the
+ `HydratorInterface` to also extend the zend-hydrator `HydratorInterface` to
+ ensure LSP is preserved.
+
+## 2.7.1 - 2015-09-22
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#24](https://github.com/zendframework/zend-stdlib/pull/24) fixes an import in
+ `FastPriorityQueue` to alias `SplPriorityQueue` in order to disambiguate with
+ the local override present in the component.
+
+## 2.7.0 - 2015-09-22
+
+### Added
+
+- [#19](https://github.com/zendframework/zend-stdlib/pull/19) adds a new
+ `FastPriorityQueue` implementation. It follows the same signature as
+ `SplPriorityQueue`, but uses a performance-optimized algorithm:
+
+ - inserts are 2x faster than `SplPriorityQueue` and 3x faster than the
+ `Zend\Stdlib\PriorityQueue` implementation.
+ - extracts are 4x faster than `SplPriorityQueue` and 4-5x faster than the
+ `Zend\Stdlib\PriorityQueue` implementation.
+
+ The intention is to use this as a drop-in replacement in the
+ `zend-eventmanager` component to provide performance benefits.
+
+### Deprecated
+
+- [#20](https://github.com/zendframework/zend-stdlib/pull/20) deprecates *all
+ hydrator* classes, in favor of the new [zend-hydrator](https://github.com/zendframework/zend-hydrator)
+ component. All classes were updated to extend their zend-hydrator equivalents,
+ and marked as `@deprecated`, indicating the equivalent class from the other
+ repository.
+
+ Users *should* immediately start changing their code to use the zend-hydrator
+ equivalents; in most cases, this can be as easy as removing the `Stdlib`
+ namespace from import statements or hydrator configuration. Hydrators will be
+ removed entirely from zend-stdlib in v3.0, and all future updates to hydrators
+ will occur in the zend-hydrator library.
+
+ Changes with backwards compatibility implications:
+
+ - Users implementing `Zend\Stdlib\Hydrator\HydratorAwareInterface` will need to
+ update their `setHydrator()` implementation to typehint on
+ `Zend\Hydrator\HydratorInterface`. This can be done by changing the import
+ statement for that interface as follows:
+
+ ```php
+ // Replace this:
+ use Zend\Stdlib\Hydrator\HydratorInterface;
+ // with this:
+ use Zend\Hydrator\HydratorInterface;
+ ```
+
+ If you are not using imports, change the typehint within the signature itself:
+
+ ```php
+ // Replace this:
+ public function setHydrator(\Zend\Stdlib\Hydrator\HydratorInterface $hydrator)
+ // with this:
+ public function setHydrator(\Zend\Hydrator\HydratorInterface $hydrator)
+ ```
+
+ If you are using `Zend\Stdlib\Hydrator\HydratorAwareTrait`, no changes are
+ necessary, unless you override that method.
+
+ - If you were catching hydrator-generated exceptions, these were previously in
+ the `Zend\Stdlib\Exception` namespace. You will need to update your code to
+ catch exceptions in the `Zend\Hydrator\Exception` namespace.
+
+ - Users who *do* migrate to zend-hydrator may end up in a situation where
+ their code will not work with existing libraries that are still type-hinting
+ on the zend-stdlib interfaces. We will be attempting to address that ASAP,
+ but the deprecation within zend-stdlib is necessary as a first step.
+
+ In the meantime, you can write hydrators targeting zend-stdlib still in
+ order to guarantee compatibility.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Nothing.
+
## 2.6.0 - 2015-07-21
### Added
diff --git a/vendor/zendframework/zend-stdlib/CONTRIBUTING.md b/vendor/zendframework/zend-stdlib/CONTRIBUTING.md
index b87ecf0..1083b84 100644
--- a/vendor/zendframework/zend-stdlib/CONTRIBUTING.md
+++ b/vendor/zendframework/zend-stdlib/CONTRIBUTING.md
@@ -97,6 +97,16 @@ $ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
they pass, and make sure you add and commit the changes after verification.
+## Benchmarks
+
+We provide benchmark tests for zend-stdlib under the directory [benchmark/](benchmark/),
+using. [athletic](https://github.com/polyfractal/athletic). You can execute
+the benchmarks running the following command:
+
+```bash
+$ ./vendor/bin/athletic -p benchmark
+```
+
## Recommended Workflow for Contributions
Your first step is to establish a public repository from which we can
diff --git a/vendor/zendframework/zend-stdlib/README.md b/vendor/zendframework/zend-stdlib/README.md
index 9633b2c..d87d00c 100644
--- a/vendor/zendframework/zend-stdlib/README.md
+++ b/vendor/zendframework/zend-stdlib/README.md
@@ -13,6 +13,7 @@ class for different scopes like:
- string wrappers;
- etc.
--
+---
+
- File issues at https://github.com/zendframework/zend-stdlib/issues
- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-stdlib
diff --git a/vendor/zendframework/zend-stdlib/benchmark/ExtractPriorityQueue.php b/vendor/zendframework/zend-stdlib/benchmark/ExtractPriorityQueue.php
new file mode 100644
index 0000000..8fa7527
--- /dev/null
+++ b/vendor/zendframework/zend-stdlib/benchmark/ExtractPriorityQueue.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace ZendBench\Stdlib;
+
+use Athletic\AthleticEvent;
+use Zend\Stdlib\FastPriorityQueue;
+use Zend\Stdlib\PriorityQueue;
+use Zend\Stdlib\SplPriorityQueue;
+
+class ExtractPriorityQueue extends AthleticEvent
+{
+ public function classSetUp()
+ {
+ $this->splPriorityQueue = new SplPriorityQueue();
+ $this->fastPriorityQueue = new FastPriorityQueue();
+ $this->priorityQueue = new PriorityQueue();
+
+ for ($i = 0; $i < 5000; $i += 1) {
+ $priority = rand(1, 100);
+ $this->splPriorityQueue->insert('foo', $priority);
+ $this->fastPriorityQueue->insert('foo', $priority);
+ $this->priorityQueue->insert('foo', $priority);
+ }
+ }
+
+ /**
+ * @iterations 5000
+ */
+ public function extractSplPriorityQueue()
+ {
+ $this->splPriorityQueue->extract();
+ }
+
+ /**
+ * @iterations 5000
+ */
+ public function extractPriorityQueue()
+ {
+ $this->priorityQueue->extract();
+ }
+
+ /**
+ * @iterations 5000
+ */
+ public function extractFastPriorityQueue()
+ {
+ $this->fastPriorityQueue->extract();
+ }
+}
diff --git a/vendor/zendframework/zend-stdlib/benchmark/InsertPriorityQueue.php b/vendor/zendframework/zend-stdlib/benchmark/InsertPriorityQueue.php
new file mode 100644
index 0000000..561c535
--- /dev/null
+++ b/vendor/zendframework/zend-stdlib/benchmark/InsertPriorityQueue.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace ZendBench\Stdlib;
+
+use Athletic\AthleticEvent;
+use Zend\Stdlib\FastPriorityQueue;
+use Zend\Stdlib\PriorityQueue;
+use Zend\Stdlib\SplPriorityQueue;
+
+class InsertPriorityQueue extends AthleticEvent
+{
+ public function classSetUp()
+ {
+ $this->splPriorityQueue = new SplPriorityQueue();
+ $this->fastPriorityQueue = new FastPriorityQueue();
+ $this->priorityQueue = new PriorityQueue();
+ }
+
+ /**
+ * @iterations 5000
+ */
+ public function insertSplPriorityQueue()
+ {
+ $this->splPriorityQueue->insert('foo', rand(1, 100));
+ }
+
+ /**
+ * @iterations 5000
+ */
+ public function insertPriorityQueue()
+ {
+ $this->priorityQueue->insert('foo', rand(1, 100));
+ }
+
+ /**
+ * @iterations 5000
+ */
+ public function insertFastPriorityQueue()
+ {
+ $this->fastPriorityQueue->insert('foo', rand(1, 100));
+ }
+}
diff --git a/vendor/zendframework/zend-stdlib/benchmark/RemovePriorityQueue.php b/vendor/zendframework/zend-stdlib/benchmark/RemovePriorityQueue.php
new file mode 100644
index 0000000..1cfd35b
--- /dev/null
+++ b/vendor/zendframework/zend-stdlib/benchmark/RemovePriorityQueue.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace ZendBench\Stdlib;
+
+use Athletic\AthleticEvent;
+use Zend\Stdlib\FastPriorityQueue;
+use Zend\Stdlib\PriorityQueue;
+
+class RemovePriorityQueue extends AthleticEvent
+{
+ public function classSetUp()
+ {
+ $this->fastPriorityQueue = new FastPriorityQueue();
+ $this->priorityQueue = new PriorityQueue();
+
+ for ($i = 0; $i < 1000; $i += 1) {
+ $priority = rand(1, 100);
+ $this->fastPriorityQueue->insert('foo', $priority);
+ $this->priorityQueue->insert('foo', $priority);
+ }
+ }
+
+ /**
+ * @iterations 1000
+ */
+ public function removePriorityQueue()
+ {
+ $this->priorityQueue->remove('foo');
+ }
+
+ /**
+ * @iterations 1000
+ */
+ public function removeFastPriorityQueue()
+ {
+ $this->fastPriorityQueue->remove('foo');
+ }
+}
diff --git a/vendor/zendframework/zend-stdlib/composer.json b/vendor/zendframework/zend-stdlib/composer.json
index 056ce3f..4a5ecd5 100644
--- a/vendor/zendframework/zend-stdlib/composer.json
+++ b/vendor/zendframework/zend-stdlib/composer.json
@@ -13,7 +13,8 @@
}
},
"require": {
- "php": ">=5.5"
+ "php": ">=5.5",
+ "zendframework/zend-hydrator": "~1.0"
},
"require-dev": {
"zendframework/zend-config": "~2.5",
@@ -23,7 +24,8 @@
"zendframework/zend-servicemanager": "~2.5",
"zendframework/zend-filter": "~2.5",
"fabpot/php-cs-fixer": "1.7.*",
- "phpunit/PHPUnit": "~4.0"
+ "phpunit/PHPUnit": "~4.0",
+ "athletic/athletic": "~0.1"
},
"suggest": {
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
@@ -35,13 +37,14 @@
"prefer-stable": true,
"extra": {
"branch-alias": {
- "dev-master": "2.6-dev",
- "dev-develop": "2.7-dev"
+ "dev-master": "2.7-dev",
+ "dev-develop": "2.8-dev"
}
},
"autoload-dev": {
"psr-4": {
- "ZendTest\\Stdlib\\": "test/"
+ "ZendTest\\Stdlib\\": "test/",
+ "ZendBench\\Stdlib\\": "benchmark/"
}
}
}
diff --git a/vendor/zendframework/zend-stdlib/src/Extractor/ExtractionInterface.php b/vendor/zendframework/zend-stdlib/src/Extractor/ExtractionInterface.php
index 297d557..6c84720 100644
--- a/vendor/zendframework/zend-stdlib/src/Extractor/ExtractionInterface.php
+++ b/vendor/zendframework/zend-stdlib/src/Extractor/ExtractionInterface.php
@@ -9,13 +9,11 @@
namespace Zend\Stdlib\Extractor;
-interface ExtractionInterface
+use Zend\Hydrator\ExtractionInterface as BaseExtractionInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\ExtractionInterface from zendframework/zend-hydrator instead.
+ */
+interface ExtractionInterface extends BaseExtractionInterface
{
- /**
- * Extract values from an object
- *
- * @param object $object
- * @return array
- */
- public function extract($object);
}
diff --git a/vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php b/vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php
new file mode 100644
index 0000000..16d2bcc
--- /dev/null
+++ b/vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php
@@ -0,0 +1,343 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Iterator;
+use Countable;
+use Serializable;
+use SplPriorityQueue as PhpSplPriorityQueue;
+
+/**
+ * This is an efficient implementation of an integer priority queue in PHP
+ *
+ * This class acts like a queue with insert() and extract(), removing the
+ * elements from the queue and it also acts like an Iterator without removing
+ * the elements. This behaviour can be used in mixed scenarios with high
+ * performance boost.
+ */
+class FastPriorityQueue implements Iterator, Countable, Serializable
+{
+ const EXTR_DATA = PhpSplPriorityQueue::EXTR_DATA;
+ const EXTR_PRIORITY = PhpSplPriorityQueue::EXTR_PRIORITY;
+ const EXTR_BOTH = PhpSplPriorityQueue::EXTR_BOTH;
+
+ /**
+ * @var integer
+ */
+ protected $extractFlag = self::EXTR_DATA;
+
+ /**
+ * Elements of the queue, divided by priorities
+ *
+ * @var array
+ */
+ protected $values = [];
+
+ /**
+ * Array of priorities
+ *
+ * @var array
+ */
+ protected $priorities = [];
+
+ /**
+ * Array of priorities used for the iteration
+ *
+ * @var array
+ */
+ protected $subPriorities = [];
+
+ /**
+ * Max priority
+ *
+ * @var integer
+ */
+ protected $maxPriority = 0;
+
+ /**
+ * Total number of elements in the queue
+ *
+ * @var integer
+ */
+ protected $count = 0;
+
+ /**
+ * Index of the current element in the queue
+ *
+ * @var integer
+ */
+ protected $index = 0;
+
+ /**
+ * Sub index of the current element in the same priority level
+ *
+ * @var integer
+ */
+ protected $subIndex = 0;
+
+ /**
+ * Insert an element in the queue with a specified priority
+ *
+ * @param mixed $value
+ * @param integer $priority a positive integer
+ */
+ public function insert($value, $priority)
+ {
+ if (! is_int($priority)) {
+ throw new Exception\InvalidArgumentException('The priority must be an integer');
+ }
+ $this->values[$priority][] = $value;
+ if (! isset($this->priorities[$priority])) {
+ $this->priorities[$priority] = $priority;
+ $this->maxPriority = max($priority, $this->maxPriority);
+ }
+ ++$this->count;
+ }
+
+ /**
+ * Extract an element in the queue according to the priority and the
+ * order of insertion
+ *
+ * @return mixed
+ */
+ public function extract()
+ {
+ if (! $this->valid()) {
+ return false;
+ }
+ $value = $this->current();
+ $this->nextAndRemove();
+ return $value;
+ }
+
+ /**
+ * Remove an item from the queue
+ *
+ * This is different than {@link extract()}; its purpose is to dequeue an
+ * item.
+ *
+ * Note: this removes the first item matching the provided item found. If
+ * the same item has been added multiple times, it will not remove other
+ * instances.
+ *
+ * @param mixed $datum
+ * @return bool False if the item was not found, true otherwise.
+ */
+ public function remove($datum)
+ {
+ $this->rewind();
+ while ($this->valid()) {
+ if (current($this->values[$this->maxPriority]) === $datum) {
+ $index = key($this->values[$this->maxPriority]);
+ unset($this->values[$this->maxPriority][$index]);
+ --$this->count;
+ return true;
+ }
+ $this->next();
+ }
+ return false;
+ }
+
+ /**
+ * Get the total number of elements in the queue
+ *
+ * @return integer
+ */
+ public function count()
+ {
+ return $this->count;
+ }
+
+ /**
+ * Get the current element in the queue
+ *
+ * @return mixed
+ */
+ public function current()
+ {
+ switch ($this->extractFlag) {
+ case self::EXTR_DATA:
+ return current($this->values[$this->maxPriority]);
+ case self::EXTR_PRIORITY:
+ return $this->maxPriority;
+ case self::EXTR_BOTH:
+ return [
+ 'data' => current($this->values[$this->maxPriority]),
+ 'priority' => $this->maxPriority
+ ];
+ }
+ }
+
+ /**
+ * Get the index of the current element in the queue
+ *
+ * @return integer
+ */
+ public function key()
+ {
+ return $this->index;
+ }
+
+ /**
+ * Set the iterator pointer to the next element in the queue
+ * removing the previous element
+ */
+ protected function nextAndRemove()
+ {
+ if (false === next($this->values[$this->maxPriority])) {
+ unset($this->priorities[$this->maxPriority]);
+ unset($this->values[$this->maxPriority]);
+ $this->maxPriority = empty($this->priorities) ? 0 : max($this->priorities);
+ $this->subIndex = -1;
+ }
+ ++$this->index;
+ ++$this->subIndex;
+ --$this->count;
+ }
+
+ /**
+ * Set the iterator pointer to the next element in the queue
+ * without removing the previous element
+ */
+ public function next()
+ {
+ if (false === next($this->values[$this->maxPriority])) {
+ unset($this->subPriorities[$this->maxPriority]);
+ reset($this->values[$this->maxPriority]);
+ $this->maxPriority = empty($this->subPriorities) ? 0 : max($this->subPriorities);
+ $this->subIndex = -1;
+ }
+ ++$this->index;
+ ++$this->subIndex;
+ }
+
+ /**
+ * Check if the current iterator is valid
+ *
+ * @return boolean
+ */
+ public function valid()
+ {
+ return isset($this->values[$this->maxPriority]);
+ }
+
+ /**
+ * Rewind the current iterator
+ */
+ public function rewind()
+ {
+ $this->subPriorities = $this->priorities;
+ $this->maxPriority = empty($this->priorities) ? 0 : max($this->priorities);
+ $this->index = 0;
+ $this->subIndex = 0;
+ }
+
+ /**
+ * Serialize to an array
+ *
+ * Array will be priority => data pairs
+ *
+ * @return array
+ */
+ public function toArray()
+ {
+ $array = [];
+ foreach (clone $this as $item) {
+ $array[] = $item;
+ }
+ return $array;
+ }
+
+ /**
+ * Serialize
+ *
+ * @return string
+ */
+ public function serialize()
+ {
+ $clone = clone $this;
+ $clone->setExtractFlags(self::EXTR_BOTH);
+
+ $data = [];
+ foreach ($clone as $item) {
+ $data[] = $item;
+ }
+
+ return serialize($data);
+ }
+
+ /**
+ * Deserialize
+ *
+ * @param string $data
+ * @return void
+ */
+ public function unserialize($data)
+ {
+ foreach (unserialize($data) as $item) {
+ $this->insert($item['data'], $item['priority']);
+ }
+ }
+
+ /**
+ * Set the extract flag
+ *
+ * @param integer $flag
+ */
+ public function setExtractFlags($flag)
+ {
+ switch ($flag) {
+ case self::EXTR_DATA:
+ case self::EXTR_PRIORITY:
+ case self::EXTR_BOTH:
+ $this->extractFlag = $flag;
+ break;
+ default:
+ throw new Exception\InvalidArgumentException("The extract flag specified is not valid");
+ }
+ }
+
+ /**
+ * Check if the queue is empty
+ *
+ * @return boolean
+ */
+ public function isEmpty()
+ {
+ return empty($this->values);
+ }
+
+ /**
+ * Does the queue contain the given datum?
+ *
+ * @param mixed $datum
+ * @return bool
+ */
+ public function contains($datum)
+ {
+ foreach ($this->values as $values) {
+ if (in_array($datum, $values)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Does the queue have an item with the given priority?
+ *
+ * @param int $priority
+ * @return bool
+ */
+ public function hasPriority($priority)
+ {
+ return isset($this->values[$priority]);
+ }
+}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/AbstractHydrator.php b/vendor/zendframework/zend-stdlib/src/Hydrator/AbstractHydrator.php
index 338ed80..a4cf08a 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/AbstractHydrator.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/AbstractHydrator.php
@@ -9,279 +9,11 @@
namespace Zend\Stdlib\Hydrator;
-use ArrayObject;
-use Zend\Stdlib\Exception;
-use Zend\Stdlib\Hydrator\Filter\FilterComposite;
-use Zend\Stdlib\Hydrator\NamingStrategy\NamingStrategyInterface;
-use Zend\Stdlib\Hydrator\Strategy\StrategyInterface;
+use Zend\Hydrator\AbstractHydrator as BaseAbstractHydrator;
-abstract class AbstractHydrator implements
- HydratorInterface,
- StrategyEnabledInterface,
- FilterEnabledInterface,
- NamingStrategyEnabledInterface
+/**
+ * @deprecated Use Zend\Hydrator\AbstractHydrator from zendframework/zend-hydrator instead.
+ */
+abstract class AbstractHydrator extends BaseAbstractHydrator implements HydratorInterface
{
- /**
- * The list with strategies that this hydrator has.
- *
- * @var ArrayObject
- */
- protected $strategies;
-
- /**
- * An instance of NamingStrategyInterface
- *
- * @var NamingStrategyInterface
- */
- protected $namingStrategy;
-
- /**
- * Composite to filter the methods, that need to be hydrated
- *
- * @var Filter\FilterComposite
- */
- protected $filterComposite;
-
- /**
- * Initializes a new instance of this class.
- */
- public function __construct()
- {
- $this->strategies = new ArrayObject();
- $this->filterComposite = new FilterComposite();
- }
-
- /**
- * Gets the strategy with the given name.
- *
- * @param string $name The name of the strategy to get.
- *
- * @throws \Zend\Stdlib\Exception\InvalidArgumentException
- * @return StrategyInterface
- */
- public function getStrategy($name)
- {
- if (isset($this->strategies[$name])) {
- return $this->strategies[$name];
- }
-
- if (!isset($this->strategies['*'])) {
- throw new Exception\InvalidArgumentException(sprintf(
- '%s: no strategy by name of "%s", and no wildcard strategy present',
- __METHOD__,
- $name
- ));
- }
-
- return $this->strategies['*'];
- }
-
- /**
- * Checks if the strategy with the given name exists.
- *
- * @param string $name The name of the strategy to check for.
- * @return bool
- */
- public function hasStrategy($name)
- {
- return array_key_exists($name, $this->strategies)
- || array_key_exists('*', $this->strategies);
- }
-
- /**
- * Adds the given strategy under the given name.
- *
- * @param string $name The name of the strategy to register.
- * @param StrategyInterface $strategy The strategy to register.
- * @return HydratorInterface
- */
- public function addStrategy($name, StrategyInterface $strategy)
- {
- $this->strategies[$name] = $strategy;
- return $this;
- }
-
- /**
- * Removes the strategy with the given name.
- *
- * @param string $name The name of the strategy to remove.
- * @return HydratorInterface
- */
- public function removeStrategy($name)
- {
- unset($this->strategies[$name]);
- return $this;
- }
-
- /**
- * Converts a value for extraction. If no strategy exists the plain value is returned.
- *
- * @param string $name The name of the strategy to use.
- * @param mixed $value The value that should be converted.
- * @param mixed $object The object is optionally provided as context.
- * @return mixed
- */
- public function extractValue($name, $value, $object = null)
- {
- if ($this->hasStrategy($name)) {
- $strategy = $this->getStrategy($name);
- $value = $strategy->extract($value, $object);
- }
- return $value;
- }
-
- /**
- * Converts a value for hydration. If no strategy exists the plain value is returned.
- *
- * @param string $name The name of the strategy to use.
- * @param mixed $value The value that should be converted.
- * @param array $data The whole data is optionally provided as context.
- * @return mixed
- */
- public function hydrateValue($name, $value, $data = null)
- {
- if ($this->hasStrategy($name)) {
- $strategy = $this->getStrategy($name);
- $value = $strategy->hydrate($value, $data);
- }
- return $value;
- }
-
- /**
- * Convert a name for extraction. If no naming strategy exists, the plain value is returned.
- *
- * @param string $name The name to convert.
- * @param null $object The object is optionally provided as context.
- * @return mixed
- */
- public function extractName($name, $object = null)
- {
- if ($this->hasNamingStrategy()) {
- $name = $this->getNamingStrategy()->extract($name, $object);
- }
- return $name;
- }
-
- /**
- * Converts a value for hydration. If no naming strategy exists, the plain value is returned.
- *
- * @param string $name The name to convert.
- * @param array $data The whole data is optionally provided as context.
- * @return mixed
- */
- public function hydrateName($name, $data = null)
- {
- if ($this->hasNamingStrategy()) {
- $name = $this->getNamingStrategy()->hydrate($name, $data);
- }
- return $name;
- }
-
- /**
- * Get the filter instance
- *
- * @return Filter\FilterComposite
- */
- public function getFilter()
- {
- return $this->filterComposite;
- }
-
- /**
- * Add a new filter to take care of what needs to be hydrated.
- * To exclude e.g. the method getServiceLocator:
- *
- * <code>
- * $composite->addFilter("servicelocator",
- * function ($property) {
- * list($class, $method) = explode('::', $property);
- * if ($method === 'getServiceLocator') {
- * return false;
- * }
- * return true;
- * }, FilterComposite::CONDITION_AND
- * );
- * </code>
- *
- * @param string $name Index in the composite
- * @param callable|Filter\FilterInterface $filter
- * @param int $condition
- * @return Filter\FilterComposite
- */
- public function addFilter($name, $filter, $condition = FilterComposite::CONDITION_OR)
- {
- return $this->filterComposite->addFilter($name, $filter, $condition);
- }
-
- /**
- * Check whether a specific filter exists at key $name or not
- *
- * @param string $name Index in the composite
- * @return bool
- */
- public function hasFilter($name)
- {
- return $this->filterComposite->hasFilter($name);
- }
-
- /**
- * Remove a filter from the composition.
- * To not extract "has" methods, you simply need to unregister it
- *
- * <code>
- * $filterComposite->removeFilter('has');
- * </code>
- *
- * @param $name
- * @return Filter\FilterComposite
- */
- public function removeFilter($name)
- {
- return $this->filterComposite->removeFilter($name);
- }
-
- /**
- * Adds the given naming strategy
- *
- * @param NamingStrategyInterface $strategy The naming to register.
- * @return self
- */
- public function setNamingStrategy(NamingStrategyInterface $strategy)
- {
- $this->namingStrategy = $strategy;
-
- return $this;
- }
-
- /**
- * Gets the naming strategy.
- *
- * @return NamingStrategyInterface
- */
- public function getNamingStrategy()
- {
- return $this->namingStrategy;
- }
-
- /**
- * Checks if a naming strategy exists.
- *
- * @return bool
- */
- public function hasNamingStrategy()
- {
- return isset($this->namingStrategy);
- }
-
- /**
- * Removes the naming strategy
- *
- * @return self
- */
- public function removeNamingStrategy()
- {
- $this->namingStrategy = null;
-
- return $this;
- }
}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php b/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php
index 6bba864..62c6b32 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php
@@ -9,77 +9,14 @@
namespace Zend\Stdlib\Hydrator\Aggregate;
-use Zend\EventManager\EventManager;
-use Zend\EventManager\EventManagerAwareInterface;
-use Zend\EventManager\EventManagerInterface;
+use Zend\Hydrator\Aggregate\AggregateHydrator as BaseAggregateHydrator;
use Zend\Stdlib\Hydrator\HydratorInterface;
/**
* Aggregate hydrator that composes multiple hydrators via events
+ *
+ * @deprecated Use Zend\Hydrator\Aggregate\AggregateHydrator from zendframework/zend-hydrator instead.
*/
-class AggregateHydrator implements HydratorInterface, EventManagerAwareInterface
+class AggregateHydrator extends BaseAggregateHydrator implements HydratorInterface
{
- const DEFAULT_PRIORITY = 1;
-
- /**
- * @var \Zend\EventManager\EventManagerInterface|null
- */
- protected $eventManager;
-
- /**
- * Attaches the provided hydrator to the list of hydrators to be used while hydrating/extracting data
- *
- * @param \Zend\Stdlib\Hydrator\HydratorInterface $hydrator
- * @param int $priority
- */
- public function add(HydratorInterface $hydrator, $priority = self::DEFAULT_PRIORITY)
- {
- $this->getEventManager()->attachAggregate(new HydratorListener($hydrator), $priority);
- }
-
- /**
- * {@inheritDoc}
- */
- public function extract($object)
- {
- $event = new ExtractEvent($this, $object);
-
- $this->getEventManager()->trigger($event);
-
- return $event->getExtractedData();
- }
-
- /**
- * {@inheritDoc}
- */
- public function hydrate(array $data, $object)
- {
- $event = new HydrateEvent($this, $object, $data);
-
- $this->getEventManager()->trigger($event);
-
- return $event->getHydratedObject();
- }
-
- /**
- * {@inheritDoc}
- */
- public function setEventManager(EventManagerInterface $eventManager)
- {
- $eventManager->setIdentifiers([__CLASS__, get_class($this)]);
-
- $this->eventManager = $eventManager;
- }
-
- /**
- * {@inheritDoc}
- */
- public function getEventManager()
- {
- if (null === $this->eventManager) {
- $this->setEventManager(new EventManager());
- }
-
- return $this->eventManager;
- }
}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/ExtractEvent.php b/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/ExtractEvent.php
index a826710..9563efb 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/ExtractEvent.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/ExtractEvent.php
@@ -9,90 +9,14 @@
namespace Zend\Stdlib\Hydrator\Aggregate;
-use Zend\EventManager\Event;
+use Zend\Hydrator\Aggregate\ExtractEvent as BaseExtractEvent;
/**
* Event triggered when the {@see \Zend\Stdlib\Hydrator\Aggregate\AggregateHydrator} extracts
* data from an object
+ *
+ * @deprecated Use Zend\Hydrator\Aggregate\ExtractEvent from zendframework/zend-hydrator instead.
*/
-class ExtractEvent extends Event
+class ExtractEvent extends BaseExtractEvent
{
- const EVENT_EXTRACT = 'extract';
-
- /**
- * {@inheritDoc}
- */
- protected $name = self::EVENT_EXTRACT;
-
- /**
- * @var object
- */
- protected $extractionObject;
-
- /**
- * @var array
- */
- protected $extractedData = [];
-
- /**
- * @param object $target
- * @param object $extractionObject
- */
- public function __construct($target, $extractionObject)
- {
- $this->target = $target;
- $this->extractionObject = $extractionObject;
- }
-
- /**
- * Retrieves the object from which data is extracted
- *
- * @return object
- */
- public function getExtractionObject()
- {
- return $this->extractionObject;
- }
-
- /**
- * @param object $extractionObject
- *
- * @return void
- */
- public function setExtractionObject($extractionObject)
- {
- $this->extractionObject = $extractionObject;
- }
-
- /**
- * Retrieves the data that has been extracted
- *
- * @return array
- */
- public function getExtractedData()
- {
- return $this->extractedData;
- }
-
- /**
- * @param array $extractedData
- *
- * @return void
- */
- public function setExtractedData(array $extractedData)
- {
- $this->extractedData = $extractedData;
- }
-
- /**
- * Merge provided data with the extracted data
- *
- * @param array $additionalData
- *
- * @return void
- */
- public function mergeExtractedData(array $additionalData)
- {
- $this->extractedData = array_merge($this->extractedData, $additionalData);
- }
}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydrateEvent.php b/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydrateEvent.php
index a7c91ee..29c9fd6 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydrateEvent.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydrateEvent.php
@@ -9,76 +9,14 @@
namespace Zend\Stdlib\Hydrator\Aggregate;
-use Zend\EventManager\Event;
+use Zend\Hydrator\Aggregate\HydrateEvent as BaseHydrateEvent;
/**
* Event triggered when the {@see \Zend\Stdlib\Hydrator\Aggregate\AggregateHydrator} hydrates
* data into an object
+ *
+ * @deprecated Use Zend\Hydrator\Aggregate\HydrateEvent from zendframework/zend-hydrator instead.
*/
-class HydrateEvent extends Event
+class HydrateEvent extends BaseHydrateEvent
{
- const EVENT_HYDRATE = 'hydrate';
-
- /**
- * {@inheritDoc}
- */
- protected $name = self::EVENT_HYDRATE;
-
- /**
- * @var object
- */
- protected $hydratedObject;
-
- /**
- * @var array
- */
- protected $hydrationData;
-
- /**
- * @param object $target
- * @param object $hydratedObject
- * @param array $hydrationData
- */
- public function __construct($target, $hydratedObject, array $hydrationData)
- {
- $this->target = $target;
- $this->hydratedObject = $hydratedObject;
- $this->hydrationData = $hydrationData;
- }
-
- /**
- * Retrieves the object that is being hydrated
- *
- * @return object
- */
- public function getHydratedObject()
- {
- return $this->hydratedObject;
- }
-
- /**
- * @param object $hydratedObject
- */
- public function setHydratedObject($hydratedObject)
- {
- $this->hydratedObject = $hydratedObject;
- }
-
- /**
- * Retrieves the data that is being used for hydration
- *
- * @return array
- */
- public function getHydrationData()
- {
- return $this->hydrationData;
- }
-
- /**
- * @param array $hydrationData
- */
- public function setHydrationData(array $hydrationData)
- {
- $this->hydrationData = $hydrationData;
- }
}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydratorListener.php b/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydratorListener.php
index 84c8c12..e15cae4 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydratorListener.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydratorListener.php
@@ -9,72 +9,15 @@
namespace Zend\Stdlib\Hydrator\Aggregate;
-use Zend\EventManager\AbstractListenerAggregate;
-use Zend\EventManager\EventManagerInterface;
-use Zend\Stdlib\Hydrator\HydratorInterface;
+use Zend\Hydrator\Aggregate\HydratorListener as BaseHydratorListener;
/**
* Aggregate listener wrapping around a hydrator. Listens
* to {@see \Zend\Stdlib\Hydrator\Aggregate::EVENT_HYDRATE} and
* {@see \Zend\Stdlib\Hydrator\Aggregate::EVENT_EXTRACT}
+ *
+ * @deprecated Use Zend\Hydrator\Aggregate\HydratorListener from zendframework/zend-hydrator instead.
*/
-class HydratorListener extends AbstractListenerAggregate
+class HydratorListener extends BaseHydratorListener
{
- /**
- * @var \Zend\Stdlib\Hydrator\HydratorInterface
- */
- protected $hydrator;
-
- /**
- * @param \Zend\Stdlib\Hydrator\HydratorInterface $hydrator
- */
- public function __construct(HydratorInterface $hydrator)
- {
- $this->hydrator = $hydrator;
- }
-
- /**
- * {@inheritDoc}
- */
- public function attach(EventManagerInterface $events, $priority = 1)
- {
- $this->listeners[] = $events->attach(HydrateEvent::EVENT_HYDRATE, [$this, 'onHydrate'], $priority);
- $this->listeners[] = $events->attach(ExtractEvent::EVENT_EXTRACT, [$this, 'onExtract'], $priority);
- }
-
- /**
- * Callback to be used when {@see \Zend\Stdlib\Hydrator\Aggregate\HydrateEvent::EVENT_HYDRATE} is triggered
- *
- * @param \Zend\Stdlib\Hydrator\Aggregate\HydrateEvent $event
- *
- * @return object
- *
- * @internal
- */
- public function onHydrate(HydrateEvent $event)
- {
- $object = $this->hydrator->hydrate($event->getHydrationData(), $event->getHydratedObject());
-
- $event->setHydratedObject($object);
-
- return $object;
- }
-
- /**
- * Callback to be used when {@see \Zend\Stdlib\Hydrator\Aggregate\ExtractEvent::EVENT_EXTRACT} is triggered
- *
- * @param \Zend\Stdlib\Hydrator\Aggregate\ExtractEvent $event
- *
- * @return array
- *
- * @internal
- */
- public function onExtract(ExtractEvent $event)
- {
- $data = $this->hydrator->extract($event->getExtractionObject());
-
- $event->mergeExtractedData($data);
-
- return $data;
- }
}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/ArraySerializable.php b/vendor/zendframework/zend-stdlib/src/Hydrator/ArraySerializable.php
index eb75e22..415a44d 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/ArraySerializable.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/ArraySerializable.php
@@ -9,75 +9,11 @@
namespace Zend\Stdlib\Hydrator;
-use Zend\Stdlib\Exception;
+use Zend\Hydrator\ArraySerializable as BaseArraySerializable;
-class ArraySerializable extends AbstractHydrator
+/**
+ * @deprecated Use Zend\Hydrator\ArraySerializable from zendframework/zend-hydrator instead.
+ */
+class ArraySerializable extends BaseArraySerializable implements HydratorInterface
{
- /**
- * Extract values from the provided object
- *
- * Extracts values via the object's getArrayCopy() method.
- *
- * @param object $object
- * @return array
- * @throws Exception\BadMethodCallException for an $object not implementing getArrayCopy()
- */
- public function extract($object)
- {
- if (!is_callable([$object, 'getArrayCopy'])) {
- throw new Exception\BadMethodCallException(
- sprintf('%s expects the provided object to implement getArrayCopy()', __METHOD__)
- );
- }
-
- $data = $object->getArrayCopy();
- $filter = $this->getFilter();
-
- foreach ($data as $name => $value) {
- if (!$filter->filter($name)) {
- unset($data[$name]);
- continue;
- }
- $extractedName = $this->extractName($name, $object);
- // replace the original key with extracted, if differ
- if ($extractedName !== $name) {
- unset($data[$name]);
- $name = $extractedName;
- }
- $data[$name] = $this->extractValue($name, $value, $object);
- }
-
- return $data;
- }
-
- /**
- * Hydrate an object
- *
- * Hydrates an object by passing $data to either its exchangeArray() or
- * populate() method.
- *
- * @param array $data
- * @param object $object
- * @return object
- * @throws Exception\BadMethodCallException for an $object not implementing exchangeArray() or populate()
- */
- public function hydrate(array $data, $object)
- {
- $replacement = [];
- foreach ($data as $key => $value) {
- $name = $this->hydrateName($key, $data);
- $replacement[$name] = $this->hydrateValue($name, $value, $data);
- }
-
- if (is_callable([$object, 'exchangeArray'])) {
- $object->exchangeArray($replacement);
- } elseif (is_callable([$object, 'populate'])) {
- $object->populate($replacement);
- } else {
- throw new Exception\BadMethodCallException(
- sprintf('%s expects the provided object to implement exchangeArray() or populate()', __METHOD__)
- );
- }
- return $object;
- }
}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php b/vendor/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php
index f95b0d1..ee6bdad 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php
@@ -9,266 +9,11 @@
namespace Zend\Stdlib\Hydrator;
-use Traversable;
-use Zend\Stdlib\Exception;
-use Zend\Stdlib\ArrayUtils;
-use Zend\Stdlib\Hydrator\Filter\FilterComposite;
-use Zend\Stdlib\Hydrator\Filter\FilterProviderInterface;
-use Zend\Stdlib\Hydrator\Filter\GetFilter;
-use Zend\Stdlib\Hydrator\Filter\HasFilter;
-use Zend\Stdlib\Hydrator\Filter\IsFilter;
-use Zend\Stdlib\Hydrator\Filter\MethodMatchFilter;
-use Zend\Stdlib\Hydrator\Filter\OptionalParametersFilter;
-use Zend\Stdlib\Hydrator\NamingStrategy\NamingStrategyInterface;
-use Zend\Stdlib\Hydrator\NamingStrategy\UnderscoreNamingStrategy;
+use Zend\Hydrator\ClassMethods as BaseClassMethods;
-class ClassMethods extends AbstractHydrator implements HydratorOptionsInterface
+/**
+ * @deprecated Use Zend\Hydrator\ClassMethods from zendframework/zend-hydrator instead.
+ */
+class ClassMethods extends BaseClassMethods implements HydratorInterface, HydratorOptionsInterface
{
- /**
- * Holds the names of the methods used for hydration, indexed by class::property name,
- * false if the hydration method is not callable/usable for hydration purposes
- *
- * @var string[]|bool[]
- */
- private $hydrationMethodsCache = [];
-
- /**
- * A map of extraction methods to property name to be used during extraction, indexed
- * by class name and method name
- *
- * @var string[][]
- */
- private $extractionMethodsCache = [];
-
- /**
- * Flag defining whether array keys are underscore-separated (true) or camel case (false)
- *
- * @var bool
- */
- protected $underscoreSeparatedKeys = true;
-
- /**
- * @var \Zend\Stdlib\Hydrator\Filter\FilterInterface
- */
- private $callableMethodFilter;
-
- /**
- * Define if extract values will use camel case or name with underscore
- * @param bool|array $underscoreSeparatedKeys
- */
- public function __construct($underscoreSeparatedKeys = true)
- {
- parent::__construct();
- $this->setUnderscoreSeparatedKeys($underscoreSeparatedKeys);
-
- $this->callableMethodFilter = new OptionalParametersFilter();
-
- $this->filterComposite->addFilter('is', new IsFilter());
- $this->filterComposite->addFilter('has', new HasFilter());
- $this->filterComposite->addFilter('get', new GetFilter());
- $this->filterComposite->addFilter('parameter', new OptionalParametersFilter(), FilterComposite::CONDITION_AND);
- }
-
- /**
- * @param array|Traversable $options
- * @return ClassMethods
- * @throws Exception\InvalidArgumentException
- */
- public function setOptions($options)
- {
- if ($options instanceof Traversable) {
- $options = ArrayUtils::iteratorToArray($options);
- } elseif (!is_array($options)) {
- throw new Exception\InvalidArgumentException(
- 'The options parameter must be an array or a Traversable'
- );
- }
- if (isset($options['underscoreSeparatedKeys'])) {
- $this->setUnderscoreSeparatedKeys($options['underscoreSeparatedKeys']);
- }
-
- return $this;
- }
-
- /**
- * @param bool $underscoreSeparatedKeys
- * @return ClassMethods
- */
- public function setUnderscoreSeparatedKeys($underscoreSeparatedKeys)
- {
- $this->underscoreSeparatedKeys = (bool) $underscoreSeparatedKeys;
-
- if ($this->underscoreSeparatedKeys) {
- $this->setNamingStrategy(new UnderscoreNamingStrategy);
- } elseif ($this->getNamingStrategy() instanceof UnderscoreNamingStrategy) {
- $this->removeNamingStrategy();
- }
-
- return $this;
- }
-
- /**
- * @return bool
- */
- public function getUnderscoreSeparatedKeys()
- {
- return $this->underscoreSeparatedKeys;
- }
-
- /**
- * Extract values from an object with class methods
- *
- * Extracts the getter/setter of the given $object.
- *
- * @param object $object
- * @return array
- * @throws Exception\BadMethodCallException for a non-object $object
- */
- public function extract($object)
- {
- if (!is_object($object)) {
- throw new Exception\BadMethodCallException(sprintf(
- '%s expects the provided $object to be a PHP object)',
- __METHOD__
- ));
- }
-
- $objectClass = get_class($object);
-
- // reset the hydrator's hydrator's cache for this object, as the filter may be per-instance
- if ($object instanceof FilterProviderInterface) {
- $this->extractionMethodsCache[$objectClass] = null;
- }
-
- // pass 1 - finding out which properties can be extracted, with which methods (populate hydration cache)
- if (! isset($this->extractionMethodsCache[$objectClass])) {
- $this->extractionMethodsCache[$objectClass] = [];
- $filter = $this->filterComposite;
- $methods = get_class_methods($object);
-
- if ($object instanceof FilterProviderInterface) {
- $filter = new FilterComposite(
- [$object->getFilter()],
- [new MethodMatchFilter('getFilter')]
- );
- }
-
- foreach ($methods as $method) {
- $methodFqn = $objectClass . '::' . $method;
-
- if (! ($filter->filter($methodFqn) && $this->callableMethodFilter->filter($methodFqn))) {
- continue;
- }
-
- $attribute = $method;
-
- if (strpos($method, 'get') === 0) {
- $attribute = substr($method, 3);
- if (!property_exists($object, $attribute)) {
- $attribute = lcfirst($attribute);
- }
- }
-
- $this->extractionMethodsCache[$objectClass][$method] = $attribute;
- }
- }
-
- $values = [];
-
- // pass 2 - actually extract data
- foreach ($this->extractionMethodsCache[$objectClass] as $methodName => $attributeName) {
- $realAttributeName = $this->extractName($attributeName, $object);
- $values[$realAttributeName] = $this->extractValue($realAttributeName, $object->$methodName(), $object);
- }
-
- return $values;
- }
-
- /**
- * Hydrate an object by populating getter/setter methods
- *
- * Hydrates an object by getter/setter methods of the object.
- *
- * @param array $data
- * @param object $object
- * @return object
- * @throws Exception\BadMethodCallException for a non-object $object
- */
- public function hydrate(array $data, $object)
- {
- if (!is_object($object)) {
- throw new Exception\BadMethodCallException(sprintf(
- '%s expects the provided $object to be a PHP object)',
- __METHOD__
- ));
- }
-
- $objectClass = get_class($object);
-
- foreach ($data as $property => $value) {
- $propertyFqn = $objectClass . '::$' . $property;
-
- if (! isset($this->hydrationMethodsCache[$propertyFqn])) {
- $setterName = 'set' . ucfirst($this->hydrateName($property, $data));
-
- $this->hydrationMethodsCache[$propertyFqn] = is_callable([$object, $setterName])
- ? $setterName
- : false;
- }
-
- if ($this->hydrationMethodsCache[$propertyFqn]) {
- $object->{$this->hydrationMethodsCache[$propertyFqn]}($this->hydrateValue($property, $value, $data));
- }
- }
-
- return $object;
- }
-
- /**
- * {@inheritDoc}
- */
- public function addFilter($name, $filter, $condition = FilterComposite::CONDITION_OR)
- {
- $this->resetCaches();
-
- return parent::addFilter($name, $filter, $condition);
- }
-
- /**
- * {@inheritDoc}
- */
- public function removeFilter($name)
- {
- $this->resetCaches();
-
- return parent::removeFilter($name);
- }
-
- /**
- * {@inheritDoc}
- */
- public function setNamingStrategy(NamingStrategyInterface $strategy)
- {
- $this->resetCaches();
-
- return parent::setNamingStrategy($strategy);
- }
-
- /**
- * {@inheritDoc}
- */
- public function removeNamingStrategy()
- {
- $this->resetCaches();
-
- return parent::removeNamingStrategy();
- }
-
- /**
- * Reset all local hydration/extraction caches
- */
- private function resetCaches()
- {
- $this->hydrationMethodsCache = $this->extractionMethodsCache = [];
- }
}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydrator.php b/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydrator.php
index db234d3..eb65d95 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydrator.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydrator.php
@@ -9,49 +9,11 @@
namespace Zend\Stdlib\Hydrator;
-use Zend\ServiceManager\ServiceLocatorInterface;
+use Zend\Hydrator\DelegatingHydrator as BaseDelegatingHydrator;
-class DelegatingHydrator implements HydratorInterface
+/**
+ * @deprecated Use Zend\Hydrator\DelegatingHydrator from zendframework/zend-hydrator instead.
+ */
+class DelegatingHydrator extends BaseDelegatingHydrator implements HydratorInterface
{
- /**
- * @var ServiceLocatorInterface
- */
- protected $hydrators;
-
- /**
- * Constructor
- *
- * @param ServiceLocatorInterface $hydrators
- */
- public function __construct(ServiceLocatorInterface $hydrators)
- {
- $this->hydrators = $hydrators;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hydrate(array $data, $object)
- {
- return $this->getHydrator($object)->hydrate($data, $object);
- }
-
- /**
- * {@inheritdoc}
- */
- public function extract($object)
- {
- return $this->getHydrator($object)->extract($object);
- }
-
- /**
- * Gets hydrator of an object
- *
- * @param object $object
- * @return HydratorInterface
- */
- protected function getHydrator($object)
- {
- return $this->hydrators->get(get_class($object));
- }
}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydratorFactory.php b/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydratorFactory.php
index c3a0da2..170308d 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydratorFactory.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydratorFactory.php
@@ -9,21 +9,11 @@
namespace Zend\Stdlib\Hydrator;
-use Zend\ServiceManager\FactoryInterface;
-use Zend\ServiceManager\ServiceLocatorInterface;
+use Zend\Hydrator\DelegatingHydratorFactory as BaseDelegatingHydratorFactory;
-class DelegatingHydratorFactory implements FactoryInterface
+/**
+ * @deprecated Use Zend\Hydrator\DelegatingHydratorFactory from zendframework/zend-hydrator instead.
+ */
+class DelegatingHydratorFactory extends BaseDelegatingHydratorFactory
{
- /**
- * Creates DelegatingHydrator
- *
- * @param ServiceLocatorInterface $serviceLocator
- * @return DelegatingHydrator
- */
- public function createService(ServiceLocatorInterface $serviceLocator)
- {
- // Assume that this factory is registered with the HydratorManager,
- // and just pass it directly on.
- return new DelegatingHydrator($serviceLocator);
- }
}
diff --git a/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterComposite.php b/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterComposite.php
index f9d4c56..b230c97 100644
--- a/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterComposite.php
+++ b/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterComposite.php
@@ -8,189 +8,11 @@
*/
namespace Zend\Stdlib\Hydrator\Filter;
-use ArrayObject;
-use Zend\Stdlib\Exception\InvalidArgumentException;
+use Zend\Hydrator\Filter\FilterComposite as BaseFilterComposite;
-class FilterComposite implements FilterInterface
+/**
+ * @deprecated Use Zend\Hydrator\Filter\FilterComposite from zendframework/zend-hydrator instead.
+ */
+class FilterComposite extends BaseFilterComposite implements FilterInterface
{
- /**
- * @var ArrayObject
- */
- protected $orFilter;
-
- /**
- * @var ArrayObject
- */
- protected $andFilter;
-
- /**
- * Constant to add with "or" conditition
- */
- const CONDITION_OR = 1;
-
- /**
- * Constant to add with "and" conditition
- */
- const CONDITION_AND = 2;
-
- /**
- * Define default Filter
- *
- * @param array $orFilter
- * @param array $andFilter
- * @throws InvalidArgumentException
- */
- public function __construct($orFilter = [], $andFilter = [])
- {
- array_walk(