From 3a6a52ab71e705a3395bff2dacca1ad0f6a82a47 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Jan 2018 10:20:47 -0600 Subject: [PATCH 1/5] bugfixes --- composer.json | 6 +- composer.lock | 136 ++ library/Vmwarephp/Exception/Soap.php | 15 +- library/Vmwarephp/Factory/SoapClient.php | 26 +- vendor/composer/installed.json | 119 ++ vendor/hamcrest/hamcrest-php/.coveralls.yml | 1 + vendor/hamcrest/hamcrest-php/.gitignore | 1 + vendor/hamcrest/hamcrest-php/.gush.yml | 7 + vendor/hamcrest/hamcrest-php/.travis.yml | 24 + vendor/hamcrest/hamcrest-php/CHANGES.txt | 167 ++ vendor/hamcrest/hamcrest-php/LICENSE.txt | 27 + vendor/hamcrest/hamcrest-php/README.md | 53 + vendor/hamcrest/hamcrest-php/TODO.txt | 22 + vendor/hamcrest/hamcrest-php/composer.json | 38 + vendor/hamcrest/hamcrest-php/composer.lock | 1493 +++++++++++++++++ .../hamcrest-php/generator/FactoryCall.php | 41 + .../hamcrest-php/generator/FactoryClass.php | 72 + .../hamcrest-php/generator/FactoryFile.php | 122 ++ .../generator/FactoryGenerator.php | 115 ++ .../hamcrest-php/generator/FactoryMethod.php | 231 +++ .../generator/FactoryParameter.php | 69 + .../generator/GlobalFunctionFile.php | 42 + .../generator/StaticMethodFile.php | 38 + .../generator/parts/file_header.txt | 7 + .../generator/parts/functions_footer.txt | 0 .../generator/parts/functions_header.txt | 24 + .../generator/parts/functions_imports.txt | 0 .../generator/parts/matchers_footer.txt | 1 + .../generator/parts/matchers_header.txt | 7 + .../generator/parts/matchers_imports.txt | 2 + .../hamcrest/hamcrest-php/generator/run.php | 37 + .../hamcrest-php/hamcrest/Hamcrest.php | 805 +++++++++ .../hamcrest/Hamcrest/Arrays/IsArray.php | 118 ++ .../Hamcrest/Arrays/IsArrayContaining.php | 63 + .../Arrays/IsArrayContainingInAnyOrder.php | 59 + .../Arrays/IsArrayContainingInOrder.php | 57 + .../Hamcrest/Arrays/IsArrayContainingKey.php | 75 + .../Arrays/IsArrayContainingKeyValuePair.php | 80 + .../Hamcrest/Arrays/IsArrayWithSize.php | 73 + .../hamcrest/Hamcrest/Arrays/MatchingOnce.php | 69 + .../Hamcrest/Arrays/SeriesMatchingOnce.php | 75 + .../hamcrest/Hamcrest/AssertionError.php | 10 + .../hamcrest/Hamcrest/BaseDescription.php | 132 ++ .../hamcrest/Hamcrest/BaseMatcher.php | 25 + .../Collection/IsEmptyTraversable.php | 71 + .../Collection/IsTraversableWithSize.php | 47 + .../hamcrest/Hamcrest/Core/AllOf.php | 59 + .../hamcrest/Hamcrest/Core/AnyOf.php | 58 + .../Hamcrest/Core/CombinableMatcher.php | 78 + .../hamcrest/Hamcrest/Core/DescribedAs.php | 68 + .../hamcrest/Hamcrest/Core/Every.php | 56 + .../hamcrest/Hamcrest/Core/HasToString.php | 56 + .../hamcrest/Hamcrest/Core/Is.php | 57 + .../hamcrest/Hamcrest/Core/IsAnything.php | 45 + .../Hamcrest/Core/IsCollectionContaining.php | 93 + .../hamcrest/Hamcrest/Core/IsEqual.php | 44 + .../hamcrest/Hamcrest/Core/IsIdentical.php | 38 + .../hamcrest/Hamcrest/Core/IsInstanceOf.php | 67 + .../hamcrest/Hamcrest/Core/IsNot.php | 44 + .../hamcrest/Hamcrest/Core/IsNull.php | 56 + .../hamcrest/Hamcrest/Core/IsSame.php | 51 + .../hamcrest/Hamcrest/Core/IsTypeOf.php | 71 + .../hamcrest/Hamcrest/Core/Set.php | 95 ++ .../Hamcrest/Core/ShortcutCombination.php | 43 + .../hamcrest/Hamcrest/Description.php | 70 + .../hamcrest/Hamcrest/DiagnosingMatcher.php | 25 + .../hamcrest/Hamcrest/FeatureMatcher.php | 67 + .../Hamcrest/Internal/SelfDescribingValue.php | 27 + .../hamcrest/Hamcrest/Matcher.php | 50 + .../hamcrest/Hamcrest/MatcherAssert.php | 118 ++ .../hamcrest/Hamcrest/Matchers.php | 713 ++++++++ .../hamcrest/Hamcrest/NullDescription.php | 43 + .../hamcrest/Hamcrest/Number/IsCloseTo.php | 67 + .../Hamcrest/Number/OrderingComparison.php | 132 ++ .../hamcrest/Hamcrest/SelfDescribing.php | 23 + .../hamcrest/Hamcrest/StringDescription.php | 57 + .../hamcrest/Hamcrest/Text/IsEmptyString.php | 85 + .../Hamcrest/Text/IsEqualIgnoringCase.php | 52 + .../Text/IsEqualIgnoringWhiteSpace.php | 66 + .../hamcrest/Hamcrest/Text/MatchesPattern.php | 40 + .../hamcrest/Hamcrest/Text/StringContains.php | 45 + .../Text/StringContainsIgnoringCase.php | 40 + .../Hamcrest/Text/StringContainsInOrder.php | 66 + .../hamcrest/Hamcrest/Text/StringEndsWith.php | 40 + .../Hamcrest/Text/StringStartsWith.php | 40 + .../Hamcrest/Text/SubstringMatcher.php | 45 + .../hamcrest/Hamcrest/Type/IsArray.php | 32 + .../hamcrest/Hamcrest/Type/IsBoolean.php | 32 + .../hamcrest/Hamcrest/Type/IsCallable.php | 37 + .../hamcrest/Hamcrest/Type/IsDouble.php | 34 + .../hamcrest/Hamcrest/Type/IsInteger.php | 32 + .../hamcrest/Hamcrest/Type/IsNumeric.php | 54 + .../hamcrest/Hamcrest/Type/IsObject.php | 32 + .../hamcrest/Hamcrest/Type/IsResource.php | 32 + .../hamcrest/Hamcrest/Type/IsScalar.php | 34 + .../hamcrest/Hamcrest/Type/IsString.php | 32 + .../Hamcrest/TypeSafeDiagnosingMatcher.php | 29 + .../hamcrest/Hamcrest/TypeSafeMatcher.php | 107 ++ .../hamcrest-php/hamcrest/Hamcrest/Util.php | 76 + .../hamcrest/Hamcrest/Xml/HasXPath.php | 195 +++ .../tests/Hamcrest/AbstractMatcherTest.php | 66 + .../Array/IsArrayContainingInAnyOrderTest.php | 54 + .../Array/IsArrayContainingInOrderTest.php | 44 + .../Array/IsArrayContainingKeyTest.php | 62 + .../IsArrayContainingKeyValuePairTest.php | 36 + .../Hamcrest/Array/IsArrayContainingTest.php | 50 + .../tests/Hamcrest/Array/IsArrayTest.php | 89 + .../Hamcrest/Array/IsArrayWithSizeTest.php | 37 + .../tests/Hamcrest/BaseMatcherTest.php | 23 + .../Collection/IsEmptyTraversableTest.php | 77 + .../Collection/IsTraversableWithSizeTest.php | 57 + .../tests/Hamcrest/Core/AllOfTest.php | 56 + .../tests/Hamcrest/Core/AnyOfTest.php | 79 + .../Hamcrest/Core/CombinableMatcherTest.php | 59 + .../tests/Hamcrest/Core/DescribedAsTest.php | 36 + .../tests/Hamcrest/Core/EveryTest.php | 30 + .../tests/Hamcrest/Core/HasToStringTest.php | 108 ++ .../tests/Hamcrest/Core/IsAnythingTest.php | 29 + .../Core/IsCollectionContainingTest.php | 91 + .../tests/Hamcrest/Core/IsEqualTest.php | 102 ++ .../tests/Hamcrest/Core/IsIdenticalTest.php | 30 + .../tests/Hamcrest/Core/IsInstanceOfTest.php | 51 + .../tests/Hamcrest/Core/IsNotTest.php | 31 + .../tests/Hamcrest/Core/IsNullTest.php | 20 + .../tests/Hamcrest/Core/IsSameTest.php | 30 + .../tests/Hamcrest/Core/IsTest.php | 33 + .../tests/Hamcrest/Core/IsTypeOfTest.php | 45 + .../tests/Hamcrest/Core/SampleBaseClass.php | 18 + .../tests/Hamcrest/Core/SampleSubClass.php | 6 + .../tests/Hamcrest/Core/SetTest.php | 116 ++ .../tests/Hamcrest/FeatureMatcherTest.php | 73 + .../tests/Hamcrest/MatcherAssertTest.php | 190 +++ .../tests/Hamcrest/Number/IsCloseToTest.php | 27 + .../Number/OrderingComparisonTest.php | 41 + .../tests/Hamcrest/StringDescriptionTest.php | 160 ++ .../tests/Hamcrest/Text/IsEmptyStringTest.php | 86 + .../Hamcrest/Text/IsEqualIgnoringCaseTest.php | 40 + .../Text/IsEqualIgnoringWhiteSpaceTest.php | 51 + .../Hamcrest/Text/MatchesPatternTest.php | 30 + .../Text/StringContainsIgnoringCaseTest.php | 80 + .../Text/StringContainsInOrderTest.php | 42 + .../Hamcrest/Text/StringContainsTest.php | 86 + .../Hamcrest/Text/StringEndsWithTest.php | 62 + .../Hamcrest/Text/StringStartsWithTest.php | 62 + .../tests/Hamcrest/Type/IsArrayTest.php | 35 + .../tests/Hamcrest/Type/IsBooleanTest.php | 35 + .../tests/Hamcrest/Type/IsCallableTest.php | 103 ++ .../tests/Hamcrest/Type/IsDoubleTest.php | 35 + .../tests/Hamcrest/Type/IsIntegerTest.php | 36 + .../tests/Hamcrest/Type/IsNumericTest.php | 53 + .../tests/Hamcrest/Type/IsObjectTest.php | 34 + .../tests/Hamcrest/Type/IsResourceTest.php | 34 + .../tests/Hamcrest/Type/IsScalarTest.php | 39 + .../tests/Hamcrest/Type/IsStringTest.php | 35 + .../hamcrest-php/tests/Hamcrest/UtilTest.php | 80 + .../tests/Hamcrest/Xml/HasXPathTest.php | 198 +++ .../hamcrest/hamcrest-php/tests/bootstrap.php | 11 + .../hamcrest-php/tests/phpunit.xml.dist | 22 + vendor/mockery/mockery | 1 + 159 files changed, 11779 insertions(+), 17 deletions(-) create mode 100644 composer.lock create mode 100644 vendor/composer/installed.json create mode 100644 vendor/hamcrest/hamcrest-php/.coveralls.yml create mode 100644 vendor/hamcrest/hamcrest-php/.gitignore create mode 100644 vendor/hamcrest/hamcrest-php/.gush.yml create mode 100644 vendor/hamcrest/hamcrest-php/.travis.yml create mode 100644 vendor/hamcrest/hamcrest-php/CHANGES.txt create mode 100644 vendor/hamcrest/hamcrest-php/LICENSE.txt create mode 100644 vendor/hamcrest/hamcrest-php/README.md create mode 100644 vendor/hamcrest/hamcrest-php/TODO.txt create mode 100644 vendor/hamcrest/hamcrest-php/composer.json create mode 100644 vendor/hamcrest/hamcrest-php/composer.lock create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryCall.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryClass.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryFile.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/functions_footer.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/functions_header.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/run.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsSameTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SetTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/StringDescriptionTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/bootstrap.php create mode 100644 vendor/hamcrest/hamcrest-php/tests/phpunit.xml.dist create mode 160000 vendor/mockery/mockery diff --git a/composer.json b/composer.json index b8d032b..71b0fb7 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "require-dev":{ "mockery/mockery":"dev-master" }, - "autoload": { - "psr-0": { "Vmwarephp": "library" } - } + "autoload": { + "psr-0": { "Vmwarephp": "library" } + } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..13b73c0 --- /dev/null +++ b/composer.lock @@ -0,0 +1,136 @@ +{ + "_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": "0b56668dbf486a399bdf1b739c157100", + "content-hash": "18ae8f1ff0d3238cb784b3de5ba7273a", + "packages": [], + "packages-dev": [ + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2016-01-20 08:20:44" + }, + { + "name": "mockery/mockery", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "7886b297ed4a9a0b29461c9efee366c9b1a0484c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/7886b297ed4a9a0b29461c9efee366c9b1a0484c", + "reference": "7886b297ed4a9a0b29461c9efee366c9b1a0484c", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "~2.0", + "lib-pcre": ">=7.0", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "~5.7.10|~6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2018-01-22 09:54:57" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "mockery/mockery": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.3.2" + }, + "platform-dev": [] +} diff --git a/library/Vmwarephp/Exception/Soap.php b/library/Vmwarephp/Exception/Soap.php index 6f357ca..5018629 100644 --- a/library/Vmwarephp/Exception/Soap.php +++ b/library/Vmwarephp/Exception/Soap.php @@ -22,11 +22,16 @@ private function makeMessageHeader($soapFault) { return "{$soapFault->faultcode}: {$soapFault->faultstring}. "; } - private function makeFaultDetailsString($soapFault) { + private function makeFaultDetailsString(\SoapFault $soapFault) { $faults = array(); - foreach ($soapFault->detail as $fault) { - $faults[] = "{$fault->enc_stype}: " . print_r($fault->enc_value, true); - } - return count($faults) ? implode(', ', $faults) : ''; + // \SoapFault::$detail property can be unexistent + // @link https://bugs.php.net/bug.php?id=46792 + if (isset($soapFault->detail)) { + foreach ($soapFault->detail as $fault) { + $faults[] = "{$fault->enc_stype}: " . print_r($fault->enc_value, true); + } + } + + return implode(', ', $faults); } } diff --git a/library/Vmwarephp/Factory/SoapClient.php b/library/Vmwarephp/Factory/SoapClient.php index 81fa0bb..ea561f2 100644 --- a/library/Vmwarephp/Factory/SoapClient.php +++ b/library/Vmwarephp/Factory/SoapClient.php @@ -11,15 +11,23 @@ function __construct(\Vmwarephp\WsdlClassMapper $mapper = null, $wsdlFilePath = $this->wsdlFilePath = $wsdlFilePath ? : $this->getWsdlFilePath(); } - function make(\Vmwarephp\Vhost $vhost, $useExceptions = 1, $trace = 1) { - $options = array( - 'trace' => $trace, - 'location' => $this->makeRequestsLocation($vhost), - 'exceptions' => $useExceptions, - 'connection_timeout' => 10, - 'classmap' => $this->wsdlClassMapper->getClassMap(), - 'features' => SOAP_SINGLE_ELEMENT_ARRAYS + SOAP_USE_XSI_ARRAY_TYPE - ); + function make(\Vmwarephp\Vhost $vhost, $useExceptions = 1, $trace = 1) { + $options = array( + 'trace' => $trace, + 'location' => $this->makeRequestsLocation($vhost), + 'exceptions' => $useExceptions, + 'connection_timeout' => 10, + 'classmap' => $this->wsdlClassMapper->getClassMap(), + 'features' => SOAP_SINGLE_ELEMENT_ARRAYS + SOAP_USE_XSI_ARRAY_TYPE, + 'stream_context' => stream_context_create( + array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + ) + ) + ) + ); $soapClient = $this->makeDefaultSoapClient($this->wsdlFilePath, $options); if (!$soapClient) throw new Ex\CannotCreateSoapClient(); return $soapClient; diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..fffb9b7 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,119 @@ +[ + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" + }, + "time": "2016-01-20 08:20:44", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ] + }, + { + "name": "mockery/mockery", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "7886b297ed4a9a0b29461c9efee366c9b1a0484c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/7886b297ed4a9a0b29461c9efee366c9b1a0484c", + "reference": "7886b297ed4a9a0b29461c9efee366c9b1a0484c", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "~2.0", + "lib-pcre": ">=7.0", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "~5.7.10|~6.5" + }, + "time": "2018-01-22 09:54:57", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "source", + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ] + } +] diff --git a/vendor/hamcrest/hamcrest-php/.coveralls.yml b/vendor/hamcrest/hamcrest-php/.coveralls.yml new file mode 100644 index 0000000..f2f9ed5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.coveralls.yml @@ -0,0 +1 @@ +src_dir: hamcrest diff --git a/vendor/hamcrest/hamcrest-php/.gitignore b/vendor/hamcrest/hamcrest-php/.gitignore new file mode 100644 index 0000000..22d0d82 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.gitignore @@ -0,0 +1 @@ +vendor diff --git a/vendor/hamcrest/hamcrest-php/.gush.yml b/vendor/hamcrest/hamcrest-php/.gush.yml new file mode 100644 index 0000000..b7c226d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.gush.yml @@ -0,0 +1,7 @@ +adapter: github +issue_tracker: github +meta-header: "Copyright (c) 2009-2015 hamcrest.org" +table-pr: + fixed_tickets: ['Fixed Tickets', ''] + license: ['License', MIT] +base: master diff --git a/vendor/hamcrest/hamcrest-php/.travis.yml b/vendor/hamcrest/hamcrest-php/.travis.yml new file mode 100644 index 0000000..80b4ed0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.travis.yml @@ -0,0 +1,24 @@ +language: php +php: + - 5.6 + - 5.5 + - 5.4 + - 5.3 + - hhvm + - 7.0 + +matrix: + allow_failures: + - php: hhvm + +install: + - composer update --prefer-source + +script: + - mkdir -p build/logs + - php vendor/bin/phpunit --coverage-clover=build/logs/clover.xml -c tests/phpunit.xml.dist + +after_script: + - php vendor/bin/coveralls -v + - wget https://scrutinizer-ci.com/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml diff --git a/vendor/hamcrest/hamcrest-php/CHANGES.txt b/vendor/hamcrest/hamcrest-php/CHANGES.txt new file mode 100644 index 0000000..708193b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/CHANGES.txt @@ -0,0 +1,167 @@ +== Version 2.0: Released XXX XX 2016 == + +* Removed automatic loading of global functions + +== Version 1.1.0: Released Feb 2 2012 == + +Issues Fixed: 121, 138, 147 + +* Added non-empty matchers to complement the emptiness-matching forms. + + - nonEmptyString() + - nonEmptyArray() + - nonEmptyTraversable() + +* Added ability to pass variable arguments to several array-based matcher + factory methods so they work like allOf() et al. + + - anArray() + - arrayContainingInAnyOrder(), containsInAnyOrder() + - arrayContaining(), contains() + - stringContainsInOrder() + +* Matchers that accept an array of matchers now also accept variable arguments. + Any non-matcher arguments are wrapped by IsEqual. + +* Added noneOf() as a shortcut for not(anyOf()). + + +== Version 1.0.0: Released Jan 20 2012 == + +Issues Fixed: 119, 136, 139, 141, 148, 149, 172 + +* Moved hamcrest.php into Hamcrest folder and renamed to Hamcrest.php. + This is more in line with PEAR packaging standards. + +* Renamed callable() to callableValue() for compatibility with PHP 5.4. + +* Added Hamcrest_Text_StringContainsIgnoringCase to assert using stripos(). + + assertThat('fOObAr', containsStringIgnoringCase('oba')); + assertThat('fOObAr', containsString('oba')->ignoringCase()); + +* Fixed Hamcrest_Core_IsInstanceOf to return false for native types. + +* Moved string-based matchers to Hamcrest_Text package. + StringContains, StringEndsWith, StringStartsWith, and SubstringMatcher + +* Hamcrest.php and Hamcrest_Matchers.php are now built from @factory doctags. + Added @factory doctag to every static factory method. + +* Hamcrest_Matchers and Hamcrest.php now import each matcher as-needed + and Hamcrest.php calls the matchers directly instead of Hamcrest_Matchers. + + +== Version 0.3.0: Released Jul 26 2010 == + +* Added running count to Hamcrest_MatcherAssert with methods to get and reset it. + This can be used by unit testing frameworks for reporting. + +* Added Hamcrest_Core_HasToString to assert return value of toString() or __toString(). + + assertThat($anObject, hasToString('foo')); + +* Added Hamcrest_Type_IsScalar to assert is_scalar(). + Matches values of type bool, int, float, double, and string. + + assertThat($count, scalarValue()); + assertThat('foo', scalarValue()); + +* Added Hamcrest_Collection package. + + - IsEmptyTraversable + - IsTraversableWithSize + + assertThat($iterator, emptyTraversable()); + assertThat($iterator, traversableWithSize(5)); + +* Added Hamcrest_Xml_HasXPath to assert XPath expressions or the content of nodes in an XML/HTML DOM. + + assertThat($dom, hasXPath('books/book/title')); + assertThat($dom, hasXPath('books/book[contains(title, "Alice")]', 3)); + assertThat($dom, hasXPath('books/book/title', 'Alice in Wonderland')); + assertThat($dom, hasXPath('count(books/book)', greaterThan(10))); + +* Added aliases to match the Java API. + + hasEntry() -> hasKeyValuePair() + hasValue() -> hasItemInArray() + contains() -> arrayContaining() + containsInAnyOrder() -> arrayContainingInAnyOrder() + +* Added optional subtype to Hamcrest_TypeSafeMatcher to enforce object class or resource type. + +* Hamcrest_TypeSafeDiagnosingMatcher now extends Hamcrest_TypeSafeMatcher. + + +== Version 0.2.0: Released Jul 14 2010 == + +Issues Fixed: 109, 111, 114, 115 + +* Description::appendValues() and appendValueList() accept Iterator and IteratorAggregate. [111] + BaseDescription::appendValue() handles IteratorAggregate. + +* assertThat() accepts a single boolean parameter and + wraps any non-Matcher third parameter with equalTo(). + +* Removed null return value from assertThat(). [114] + +* Fixed wrong variable name in contains(). [109] + +* Added Hamcrest_Core_IsSet to assert isset(). + + assertThat(array('foo' => 'bar'), set('foo')); + assertThat(array('foo' => 'bar'), notSet('bar')); + +* Added Hamcrest_Core_IsTypeOf to assert built-in types with gettype(). [115] + Types: array, boolean, double, integer, null, object, resource, and string. + Note that gettype() returns "double" for float values. + + assertThat($count, typeOf('integer')); + assertThat(3.14159, typeOf('double')); + assertThat(array('foo', 'bar'), typeOf('array')); + assertThat(new stdClass(), typeOf('object')); + +* Added type-specific matchers in new Hamcrest_Type package. + + - IsArray + - IsBoolean + - IsDouble (includes float values) + - IsInteger + - IsObject + - IsResource + - IsString + + assertThat($count, integerValue()); + assertThat(3.14159, floatValue()); + assertThat('foo', stringValue()); + +* Added Hamcrest_Type_IsNumeric to assert is_numeric(). + Matches values of type int and float/double or strings that are formatted as numbers. + + assertThat(5, numericValue()); + assertThat('-5e+3', numericValue()); + +* Added Hamcrest_Type_IsCallable to assert is_callable(). + + assertThat('preg_match', callable()); + assertThat(array('SomeClass', 'SomeMethod'), callable()); + assertThat(array($object, 'SomeMethod'), callable()); + assertThat($object, callable()); + assertThat(function ($x, $y) { return $x + $y; }, callable()); + +* Added Hamcrest_Text_MatchesPattern for regex matching with preg_match(). + + assertThat('foobar', matchesPattern('/o+b/')); + +* Added aliases: + - atLeast() for greaterThanOrEqualTo() + - atMost() for lessThanOrEqualTo() + + +== Version 0.1.0: Released Jul 7 2010 == + +* Created PEAR package + +* Core matchers + diff --git a/vendor/hamcrest/hamcrest-php/LICENSE.txt b/vendor/hamcrest/hamcrest-php/LICENSE.txt new file mode 100644 index 0000000..91cd329 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/LICENSE.txt @@ -0,0 +1,27 @@ +BSD License + +Copyright (c) 2000-2014, www.hamcrest.org +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 Hamcrest 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/hamcrest/hamcrest-php/README.md b/vendor/hamcrest/hamcrest-php/README.md new file mode 100644 index 0000000..0b07c71 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/README.md @@ -0,0 +1,53 @@ +This is the PHP port of Hamcrest Matchers +========================================= + +[![Build Status](https://travis-ci.org/hamcrest/hamcrest-php.png?branch=master)](https://travis-ci.org/hamcrest/hamcrest-php) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/?branch=master) +[![Code Coverage](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/?branch=master) + +Hamcrest is a matching library originally written for Java, but +subsequently ported to many other languages. hamcrest-php is the +official PHP port of Hamcrest and essentially follows a literal +translation of the original Java API for Hamcrest, with a few +Exceptions, mostly down to PHP language barriers: + + 1. `instanceOf($theClass)` is actually `anInstanceOf($theClass)` + + 2. `both(containsString('a'))->and(containsString('b'))` + is actually `both(containsString('a'))->andAlso(containsString('b'))` + + 3. `either(containsString('a'))->or(containsString('b'))` + is actually `either(containsString('a'))->orElse(containsString('b'))` + + 4. Unless it would be non-semantic for a matcher to do so, hamcrest-php + allows dynamic typing for it's input, in "the PHP way". Exception are + where semantics surrounding the type itself would suggest otherwise, + such as stringContains() and greaterThan(). + + 5. Several official matchers have not been ported because they don't + make sense or don't apply in PHP: + + - `typeCompatibleWith($theClass)` + - `eventFrom($source)` + - `hasProperty($name)` ** + - `samePropertyValuesAs($obj)` ** + + 6. When most of the collections matchers are finally ported, PHP-specific + aliases will probably be created due to a difference in naming + conventions between Java's Arrays, Collections, Sets and Maps compared + with PHP's Arrays. + +--- +** [Unless we consider POPO's (Plain Old PHP Objects) akin to JavaBeans] + - The POPO thing is a joke. Java devs coin the term POJO's (Plain Old + Java Objects). + + +Usage +----- + +Hamcrest matchers are easy to use as: + +```php +Hamcrest_MatcherAssert::assertThat('a', Hamcrest_Matchers::equalToIgnoringCase('A')); +``` diff --git a/vendor/hamcrest/hamcrest-php/TODO.txt b/vendor/hamcrest/hamcrest-php/TODO.txt new file mode 100644 index 0000000..92e1190 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/TODO.txt @@ -0,0 +1,22 @@ +Still TODO Before Complete for PHP +---------------------------------- + +Port: + + - Hamcrest_Collection_* + - IsCollectionWithSize + - IsEmptyCollection + - IsIn + - IsTraversableContainingInAnyOrder + - IsTraversableContainingInOrder + - IsMapContaining (aliases) + +Aliasing/Deprecation (questionable): + + - Find and fix any factory methods that start with "is". + +Namespaces: + + - Investigate adding PHP 5.3+ namespace support in a way that still permits + use in PHP 5.2. + - Other than a parallel codebase, I don't see how this could be possible. diff --git a/vendor/hamcrest/hamcrest-php/composer.json b/vendor/hamcrest/hamcrest-php/composer.json new file mode 100644 index 0000000..5349f5f --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/composer.json @@ -0,0 +1,38 @@ +{ + "name": "hamcrest/hamcrest-php", + "type": "library", + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": ["test"], + "license": "BSD", + "authors": [ + ], + + "autoload": { + "classmap": ["hamcrest"] + }, + "autoload-dev": { + "classmap": ["tests", "generator"] + }, + + "require": { + "php": "^5.3|^7.0" + }, + + "require-dev": { + "satooshi/php-coveralls": "^1.0", + "phpunit/php-file-iterator": "1.3.3", + "phpunit/phpunit": "~4.0" + }, + + "replace": { + "kodova/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "cordoval/hamcrest-php": "*" + }, + + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/composer.lock b/vendor/hamcrest/hamcrest-php/composer.lock new file mode 100644 index 0000000..0581a4e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/composer.lock @@ -0,0 +1,1493 @@ +{ + "_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": "52d9e3c2e238bdc2aab7f6e1d322e31d", + "content-hash": "ed113672807f01f40b4d9809b102dc31", + "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": "guzzle/guzzle", + "version": "v3.9.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle3.git", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" + }, + "require-dev": { + "doctrine/cache": "~1.3", + "monolog/monolog": "~1.0", + "phpunit/phpunit": "3.7.*", + "psr/log": "~1.0", + "symfony/class-loader": "~2.1", + "zendframework/zend-cache": "2.*,<2.3", + "zendframework/zend-log": "2.*,<2.3" + }, + "suggest": { + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.9-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" + } + ], + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2015-03-18 18:23:50" + }, + { + "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.4", + "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": "*" + }, + "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-10-06 15:47:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "16a78140ed2fc01b945cfa539665fadc6a038029" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/16a78140ed2fc01b945cfa539665fadc6a038029", + "reference": "16a78140ed2fc01b945cfa539665fadc6a038029", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "File/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2012-10-11 11:44:38" + }, + { + "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.5.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d6429b0995b24a2d9dfe5587ee3a7071c1161af4", + "reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "~1.3,>=1.3.1", + "phpunit/php-code-coverage": "~2.0,>=2.0.11", + "phpunit/php-file-iterator": "~1.3.2", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "~1.0.2", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.1", + "sebastian/environment": "~1.2", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.5.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-03-29 09:24:05" + }, + { + "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": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "satooshi/php-coveralls", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/satooshi/php-coveralls.git", + "reference": "3edbdbdb4f4cfab5cb9ce83655ff81432f2221a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/3edbdbdb4f4cfab5cb9ce83655ff81432f2221a6", + "reference": "3edbdbdb4f4cfab5cb9ce83655ff81432f2221a6", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": "^2.8|^3.0", + "php": ">=5.3.3", + "psr/log": "^1.0", + "symfony/config": "^2.4|^3.0", + "symfony/console": "^2.1|^3.0", + "symfony/stopwatch": "^2.2|^3.0", + "symfony/yaml": "^2.1|^3.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/coveralls" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.8-dev" + } + }, + "autoload": { + "psr-4": { + "Satooshi\\": "src/Satooshi/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/satooshi/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2015-12-28 09:07:32" + }, + { + "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.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "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": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "6e7133793a8e5a5714a551a8324337374be209df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", + "reference": "6e7133793a8e5a5714a551a8324337374be209df", + "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-12-02 08:37:27" + }, + { + "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.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "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": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "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-11-11 19:50:13" + }, + { + "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/config", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2", + "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/filesystem": "~2.3|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 Config Component", + "homepage": "https://symfony.com", + "time": "2015-12-26 13:37:56" + }, + { + "name": "symfony/console", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/2e06a5ccb19dcf9b89f1c6a677a39a8df773635a", + "reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 Console Component", + "homepage": "https://symfony.com", + "time": "2015-12-22 10:25:57" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5eb815363c0388e83247e7e9853e5dbc14999cc", + "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2015-10-30 20:15:42" + }, + { + "name": "symfony/filesystem", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/a7ad724530a764d70c168d321ac226ba3d2f10fc", + "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 Filesystem Component", + "homepage": "https://symfony.com", + "time": "2015-12-22 10:25:57" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/49ff736bd5d41f45240cec77b44967d76e0c3d25", + "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2015-11-20 09:19:13" + }, + { + "name": "symfony/stopwatch", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "5f1e2ebd1044da542d2b9510527836e8be92b1cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5f1e2ebd1044da542d2b9510527836e8be92b1cb", + "reference": "5f1e2ebd1044da542d2b9510527836e8be92b1cb", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2015-10-30 20:15:42" + }, + { + "name": "symfony/yaml", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", + "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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-12-26 13:37:56" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.3.2" + }, + "platform-dev": [] +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php new file mode 100644 index 0000000..83965b2 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php @@ -0,0 +1,41 @@ +method = $method; + $this->name = $name; + } + + public function getMethod() + { + return $this->method; + } + + public function getName() + { + return $this->name; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php new file mode 100644 index 0000000..0c6bf78 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php @@ -0,0 +1,72 @@ +file = $file; + $this->reflector = $class; + $this->extractFactoryMethods(); + } + + public function extractFactoryMethods() + { + $this->methods = array(); + foreach ($this->getPublicStaticMethods() as $method) { + if ($method->isFactory()) { +// echo $this->getName() . '::' . $method->getName() . ' : ' . count($method->getCalls()) . PHP_EOL; + $this->methods[] = $method; + } + } + } + + public function getPublicStaticMethods() + { + $methods = array(); + foreach ($this->reflector->getMethods(ReflectionMethod::IS_STATIC) as $method) { + if ($method->isPublic() && $method->getDeclaringClass() == $this->reflector) { + $methods[] = new FactoryMethod($this, $method); + } + } + return $methods; + } + + public function getFile() + { + return $this->file; + } + + public function getName() + { + return $this->reflector->name; + } + + public function isFactory() + { + return !empty($this->methods); + } + + public function getMethods() + { + return $this->methods; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php new file mode 100644 index 0000000..ac3d6c7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php @@ -0,0 +1,122 @@ +file = $file; + $this->indent = $indent; + } + + abstract public function addCall(FactoryCall $call); + + abstract public function build(); + + public function addFileHeader() + { + $this->code = ''; + $this->addPart('file_header'); + } + + public function addPart($name) + { + $this->addCode($this->readPart($name)); + } + + public function addCode($code) + { + $this->code .= $code; + } + + public function readPart($name) + { + return file_get_contents(__DIR__ . "/parts/$name.txt"); + } + + public function generateFactoryCall(FactoryCall $call) + { + $method = $call->getMethod(); + $code = $method->getComment($this->indent) . PHP_EOL; + $code .= $this->generateDeclaration($call->getName(), $method); + // $code .= $this->generateImport($method); + $code .= $this->generateCall($method); + $code .= $this->generateClosing(); + return $code; + } + + public function generateDeclaration($name, FactoryMethod $method) + { + $code = $this->indent . $this->getDeclarationModifiers() + . 'function ' . $name . '(' + . $this->generateDeclarationArguments($method) + . ')' . PHP_EOL . $this->indent . '{' . PHP_EOL; + return $code; + } + + public function getDeclarationModifiers() + { + return ''; + } + + public function generateDeclarationArguments(FactoryMethod $method) + { + if ($method->acceptsVariableArguments()) { + return '/* args... */'; + } else { + return $method->getParameterDeclarations(); + } + } + + public function generateImport(FactoryMethod $method) + { + return $this->indent . self::INDENT . "require_once '" . $method->getClass()->getFile() . "';" . PHP_EOL; + } + + public function generateCall(FactoryMethod $method) + { + $code = ''; + if ($method->acceptsVariableArguments()) { + $code .= $this->indent . self::INDENT . '$args = func_get_args();' . PHP_EOL; + } + + $code .= $this->indent . self::INDENT . 'return '; + if ($method->acceptsVariableArguments()) { + $code .= 'call_user_func_array(array(\'' + . '\\' . $method->getClassName() . '\', \'' + . $method->getName() . '\'), $args);' . PHP_EOL; + } else { + $code .= '\\' . $method->getClassName() . '::' + . $method->getName() . '(' + . $method->getParameterInvocations() . ');' . PHP_EOL; + } + + return $code; + } + + public function generateClosing() + { + return $this->indent . '}' . PHP_EOL; + } + + public function write() + { + file_put_contents($this->file, $this->code); + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php new file mode 100644 index 0000000..37f80b6 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php @@ -0,0 +1,115 @@ +path = $path; + $this->factoryFiles = array(); + } + + public function addFactoryFile(FactoryFile $factoryFile) + { + $this->factoryFiles[] = $factoryFile; + } + + public function generate() + { + $classes = $this->getClassesWithFactoryMethods(); + foreach ($classes as $class) { + foreach ($class->getMethods() as $method) { + foreach ($method->getCalls() as $call) { + foreach ($this->factoryFiles as $file) { + $file->addCall($call); + } + } + } + } + } + + public function write() + { + foreach ($this->factoryFiles as $file) { + $file->build(); + $file->write(); + } + } + + public function getClassesWithFactoryMethods() + { + $classes = array(); + $files = $this->getSortedFiles(); + foreach ($files as $file) { + $class = $this->getFactoryClass($file); + if ($class !== null) { + $classes[] = $class; + } + } + + return $classes; + } + + public function getSortedFiles() + { + $iter = \File_Iterator_Factory::getFileIterator($this->path, '.php'); + $files = array(); + foreach ($iter as $file) { + $files[] = $file; + } + sort($files, SORT_STRING); + + return $files; + } + + public function getFactoryClass($file) + { + $name = $this->getFactoryClassName($file); + if ($name !== null) { + require_once $file; + + if (class_exists($name)) { + $class = new FactoryClass(substr($file, strpos($file, 'Hamcrest/')), new ReflectionClass($name)); + if ($class->isFactory()) { + return $class; + } + } + } + + return null; + } + + public function getFactoryClassName($file) + { + $content = file_get_contents($file); + if (preg_match('/namespace\s+(.+);/', $content, $namespace) + && preg_match('/\n\s*class\s+(\w+)\s+extends\b/', $content, $className) + && preg_match('/@factory\b/', $content) + ) { + return $namespace[1] . '\\' . $className[1]; + } + + return null; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php new file mode 100644 index 0000000..44f8dc5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php @@ -0,0 +1,231 @@ +class = $class; + $this->reflector = $reflector; + $this->extractCommentWithoutLeadingShashesAndStars(); + $this->extractFactoryNamesFromComment(); + $this->extractParameters(); + } + + public function extractCommentWithoutLeadingShashesAndStars() + { + $this->comment = explode("\n", $this->reflector->getDocComment()); + foreach ($this->comment as &$line) { + $line = preg_replace('#^\s*(/\\*+|\\*+/|\\*)\s?#', '', $line); + } + $this->trimLeadingBlankLinesFromComment(); + $this->trimTrailingBlankLinesFromComment(); + } + + public function trimLeadingBlankLinesFromComment() + { + while (count($this->comment) > 0) { + $line = array_shift($this->comment); + if (trim($line) != '') { + array_unshift($this->comment, $line); + break; + } + } + } + + public function trimTrailingBlankLinesFromComment() + { + while (count($this->comment) > 0) { + $line = array_pop($this->comment); + if (trim($line) != '') { + array_push($this->comment, $line); + break; + } + } + } + + public function extractFactoryNamesFromComment() + { + $this->calls = array(); + for ($i = 0; $i < count($this->comment); $i++) { + if ($this->extractFactoryNamesFromLine($this->comment[$i])) { + unset($this->comment[$i]); + } + } + $this->trimTrailingBlankLinesFromComment(); + } + + public function extractFactoryNamesFromLine($line) + { + if (preg_match('/^\s*@factory(\s+(.+))?$/', $line, $match)) { + $this->createCalls( + $this->extractFactoryNamesFromAnnotation( + isset($match[2]) ? trim($match[2]) : null + ) + ); + return true; + } + return false; + } + + public function extractFactoryNamesFromAnnotation($value) + { + $primaryName = $this->reflector->getName(); + if (empty($value)) { + return array($primaryName); + } + preg_match_all('/(\.{3}|-|[a-zA-Z_][a-zA-Z_0-9]*)/', $value, $match); + $names = $match[0]; + if (in_array('...', $names)) { + $this->isVarArgs = true; + } + if (!in_array('-', $names) && !in_array($primaryName, $names)) { + array_unshift($names, $primaryName); + } + return $names; + } + + public function createCalls(array $names) + { + $names = array_unique($names); + foreach ($names as $name) { + if ($name != '-' && $name != '...') { + $this->calls[] = new FactoryCall($this, $name); + } + } + } + + public function extractParameters() + { + $this->parameters = array(); + if (!$this->isVarArgs) { + foreach ($this->reflector->getParameters() as $parameter) { + $this->parameters[] = new FactoryParameter($this, $parameter); + } + } + } + + public function getParameterDeclarations() + { + if ($this->isVarArgs || !$this->hasParameters()) { + return ''; + } + $params = array(); + foreach ($this->parameters as /** @var $parameter FactoryParameter */ + $parameter) { + $params[] = $parameter->getDeclaration(); + } + return implode(', ', $params); + } + + public function getParameterInvocations() + { + if ($this->isVarArgs) { + return ''; + } + $params = array(); + foreach ($this->parameters as $parameter) { + $params[] = $parameter->getInvocation(); + } + return implode(', ', $params); + } + + + public function getClass() + { + return $this->class; + } + + public function getClassName() + { + return $this->class->getName(); + } + + public function getName() + { + return $this->reflector->name; + } + + public function isFactory() + { + return count($this->calls) > 0; + } + + public function getCalls() + { + return $this->calls; + } + + public function acceptsVariableArguments() + { + return $this->isVarArgs; + } + + public function hasParameters() + { + return !empty($this->parameters); + } + + public function getParameters() + { + return $this->parameters; + } + + public function getFullName() + { + return $this->getClassName() . '::' . $this->getName(); + } + + public function getCommentText() + { + return implode(PHP_EOL, $this->comment); + } + + public function getComment($indent = '') + { + $comment = $indent . '/**'; + foreach ($this->comment as $line) { + $comment .= PHP_EOL . rtrim($indent . ' * ' . $line); + } + $comment .= PHP_EOL . $indent . ' */'; + return $comment; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php new file mode 100644 index 0000000..93a76b3 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php @@ -0,0 +1,69 @@ +method = $method; + $this->reflector = $reflector; + } + + public function getDeclaration() + { + if ($this->reflector->isArray()) { + $code = 'array '; + } else { + $class = $this->reflector->getClass(); + if ($class !== null) { + $code = '\\' . $class->name . ' '; + } else { + $code = ''; + } + } + $code .= '$' . $this->reflector->name; + if ($this->reflector->isOptional()) { + $default = $this->reflector->getDefaultValue(); + if (is_null($default)) { + $default = 'null'; + } elseif (is_bool($default)) { + $default = $default ? 'true' : 'false'; + } elseif (is_string($default)) { + $default = "'" . $default . "'"; + } elseif (is_numeric($default)) { + $default = strval($default); + } elseif (is_array($default)) { + $default = 'array()'; + } else { + echo 'Warning: unknown default type for ' . $this->getMethod()->getFullName() . PHP_EOL; + var_dump($default); + $default = 'null'; + } + $code .= ' = ' . $default; + } + return $code; + } + + public function getInvocation() + { + return '$' . $this->reflector->name; + } + + public function getMethod() + { + return $this->method; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php new file mode 100644 index 0000000..5ee1b69 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php @@ -0,0 +1,42 @@ +functions = ''; + } + + public function addCall(FactoryCall $call) + { + $this->functions .= PHP_EOL . $this->generateFactoryCall($call); + } + + public function build() + { + $this->addFileHeader(); + $this->addPart('functions_imports'); + $this->addPart('functions_header'); + $this->addCode($this->functions); + $this->addPart('functions_footer'); + } + + public function generateFactoryCall(FactoryCall $call) + { + $code = "if (!function_exists('{$call->getName()}')) {"; + $code.= parent::generateFactoryCall($call); + $code.= "}\n"; + + return $code; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php new file mode 100644 index 0000000..44cec02 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php @@ -0,0 +1,38 @@ +methods = ''; + } + + public function addCall(FactoryCall $call) + { + $this->methods .= PHP_EOL . $this->generateFactoryCall($call); + } + + public function getDeclarationModifiers() + { + return 'public static '; + } + + public function build() + { + $this->addFileHeader(); + $this->addPart('matchers_imports'); + $this->addPart('matchers_header'); + $this->addCode($this->methods); + $this->addPart('matchers_footer'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt new file mode 100644 index 0000000..7b352e4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt @@ -0,0 +1,7 @@ + + * //With an identifier + * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty")); + * //Without an identifier + * assertThat($apple->flavour(), equalTo("tasty")); + * //Evaluating a boolean expression + * assertThat("some error", $a > $b); + * + */ + function assertThat() + { + $args = func_get_args(); + call_user_func_array( + array('Hamcrest\MatcherAssert', 'assertThat'), + $args + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt new file mode 100644 index 0000000..e69de29 diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt new file mode 100644 index 0000000..5c34318 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt @@ -0,0 +1 @@ +} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt new file mode 100644 index 0000000..4f8bb2b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt @@ -0,0 +1,7 @@ + + +/** + * A series of static factories for all hamcrest matchers. + */ +class Matchers +{ diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt new file mode 100644 index 0000000..7dd6849 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt @@ -0,0 +1,2 @@ + +namespace Hamcrest; \ No newline at end of file diff --git a/vendor/hamcrest/hamcrest-php/generator/run.php b/vendor/hamcrest/hamcrest-php/generator/run.php new file mode 100644 index 0000000..924d752 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/run.php @@ -0,0 +1,37 @@ +addFactoryFile(new StaticMethodFile(STATIC_MATCHERS_FILE)); +$generator->addFactoryFile(new GlobalFunctionFile(GLOBAL_FUNCTIONS_FILE)); +$generator->generate(); +$generator->write(); diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php new file mode 100644 index 0000000..8a719eb --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php @@ -0,0 +1,805 @@ + + * //With an identifier + * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty")); + * //Without an identifier + * assertThat($apple->flavour(), equalTo("tasty")); + * //Evaluating a boolean expression + * assertThat("some error", $a > $b); + * + */ + function assertThat() + { + $args = func_get_args(); + call_user_func_array( + array('Hamcrest\MatcherAssert', 'assertThat'), + $args + ); + } +} + +if (!function_exists('anArray')) { /** + * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i]. + */ + function anArray(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArray', 'anArray'), $args); + } +} + +if (!function_exists('hasItemInArray')) { /** + * Evaluates to true if any item in an array satisfies the given matcher. + * + * @param mixed $item as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContaining + */ + function hasItemInArray($item) + { + return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item); + } +} + +if (!function_exists('hasValue')) { /** + * Evaluates to true if any item in an array satisfies the given matcher. + * + * @param mixed $item as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContaining + */ + function hasValue($item) + { + return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item); + } +} + +if (!function_exists('arrayContainingInAnyOrder')) { /** + * An array with elements that match the given matchers. + */ + function arrayContainingInAnyOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args); + } +} + +if (!function_exists('containsInAnyOrder')) { /** + * An array with elements that match the given matchers. + */ + function containsInAnyOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args); + } +} + +if (!function_exists('arrayContaining')) { /** + * An array with elements that match the given matchers in the same order. + */ + function arrayContaining(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args); + } +} + +if (!function_exists('contains')) { /** + * An array with elements that match the given matchers in the same order. + */ + function contains(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args); + } +} + +if (!function_exists('hasKeyInArray')) { /** + * Evaluates to true if any key in an array matches the given matcher. + * + * @param mixed $key as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContainingKey + */ + function hasKeyInArray($key) + { + return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key); + } +} + +if (!function_exists('hasKey')) { /** + * Evaluates to true if any key in an array matches the given matcher. + * + * @param mixed $key as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContainingKey + */ + function hasKey($key) + { + return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key); + } +} + +if (!function_exists('hasKeyValuePair')) { /** + * Test if an array has both an key and value in parity with each other. + */ + function hasKeyValuePair($key, $value) + { + return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value); + } +} + +if (!function_exists('hasEntry')) { /** + * Test if an array has both an key and value in parity with each other. + */ + function hasEntry($key, $value) + { + return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value); + } +} + +if (!function_exists('arrayWithSize')) { /** + * Does array size satisfy a given matcher? + * + * @param \Hamcrest\Matcher|int $size as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayWithSize + */ + function arrayWithSize($size) + { + return \Hamcrest\Arrays\IsArrayWithSize::arrayWithSize($size); + } +} + +if (!function_exists('emptyArray')) { /** + * Matches an empty array. + */ + function emptyArray() + { + return \Hamcrest\Arrays\IsArrayWithSize::emptyArray(); + } +} + +if (!function_exists('nonEmptyArray')) { /** + * Matches an empty array. + */ + function nonEmptyArray() + { + return \Hamcrest\Arrays\IsArrayWithSize::nonEmptyArray(); + } +} + +if (!function_exists('emptyTraversable')) { /** + * Returns true if traversable is empty. + */ + function emptyTraversable() + { + return \Hamcrest\Collection\IsEmptyTraversable::emptyTraversable(); + } +} + +if (!function_exists('nonEmptyTraversable')) { /** + * Returns true if traversable is not empty. + */ + function nonEmptyTraversable() + { + return \Hamcrest\Collection\IsEmptyTraversable::nonEmptyTraversable(); + } +} + +if (!function_exists('traversableWithSize')) { /** + * Does traversable size satisfy a given matcher? + */ + function traversableWithSize($size) + { + return \Hamcrest\Collection\IsTraversableWithSize::traversableWithSize($size); + } +} + +if (!function_exists('allOf')) { /** + * Evaluates to true only if ALL of the passed in matchers evaluate to true. + */ + function allOf(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\AllOf', 'allOf'), $args); + } +} + +if (!function_exists('anyOf')) { /** + * Evaluates to true if ANY of the passed in matchers evaluate to true. + */ + function anyOf(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'anyOf'), $args); + } +} + +if (!function_exists('noneOf')) { /** + * Evaluates to false if ANY of the passed in matchers evaluate to true. + */ + function noneOf(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'noneOf'), $args); + } +} + +if (!function_exists('both')) { /** + * This is useful for fluently combining matchers that must both pass. + * For example: + *
+     *   assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
+     * 
+ */ + function both(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::both($matcher); + } +} + +if (!function_exists('either')) { /** + * This is useful for fluently combining matchers where either may pass, + * for example: + *
+     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+     * 
+ */ + function either(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::either($matcher); + } +} + +if (!function_exists('describedAs')) { /** + * Wraps an existing matcher and overrides the description when it fails. + */ + function describedAs(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args); + } +} + +if (!function_exists('everyItem')) { /** + * @param Matcher $itemMatcher + * A matcher to apply to every element in an array. + * + * @return \Hamcrest\Core\Every + * Evaluates to TRUE for a collection in which every item matches $itemMatcher + */ + function everyItem(\Hamcrest\Matcher $itemMatcher) + { + return \Hamcrest\Core\Every::everyItem($itemMatcher); + } +} + +if (!function_exists('hasToString')) { /** + * Does array size satisfy a given matcher? + */ + function hasToString($matcher) + { + return \Hamcrest\Core\HasToString::hasToString($matcher); + } +} + +if (!function_exists('is')) { /** + * Decorates another Matcher, retaining the behavior but allowing tests + * to be slightly more expressive. + * + * For example: assertThat($cheese, equalTo($smelly)) + * vs. assertThat($cheese, is(equalTo($smelly))) + */ + function is($value) + { + return \Hamcrest\Core\Is::is($value); + } +} + +if (!function_exists('anything')) { /** + * This matcher always evaluates to true. + * + * @param string $description A meaningful string used when describing itself. + * + * @return \Hamcrest\Core\IsAnything + */ + function anything($description = 'ANYTHING') + { + return \Hamcrest\Core\IsAnything::anything($description); + } +} + +if (!function_exists('hasItem')) { /** + * Test if the value is an array containing this matcher. + * + * Example: + *
+     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+     * //Convenience defaults to equalTo()
+     * assertThat(array('a', 'b'), hasItem('b'));
+     * 
+ */ + function hasItem(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args); + } +} + +if (!function_exists('hasItems')) { /** + * Test if the value is an array containing elements that match all of these + * matchers. + * + * Example: + *
+     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+     * 
+ */ + function hasItems(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args); + } +} + +if (!function_exists('equalTo')) { /** + * Is the value equal to another value, as tested by the use of the "==" + * comparison operator? + */ + function equalTo($item) + { + return \Hamcrest\Core\IsEqual::equalTo($item); + } +} + +if (!function_exists('identicalTo')) { /** + * Tests of the value is identical to $value as tested by the "===" operator. + */ + function identicalTo($value) + { + return \Hamcrest\Core\IsIdentical::identicalTo($value); + } +} + +if (!function_exists('anInstanceOf')) { /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + function anInstanceOf($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } +} + +if (!function_exists('any')) { /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + function any($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } +} + +if (!function_exists('not')) { /** + * Matches if value does not match $value. + */ + function not($value) + { + return \Hamcrest\Core\IsNot::not($value); + } +} + +if (!function_exists('nullValue')) { /** + * Matches if value is null. + */ + function nullValue() + { + return \Hamcrest\Core\IsNull::nullValue(); + } +} + +if (!function_exists('notNullValue')) { /** + * Matches if value is not null. + */ + function notNullValue() + { + return \Hamcrest\Core\IsNull::notNullValue(); + } +} + +if (!function_exists('sameInstance')) { /** + * Creates a new instance of IsSame. + * + * @param mixed $object + * The predicate evaluates to true only when the argument is + * this object. + * + * @return \Hamcrest\Core\IsSame + */ + function sameInstance($object) + { + return \Hamcrest\Core\IsSame::sameInstance($object); + } +} + +if (!function_exists('typeOf')) { /** + * Is the value a particular built-in type? + */ + function typeOf($theType) + { + return \Hamcrest\Core\IsTypeOf::typeOf($theType); + } +} + +if (!function_exists('set')) { /** + * Matches if value (class, object, or array) has named $property. + */ + function set($property) + { + return \Hamcrest\Core\Set::set($property); + } +} + +if (!function_exists('notSet')) { /** + * Matches if value (class, object, or array) does not have named $property. + */ + function notSet($property) + { + return \Hamcrest\Core\Set::notSet($property); + } +} + +if (!function_exists('closeTo')) { /** + * Matches if value is a number equal to $value within some range of + * acceptable error $delta. + */ + function closeTo($value, $delta) + { + return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta); + } +} + +if (!function_exists('comparesEqualTo')) { /** + * The value is not > $value, nor < $value. + */ + function comparesEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value); + } +} + +if (!function_exists('greaterThan')) { /** + * The value is > $value. + */ + function greaterThan($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThan($value); + } +} + +if (!function_exists('greaterThanOrEqualTo')) { /** + * The value is >= $value. + */ + function greaterThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } +} + +if (!function_exists('atLeast')) { /** + * The value is >= $value. + */ + function atLeast($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } +} + +if (!function_exists('lessThan')) { /** + * The value is < $value. + */ + function lessThan($value) + { + return \Hamcrest\Number\OrderingComparison::lessThan($value); + } +} + +if (!function_exists('lessThanOrEqualTo')) { /** + * The value is <= $value. + */ + function lessThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } +} + +if (!function_exists('atMost')) { /** + * The value is <= $value. + */ + function atMost($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } +} + +if (!function_exists('isEmptyString')) { /** + * Matches if value is a zero-length string. + */ + function isEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } +} + +if (!function_exists('emptyString')) { /** + * Matches if value is a zero-length string. + */ + function emptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } +} + +if (!function_exists('isEmptyOrNullString')) { /** + * Matches if value is null or a zero-length string. + */ + function isEmptyOrNullString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } +} + +if (!function_exists('nullOrEmptyString')) { /** + * Matches if value is null or a zero-length string. + */ + function nullOrEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } +} + +if (!function_exists('isNonEmptyString')) { /** + * Matches if value is a non-zero-length string. + */ + function isNonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } +} + +if (!function_exists('nonEmptyString')) { /** + * Matches if value is a non-zero-length string. + */ + function nonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } +} + +if (!function_exists('equalToIgnoringCase')) { /** + * Matches if value is a string equal to $string, regardless of the case. + */ + function equalToIgnoringCase($string) + { + return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string); + } +} + +if (!function_exists('equalToIgnoringWhiteSpace')) { /** + * Matches if value is a string equal to $string, regardless of whitespace. + */ + function equalToIgnoringWhiteSpace($string) + { + return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string); + } +} + +if (!function_exists('matchesPattern')) { /** + * Matches if value is a string that matches regular expression $pattern. + */ + function matchesPattern($pattern) + { + return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern); + } +} + +if (!function_exists('containsString')) { /** + * Matches if value is a string that contains $substring. + */ + function containsString($substring) + { + return \Hamcrest\Text\StringContains::containsString($substring); + } +} + +if (!function_exists('containsStringIgnoringCase')) { /** + * Matches if value is a string that contains $substring regardless of the case. + */ + function containsStringIgnoringCase($substring) + { + return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring); + } +} + +if (!function_exists('stringContainsInOrder')) { /** + * Matches if value contains $substrings in a constrained order. + */ + function stringContainsInOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args); + } +} + +if (!function_exists('endsWith')) { /** + * Matches if value is a string that ends with $substring. + */ + function endsWith($substring) + { + return \Hamcrest\Text\StringEndsWith::endsWith($substring); + } +} + +if (!function_exists('startsWith')) { /** + * Matches if value is a string that starts with $substring. + */ + function startsWith($substring) + { + return \Hamcrest\Text\StringStartsWith::startsWith($substring); + } +} + +if (!function_exists('arrayValue')) { /** + * Is the value an array? + */ + function arrayValue() + { + return \Hamcrest\Type\IsArray::arrayValue(); + } +} + +if (!function_exists('booleanValue')) { /** + * Is the value a boolean? + */ + function booleanValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } +} + +if (!function_exists('boolValue')) { /** + * Is the value a boolean? + */ + function boolValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } +} + +if (!function_exists('callableValue')) { /** + * Is the value callable? + */ + function callableValue() + { + return \Hamcrest\Type\IsCallable::callableValue(); + } +} + +if (!function_exists('doubleValue')) { /** + * Is the value a float/double? + */ + function doubleValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } +} + +if (!function_exists('floatValue')) { /** + * Is the value a float/double? + */ + function floatValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } +} + +if (!function_exists('integerValue')) { /** + * Is the value an integer? + */ + function integerValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } +} + +if (!function_exists('intValue')) { /** + * Is the value an integer? + */ + function intValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } +} + +if (!function_exists('numericValue')) { /** + * Is the value a numeric? + */ + function numericValue() + { + return \Hamcrest\Type\IsNumeric::numericValue(); + } +} + +if (!function_exists('objectValue')) { /** + * Is the value an object? + */ + function objectValue() + { + return \Hamcrest\Type\IsObject::objectValue(); + } +} + +if (!function_exists('anObject')) { /** + * Is the value an object? + */ + function anObject() + { + return \Hamcrest\Type\IsObject::objectValue(); + } +} + +if (!function_exists('resourceValue')) { /** + * Is the value a resource? + */ + function resourceValue() + { + return \Hamcrest\Type\IsResource::resourceValue(); + } +} + +if (!function_exists('scalarValue')) { /** + * Is the value a scalar (boolean, integer, double, or string)? + */ + function scalarValue() + { + return \Hamcrest\Type\IsScalar::scalarValue(); + } +} + +if (!function_exists('stringValue')) { /** + * Is the value a string? + */ + function stringValue() + { + return \Hamcrest\Type\IsString::stringValue(); + } +} + +if (!function_exists('hasXPath')) { /** + * Wraps $matcher with {@link Hamcrest\Core\IsEqual) + * if it's not a matcher and the XPath in count() + * if it's an integer. + */ + function hasXPath($xpath, $matcher = null) + { + return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php new file mode 100644 index 0000000..9ea5697 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php @@ -0,0 +1,118 @@ +_elementMatchers = $elementMatchers; + } + + protected function matchesSafely($array) + { + if (array_keys($array) != array_keys($this->_elementMatchers)) { + return false; + } + + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_elementMatchers as $k => $matcher) { + if (!$matcher->matches($array[$k])) { + return false; + } + } + + return true; + } + + protected function describeMismatchSafely($actual, Description $mismatchDescription) + { + if (count($actual) != count($this->_elementMatchers)) { + $mismatchDescription->appendText('array length was ' . count($actual)); + + return; + } elseif (array_keys($actual) != array_keys($this->_elementMatchers)) { + $mismatchDescription->appendText('array keys were ') + ->appendValueList( + $this->descriptionStart(), + $this->descriptionSeparator(), + $this->descriptionEnd(), + array_keys($actual) + ) + ; + + return; + } + + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_elementMatchers as $k => $matcher) { + if (!$matcher->matches($actual[$k])) { + $mismatchDescription->appendText('element ')->appendValue($k) + ->appendText(' was ')->appendValue($actual[$k]); + + return; + } + } + } + + public function describeTo(Description $description) + { + $description->appendList( + $this->descriptionStart(), + $this->descriptionSeparator(), + $this->descriptionEnd(), + $this->_elementMatchers + ); + } + + /** + * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i]. + * + * @factory ... + */ + public static function anArray(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } + + // -- Protected Methods + + protected function descriptionStart() + { + return '['; + } + + protected function descriptionSeparator() + { + return ', '; + } + + protected function descriptionEnd() + { + return ']'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php new file mode 100644 index 0000000..0e4a1ed --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php @@ -0,0 +1,63 @@ +_elementMatcher = $elementMatcher; + } + + protected function matchesSafely($array) + { + foreach ($array as $element) { + if ($this->_elementMatcher->matches($element)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($array, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendValue($array); + } + + public function describeTo(Description $description) + { + $description + ->appendText('an array containing ') + ->appendDescriptionOf($this->_elementMatcher) + ; + } + + /** + * Evaluates to true if any item in an array satisfies the given matcher. + * + * @param mixed $item as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContaining + * @factory hasValue + */ + public static function hasItemInArray($item) + { + return new self(Util::wrapValueWithIsEqual($item)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php new file mode 100644 index 0000000..9009026 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php @@ -0,0 +1,59 @@ +_elementMatchers = $elementMatchers; + } + + protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription) + { + $matching = new MatchingOnce($this->_elementMatchers, $mismatchDescription); + + foreach ($array as $element) { + if (!$matching->matches($element)) { + return false; + } + } + + return $matching->isFinished($array); + } + + public function describeTo(Description $description) + { + $description->appendList('[', ', ', ']', $this->_elementMatchers) + ->appendText(' in any order') + ; + } + + /** + * An array with elements that match the given matchers. + * + * @factory containsInAnyOrder ... + */ + public static function arrayContainingInAnyOrder(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php new file mode 100644 index 0000000..6115740 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php @@ -0,0 +1,57 @@ +_elementMatchers = $elementMatchers; + } + + protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription) + { + $series = new SeriesMatchingOnce($this->_elementMatchers, $mismatchDescription); + + foreach ($array as $element) { + if (!$series->matches($element)) { + return false; + } + } + + return $series->isFinished(); + } + + public function describeTo(Description $description) + { + $description->appendList('[', ', ', ']', $this->_elementMatchers); + } + + /** + * An array with elements that match the given matchers in the same order. + * + * @factory contains ... + */ + public static function arrayContaining(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php new file mode 100644 index 0000000..523477e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php @@ -0,0 +1,75 @@ +_keyMatcher = $keyMatcher; + } + + protected function matchesSafely($array) + { + foreach ($array as $key => $element) { + if ($this->_keyMatcher->matches($key)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($array, Description $mismatchDescription) + { + //Not using appendValueList() so that keys can be shown + $mismatchDescription->appendText('array was ') + ->appendText('[') + ; + $loop = false; + foreach ($array as $key => $value) { + if ($loop) { + $mismatchDescription->appendText(', '); + } + $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value); + $loop = true; + } + $mismatchDescription->appendText(']'); + } + + public function describeTo(Description $description) + { + $description + ->appendText('array with key ') + ->appendDescriptionOf($this->_keyMatcher) + ; + } + + /** + * Evaluates to true if any key in an array matches the given matcher. + * + * @param mixed $key as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContainingKey + * @factory hasKey + */ + public static function hasKeyInArray($key) + { + return new self(Util::wrapValueWithIsEqual($key)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php new file mode 100644 index 0000000..9ac3eba --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php @@ -0,0 +1,80 @@ +_keyMatcher = $keyMatcher; + $this->_valueMatcher = $valueMatcher; + } + + protected function matchesSafely($array) + { + foreach ($array as $key => $value) { + if ($this->_keyMatcher->matches($key) && $this->_valueMatcher->matches($value)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($array, Description $mismatchDescription) + { + //Not using appendValueList() so that keys can be shown + $mismatchDescription->appendText('array was ') + ->appendText('[') + ; + $loop = false; + foreach ($array as $key => $value) { + if ($loop) { + $mismatchDescription->appendText(', '); + } + $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value); + $loop = true; + } + $mismatchDescription->appendText(']'); + } + + public function describeTo(Description $description) + { + $description->appendText('array containing [') + ->appendDescriptionOf($this->_keyMatcher) + ->appendText(' => ') + ->appendDescriptionOf($this->_valueMatcher) + ->appendText(']') + ; + } + + /** + * Test if an array has both an key and value in parity with each other. + * + * @factory hasEntry + */ + public static function hasKeyValuePair($key, $value) + { + return new self( + Util::wrapValueWithIsEqual($key), + Util::wrapValueWithIsEqual($value) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php new file mode 100644 index 0000000..074375c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php @@ -0,0 +1,73 @@ +_elementMatchers = $elementMatchers; + $this->_mismatchDescription = $mismatchDescription; + } + + public function matches($item) + { + return $this->_isNotSurplus($item) && $this->_isMatched($item); + } + + public function isFinished($items) + { + if (empty($this->_elementMatchers)) { + return true; + } + + $this->_mismatchDescription + ->appendText('No item matches: ')->appendList('', ', ', '', $this->_elementMatchers) + ->appendText(' in ')->appendValueList('[', ', ', ']', $items) + ; + + return false; + } + + // -- Private Methods + + private function _isNotSurplus($item) + { + if (empty($this->_elementMatchers)) { + $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); + + return false; + } + + return true; + } + + private function _isMatched($item) + { + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_elementMatchers as $i => $matcher) { + if ($matcher->matches($item)) { + unset($this->_elementMatchers[$i]); + + return true; + } + } + + $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); + + return false; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php new file mode 100644 index 0000000..12a912d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php @@ -0,0 +1,75 @@ +_elementMatchers = $elementMatchers; + $this->_keys = array_keys($elementMatchers); + $this->_mismatchDescription = $mismatchDescription; + } + + public function matches($item) + { + return $this->_isNotSurplus($item) && $this->_isMatched($item); + } + + public function isFinished() + { + if (!empty($this->_elementMatchers)) { + $nextMatcher = current($this->_elementMatchers); + $this->_mismatchDescription->appendText('No item matched: ')->appendDescriptionOf($nextMatcher); + + return false; + } + + return true; + } + + // -- Private Methods + + private function _isNotSurplus($item) + { + if (empty($this->_elementMatchers)) { + $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); + + return false; + } + + return true; + } + + private function _isMatched($item) + { + $this->_nextMatchKey = array_shift($this->_keys); + $nextMatcher = array_shift($this->_elementMatchers); + + if (!$nextMatcher->matches($item)) { + $this->_describeMismatch($nextMatcher, $item); + + return false; + } + + return true; + } + + private function _describeMismatch(Matcher $matcher, $item) + { + $this->_mismatchDescription->appendText('item with key ' . $this->_nextMatchKey . ': '); + $matcher->describeMismatch($item, $this->_mismatchDescription); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php new file mode 100644 index 0000000..3a2a0e7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php @@ -0,0 +1,10 @@ +append($text); + + return $this; + } + + public function appendDescriptionOf(SelfDescribing $value) + { + $value->describeTo($this); + + return $this; + } + + public function appendValue($value) + { + if (is_null($value)) { + $this->append('null'); + } elseif (is_string($value)) { + $this->_toPhpSyntax($value); + } elseif (is_float($value)) { + $this->append('<'); + $this->append($value); + $this->append('F>'); + } elseif (is_bool($value)) { + $this->append('<'); + $this->append($value ? 'true' : 'false'); + $this->append('>'); + } elseif (is_array($value) || $value instanceof \Iterator || $value instanceof \IteratorAggregate) { + $this->appendValueList('[', ', ', ']', $value); + } elseif (is_object($value) && !method_exists($value, '__toString')) { + $this->append('<'); + $this->append(get_class($value)); + $this->append('>'); + } else { + $this->append('<'); + $this->append($value); + $this->append('>'); + } + + return $this; + } + + public function appendValueList($start, $separator, $end, $values) + { + $list = array(); + foreach ($values as $v) { + $list[] = new SelfDescribingValue($v); + } + + $this->appendList($start, $separator, $end, $list); + + return $this; + } + + public function appendList($start, $separator, $end, $values) + { + $this->append($start); + + $separate = false; + + foreach ($values as $value) { + /*if (!($value instanceof Hamcrest\SelfDescribing)) { + $value = new Hamcrest\Internal\SelfDescribingValue($value); + }*/ + + if ($separate) { + $this->append($separator); + } + + $this->appendDescriptionOf($value); + + $separate = true; + } + + $this->append($end); + + return $this; + } + + // -- Protected Methods + + /** + * Append the String $str to the description. + */ + abstract protected function append($str); + + // -- Private Methods + + private function _toPhpSyntax($value) + { + $str = '"'; + for ($i = 0, $len = strlen($value); $i < $len; ++$i) { + switch ($value[$i]) { + case '"': + $str .= '\\"'; + break; + + case "\t": + $str .= '\\t'; + break; + + case "\r": + $str .= '\\r'; + break; + + case "\n": + $str .= '\\n'; + break; + + default: + $str .= $value[$i]; + } + } + $str .= '"'; + $this->append($str); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php new file mode 100644 index 0000000..286db3e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php @@ -0,0 +1,25 @@ +appendText('was ')->appendValue($item); + } + + public function __toString() + { + return StringDescription::toString($this); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php new file mode 100644 index 0000000..8ab58ea --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php @@ -0,0 +1,71 @@ +_empty = $empty; + } + + public function matches($item) + { + if (!$item instanceof \Traversable) { + return false; + } + + foreach ($item as $value) { + return !$this->_empty; + } + + return $this->_empty; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_empty ? 'an empty traversable' : 'a non-empty traversable'); + } + + /** + * Returns true if traversable is empty. + * + * @factory + */ + public static function emptyTraversable() + { + if (!self::$_INSTANCE) { + self::$_INSTANCE = new self; + } + + return self::$_INSTANCE; + } + + /** + * Returns true if traversable is not empty. + * + * @factory + */ + public static function nonEmptyTraversable() + { + if (!self::$_NOT_INSTANCE) { + self::$_NOT_INSTANCE = new self(false); + } + + return self::$_NOT_INSTANCE; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php new file mode 100644 index 0000000..c95edc5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php @@ -0,0 +1,47 @@ +false. + */ +class AllOf extends DiagnosingMatcher +{ + + private $_matchers; + + public function __construct(array $matchers) + { + Util::checkAllAreMatchers($matchers); + + $this->_matchers = $matchers; + } + + public function matchesWithDiagnosticDescription($item, Description $mismatchDescription) + { + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_matchers as $matcher) { + if (!$matcher->matches($item)) { + $mismatchDescription->appendDescriptionOf($matcher)->appendText(' '); + $matcher->describeMismatch($item, $mismatchDescription); + + return false; + } + } + + return true; + } + + public function describeTo(Description $description) + { + $description->appendList('(', ' and ', ')', $this->_matchers); + } + + /** + * Evaluates to true only if ALL of the passed in matchers evaluate to true. + * + * @factory ... + */ + public static function allOf(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php new file mode 100644 index 0000000..4504279 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php @@ -0,0 +1,58 @@ +true. + */ +class AnyOf extends ShortcutCombination +{ + + public function __construct(array $matchers) + { + parent::__construct($matchers); + } + + public function matches($item) + { + return $this->matchesWithShortcut($item, true); + } + + public function describeTo(Description $description) + { + $this->describeToWithOperator($description, 'or'); + } + + /** + * Evaluates to true if ANY of the passed in matchers evaluate to true. + * + * @factory ... + */ + public static function anyOf(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } + + /** + * Evaluates to false if ANY of the passed in matchers evaluate to true. + * + * @factory ... + */ + public static function noneOf(/* args... */) + { + $args = func_get_args(); + + return IsNot::not( + new self(Util::createMatcherArray($args)) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php new file mode 100644 index 0000000..e3b4aa7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php @@ -0,0 +1,78 @@ +_matcher = $matcher; + } + + public function matches($item) + { + return $this->_matcher->matches($item); + } + + public function describeTo(Description $description) + { + $description->appendDescriptionOf($this->_matcher); + } + + /** Diversion from Hamcrest-Java... Logical "and" not permitted */ + public function andAlso(Matcher $other) + { + return new self(new AllOf($this->_templatedListWith($other))); + } + + /** Diversion from Hamcrest-Java... Logical "or" not permitted */ + public function orElse(Matcher $other) + { + return new self(new AnyOf($this->_templatedListWith($other))); + } + + /** + * This is useful for fluently combining matchers that must both pass. + * For example: + *
+     *   assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
+     * 
+ * + * @factory + */ + public static function both(Matcher $matcher) + { + return new self($matcher); + } + + /** + * This is useful for fluently combining matchers where either may pass, + * for example: + *
+     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+     * 
+ * + * @factory + */ + public static function either(Matcher $matcher) + { + return new self($matcher); + } + + // -- Private Methods + + private function _templatedListWith(Matcher $other) + { + return array($this->_matcher, $other); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php new file mode 100644 index 0000000..5b2583f --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php @@ -0,0 +1,68 @@ +_descriptionTemplate = $descriptionTemplate; + $this->_matcher = $matcher; + $this->_values = $values; + } + + public function matches($item) + { + return $this->_matcher->matches($item); + } + + public function describeTo(Description $description) + { + $textStart = 0; + while (preg_match(self::ARG_PATTERN, $this->_descriptionTemplate, $matches, PREG_OFFSET_CAPTURE, $textStart)) { + $text = $matches[0][0]; + $index = $matches[1][0]; + $offset = $matches[0][1]; + + $description->appendText(substr($this->_descriptionTemplate, $textStart, $offset - $textStart)); + $description->appendValue($this->_values[$index]); + + $textStart = $offset + strlen($text); + } + + if ($textStart < strlen($this->_descriptionTemplate)) { + $description->appendText(substr($this->_descriptionTemplate, $textStart)); + } + } + + /** + * Wraps an existing matcher and overrides the description when it fails. + * + * @factory ... + */ + public static function describedAs(/* $description, Hamcrest\Matcher $matcher, $values... */) + { + $args = func_get_args(); + $description = array_shift($args); + $matcher = array_shift($args); + $values = $args; + + return new self($description, $matcher, $values); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php new file mode 100644 index 0000000..d686f8d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php @@ -0,0 +1,56 @@ +_matcher = $matcher; + } + + protected function matchesSafelyWithDiagnosticDescription($items, Description $mismatchDescription) + { + foreach ($items as $item) { + if (!$this->_matcher->matches($item)) { + $mismatchDescription->appendText('an item '); + $this->_matcher->describeMismatch($item, $mismatchDescription); + + return false; + } + } + + return true; + } + + public function describeTo(Description $description) + { + $description->appendText('every item is ')->appendDescriptionOf($this->_matcher); + } + + /** + * @param Matcher $itemMatcher + * A matcher to apply to every element in an array. + * + * @return \Hamcrest\Core\Every + * Evaluates to TRUE for a collection in which every item matches $itemMatcher + * + * @factory + */ + public static function everyItem(Matcher $itemMatcher) + { + return new self($itemMatcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php new file mode 100644 index 0000000..45bd910 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php @@ -0,0 +1,56 @@ +toString(); + } + + return (string) $actual; + } + + /** + * Does array size satisfy a given matcher? + * + * @factory + */ + public static function hasToString($matcher) + { + return new self(Util::wrapValueWithIsEqual($matcher)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php new file mode 100644 index 0000000..41266dc --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php @@ -0,0 +1,57 @@ +_matcher = $matcher; + } + + public function matches($arg) + { + return $this->_matcher->matches($arg); + } + + public function describeTo(Description $description) + { + $description->appendText('is ')->appendDescriptionOf($this->_matcher); + } + + public function describeMismatch($item, Description $mismatchDescription) + { + $this->_matcher->describeMismatch($item, $mismatchDescription); + } + + /** + * Decorates another Matcher, retaining the behavior but allowing tests + * to be slightly more expressive. + * + * For example: assertThat($cheese, equalTo($smelly)) + * vs. assertThat($cheese, is(equalTo($smelly))) + * + * @factory + */ + public static function is($value) + { + return new self(Util::wrapValueWithIsEqual($value)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php new file mode 100644 index 0000000..f20e6c0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php @@ -0,0 +1,45 @@ +true. + */ +class IsAnything extends BaseMatcher +{ + + private $_message; + + public function __construct($message = 'ANYTHING') + { + $this->_message = $message; + } + + public function matches($item) + { + return true; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_message); + } + + /** + * This matcher always evaluates to true. + * + * @param string $description A meaningful string used when describing itself. + * + * @return \Hamcrest\Core\IsAnything + * @factory + */ + public static function anything($description = 'ANYTHING') + { + return new self($description); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php new file mode 100644 index 0000000..5e60426 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php @@ -0,0 +1,93 @@ +_elementMatcher = $elementMatcher; + } + + protected function matchesSafely($items) + { + foreach ($items as $item) { + if ($this->_elementMatcher->matches($item)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($items, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendValue($items); + } + + public function describeTo(Description $description) + { + $description + ->appendText('a collection containing ') + ->appendDescriptionOf($this->_elementMatcher) + ; + } + + /** + * Test if the value is an array containing this matcher. + * + * Example: + *
+     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+     * //Convenience defaults to equalTo()
+     * assertThat(array('a', 'b'), hasItem('b'));
+     * 
+ * + * @factory ... + */ + public static function hasItem() + { + $args = func_get_args(); + $firstArg = array_shift($args); + + return new self(Util::wrapValueWithIsEqual($firstArg)); + } + + /** + * Test if the value is an array containing elements that match all of these + * matchers. + * + * Example: + *
+     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+     * 
+ * + * @factory ... + */ + public static function hasItems(/* args... */) + { + $args = func_get_args(); + $matchers = array(); + + foreach ($args as $arg) { + $matchers[] = self::hasItem($arg); + } + + return AllOf::allOf($matchers); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php new file mode 100644 index 0000000..523fba0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php @@ -0,0 +1,44 @@ +_item = $item; + } + + public function matches($arg) + { + return (($arg == $this->_item) && ($this->_item == $arg)); + } + + public function describeTo(Description $description) + { + $description->appendValue($this->_item); + } + + /** + * Is the value equal to another value, as tested by the use of the "==" + * comparison operator? + * + * @factory + */ + public static function equalTo($item) + { + return new self($item); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php new file mode 100644 index 0000000..28f7b36 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php @@ -0,0 +1,38 @@ +_value = $value; + } + + public function describeTo(Description $description) + { + $description->appendValue($this->_value); + } + + /** + * Tests of the value is identical to $value as tested by the "===" operator. + * + * @factory + */ + public static function identicalTo($value) + { + return new self($value); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php new file mode 100644 index 0000000..7a5c92a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php @@ -0,0 +1,67 @@ +_theClass = $theClass; + } + + protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription) + { + if (!is_object($item)) { + $mismatchDescription->appendText('was ')->appendValue($item); + + return false; + } + + if (!($item instanceof $this->_theClass)) { + $mismatchDescription->appendText('[' . get_class($item) . '] ') + ->appendValue($item); + + return false; + } + + return true; + } + + public function describeTo(Description $description) + { + $description->appendText('an instance of ') + ->appendText($this->_theClass) + ; + } + + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + * + * @factory any + */ + public static function anInstanceOf($theClass) + { + return new self($theClass); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php new file mode 100644 index 0000000..167f0d0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php @@ -0,0 +1,44 @@ +_matcher = $matcher; + } + + public function matches($arg) + { + return !$this->_matcher->matches($arg); + } + + public function describeTo(Description $description) + { + $description->appendText('not ')->appendDescriptionOf($this->_matcher); + } + + /** + * Matches if value does not match $value. + * + * @factory + */ + public static function not($value) + { + return new self(Util::wrapValueWithIsEqual($value)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php new file mode 100644 index 0000000..91a454c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php @@ -0,0 +1,56 @@ +appendText('null'); + } + + /** + * Matches if value is null. + * + * @factory + */ + public static function nullValue() + { + if (!self::$_INSTANCE) { + self::$_INSTANCE = new self(); + } + + return self::$_INSTANCE; + } + + /** + * Matches if value is not null. + * + * @factory + */ + public static function notNullValue() + { + if (!self::$_NOT_INSTANCE) { + self::$_NOT_INSTANCE = IsNot::not(self::nullValue()); + } + + return self::$_NOT_INSTANCE; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php new file mode 100644 index 0000000..8107870 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php @@ -0,0 +1,51 @@ +_object = $object; + } + + public function matches($object) + { + return ($object === $this->_object) && ($this->_object === $object); + } + + public function describeTo(Description $description) + { + $description->appendText('sameInstance(') + ->appendValue($this->_object) + ->appendText(')') + ; + } + + /** + * Creates a new instance of IsSame. + * + * @param mixed $object + * The predicate evaluates to true only when the argument is + * this object. + * + * @return \Hamcrest\Core\IsSame + * @factory + */ + public static function sameInstance($object) + { + return new self($object); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php new file mode 100644 index 0000000..d24f0f9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php @@ -0,0 +1,71 @@ +_theType = strtolower($theType); + } + + public function matches($item) + { + return strtolower(gettype($item)) == $this->_theType; + } + + public function describeTo(Description $description) + { + $description->appendText(self::getTypeDescription($this->_theType)); + } + + public function describeMismatch($item, Description $description) + { + if ($item === null) { + $description->appendText('was null'); + } else { + $description->appendText('was ') + ->appendText(self::getTypeDescription(strtolower(gettype($item)))) + ->appendText(' ') + ->appendValue($item) + ; + } + } + + public static function getTypeDescription($type) + { + if ($type == 'null') { + return 'null'; + } + + return (strpos('aeiou', substr($type, 0, 1)) === false ? 'a ' : 'an ') + . $type; + } + + /** + * Is the value a particular built-in type? + * + * @factory + */ + public static function typeOf($theType) + { + return new self($theType); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php new file mode 100644 index 0000000..cdc45d5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php @@ -0,0 +1,95 @@ + + * assertThat(array('a', 'b'), set('b')); + * assertThat($foo, set('bar')); + * assertThat('Server', notSet('defaultPort')); + * + * + * @todo Replace $property with a matcher and iterate all property names. + */ +class Set extends BaseMatcher +{ + + private $_property; + private $_not; + + public function __construct($property, $not = false) + { + $this->_property = $property; + $this->_not = $not; + } + + public function matches($item) + { + if ($item === null) { + return false; + } + $property = $this->_property; + if (is_array($item)) { + $result = isset($item[$property]); + } elseif (is_object($item)) { + $result = isset($item->$property); + } elseif (is_string($item)) { + $result = isset($item::$$property); + } else { + throw new \InvalidArgumentException('Must pass an object, array, or class name'); + } + + return $this->_not ? !$result : $result; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_not ? 'unset property ' : 'set property ')->appendText($this->_property); + } + + public function describeMismatch($item, Description $description) + { + $value = ''; + if (!$this->_not) { + $description->appendText('was not set'); + } else { + $property = $this->_property; + if (is_array($item)) { + $value = $item[$property]; + } elseif (is_object($item)) { + $value = $item->$property; + } elseif (is_string($item)) { + $value = $item::$$property; + } + parent::describeMismatch($value, $description); + } + } + + /** + * Matches if value (class, object, or array) has named $property. + * + * @factory + */ + public static function set($property) + { + return new self($property); + } + + /** + * Matches if value (class, object, or array) does not have named $property. + * + * @factory + */ + public static function notSet($property) + { + return new self($property, true); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php new file mode 100644 index 0000000..d93db74 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php @@ -0,0 +1,43 @@ + + */ + private $_matchers; + + public function __construct(array $matchers) + { + Util::checkAllAreMatchers($matchers); + + $this->_matchers = $matchers; + } + + protected function matchesWithShortcut($item, $shortcut) + { + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_matchers as $matcher) { + if ($matcher->matches($item) == $shortcut) { + return $shortcut; + } + } + + return !$shortcut; + } + + public function describeToWithOperator(Description $description, $operator) + { + $description->appendList('(', ' ' . $operator . ' ', ')', $this->_matchers); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php new file mode 100644 index 0000000..9a482db --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php @@ -0,0 +1,70 @@ +matchesWithDiagnosticDescription($item, new NullDescription()); + } + + public function describeMismatch($item, Description $mismatchDescription) + { + $this->matchesWithDiagnosticDescription($item, $mismatchDescription); + } + + abstract protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php new file mode 100644 index 0000000..59f6cc7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php @@ -0,0 +1,67 @@ +featureValueOf() in a subclass to pull out the feature to be + * matched against. + */ +abstract class FeatureMatcher extends TypeSafeDiagnosingMatcher +{ + + private $_subMatcher; + private $_featureDescription; + private $_featureName; + + /** + * Constructor. + * + * @param string $type + * @param string $subtype + * @param \Hamcrest\Matcher $subMatcher The matcher to apply to the feature + * @param string $featureDescription Descriptive text to use in describeTo + * @param string $featureName Identifying text for mismatch message + */ + public function __construct($type, $subtype, Matcher $subMatcher, $featureDescription, $featureName) + { + parent::__construct($type, $subtype); + + $this->_subMatcher = $subMatcher; + $this->_featureDescription = $featureDescription; + $this->_featureName = $featureName; + } + + /** + * Implement this to extract the interesting feature. + * + * @param mixed $actual the target object + * + * @return mixed the feature to be matched + */ + abstract protected function featureValueOf($actual); + + public function matchesSafelyWithDiagnosticDescription($actual, Description $mismatchDescription) + { + $featureValue = $this->featureValueOf($actual); + + if (!$this->_subMatcher->matches($featureValue)) { + $mismatchDescription->appendText($this->_featureName) + ->appendText(' was ')->appendValue($featureValue); + + return false; + } + + return true; + } + + final public function describeTo(Description $description) + { + $description->appendText($this->_featureDescription)->appendText(' ') + ->appendDescriptionOf($this->_subMatcher) + ; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php new file mode 100644 index 0000000..995da71 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php @@ -0,0 +1,27 @@ +_value = $value; + } + + public function describeTo(Description $description) + { + $description->appendValue($this->_value); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php new file mode 100644 index 0000000..e5dcf09 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php @@ -0,0 +1,50 @@ + + * Matcher implementations should NOT directly implement this interface. + * Instead, extend the {@link Hamcrest\BaseMatcher} abstract class, + * which will ensure that the Matcher API can grow to support + * new features and remain compatible with all Matcher implementations. + *

+ * For easy access to common Matcher implementations, use the static factory + * methods in {@link Hamcrest\CoreMatchers}. + * + * @see Hamcrest\CoreMatchers + * @see Hamcrest\BaseMatcher + */ +interface Matcher extends SelfDescribing +{ + + /** + * Evaluates the matcher for argument $item. + * + * @param mixed $item the object against which the matcher is evaluated. + * + * @return boolean true if $item matches, + * otherwise false. + * + * @see Hamcrest\BaseMatcher + */ + public function matches($item); + + /** + * Generate a description of why the matcher has not accepted the item. + * The description will be part of a larger description of why a matching + * failed, so it should be concise. + * This method assumes that matches($item) is false, but + * will not check this. + * + * @param mixed $item The item that the Matcher has rejected. + * @param Description $description + * @return + */ + public function describeMismatch($item, Description $description); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php new file mode 100644 index 0000000..d546dbe --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php @@ -0,0 +1,118 @@ + + * // With an identifier + * assertThat("apple flavour", $apple->flavour(), equalTo("tasty")); + * // Without an identifier + * assertThat($apple->flavour(), equalTo("tasty")); + * // Evaluating a boolean expression + * assertThat("some error", $a > $b); + * assertThat($a > $b); + * + */ + public static function assertThat(/* $args ... */) + { + $args = func_get_args(); + switch (count($args)) { + case 1: + self::$_count++; + if (!$args[0]) { + throw new AssertionError(); + } + break; + + case 2: + self::$_count++; + if ($args[1] instanceof Matcher) { + self::doAssert('', $args[0], $args[1]); + } elseif (!$args[1]) { + throw new AssertionError($args[0]); + } + break; + + case 3: + self::$_count++; + self::doAssert( + $args[0], + $args[1], + Util::wrapValueWithIsEqual($args[2]) + ); + break; + + default: + throw new \InvalidArgumentException('assertThat() requires one to three arguments'); + } + } + + /** + * Returns the number of assertions performed. + * + * @return int + */ + public static function getCount() + { + return self::$_count; + } + + /** + * Resets the number of assertions performed to zero. + */ + public static function resetCount() + { + self::$_count = 0; + } + + /** + * Performs the actual assertion logic. + * + * If $matcher doesn't match $actual, + * throws a {@link Hamcrest\AssertionError} with a description + * of the failure along with the optional $identifier. + * + * @param string $identifier added to the message upon failure + * @param mixed $actual value to compare against $matcher + * @param \Hamcrest\Matcher $matcher applied to $actual + * @throws AssertionError + */ + private static function doAssert($identifier, $actual, Matcher $matcher) + { + if (!$matcher->matches($actual)) { + $description = new StringDescription(); + if (!empty($identifier)) { + $description->appendText($identifier . PHP_EOL); + } + $description->appendText('Expected: ') + ->appendDescriptionOf($matcher) + ->appendText(PHP_EOL . ' but: '); + + $matcher->describeMismatch($actual, $description); + + throw new AssertionError((string) $description); + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php new file mode 100644 index 0000000..23232e4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php @@ -0,0 +1,713 @@ + + * assertThat($string, both(containsString("a"))->andAlso(containsString("b"))); + * + */ + public static function both(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::both($matcher); + } + + /** + * This is useful for fluently combining matchers where either may pass, + * for example: + *

+     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+     * 
+ */ + public static function either(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::either($matcher); + } + + /** + * Wraps an existing matcher and overrides the description when it fails. + */ + public static function describedAs(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args); + } + + /** + * @param Matcher $itemMatcher + * A matcher to apply to every element in an array. + * + * @return \Hamcrest\Core\Every + * Evaluates to TRUE for a collection in which every item matches $itemMatcher + */ + public static function everyItem(\Hamcrest\Matcher $itemMatcher) + { + return \Hamcrest\Core\Every::everyItem($itemMatcher); + } + + /** + * Does array size satisfy a given matcher? + */ + public static function hasToString($matcher) + { + return \Hamcrest\Core\HasToString::hasToString($matcher); + } + + /** + * Decorates another Matcher, retaining the behavior but allowing tests + * to be slightly more expressive. + * + * For example: assertThat($cheese, equalTo($smelly)) + * vs. assertThat($cheese, is(equalTo($smelly))) + */ + public static function is($value) + { + return \Hamcrest\Core\Is::is($value); + } + + /** + * This matcher always evaluates to true. + * + * @param string $description A meaningful string used when describing itself. + * + * @return \Hamcrest\Core\IsAnything + */ + public static function anything($description = 'ANYTHING') + { + return \Hamcrest\Core\IsAnything::anything($description); + } + + /** + * Test if the value is an array containing this matcher. + * + * Example: + *
+     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+     * //Convenience defaults to equalTo()
+     * assertThat(array('a', 'b'), hasItem('b'));
+     * 
+ */ + public static function hasItem(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args); + } + + /** + * Test if the value is an array containing elements that match all of these + * matchers. + * + * Example: + *
+     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+     * 
+ */ + public static function hasItems(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args); + } + + /** + * Is the value equal to another value, as tested by the use of the "==" + * comparison operator? + */ + public static function equalTo($item) + { + return \Hamcrest\Core\IsEqual::equalTo($item); + } + + /** + * Tests of the value is identical to $value as tested by the "===" operator. + */ + public static function identicalTo($value) + { + return \Hamcrest\Core\IsIdentical::identicalTo($value); + } + + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + public static function anInstanceOf($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } + + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + public static function any($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } + + /** + * Matches if value does not match $value. + */ + public static function not($value) + { + return \Hamcrest\Core\IsNot::not($value); + } + + /** + * Matches if value is null. + */ + public static function nullValue() + { + return \Hamcrest\Core\IsNull::nullValue(); + } + + /** + * Matches if value is not null. + */ + public static function notNullValue() + { + return \Hamcrest\Core\IsNull::notNullValue(); + } + + /** + * Creates a new instance of IsSame. + * + * @param mixed $object + * The predicate evaluates to true only when the argument is + * this object. + * + * @return \Hamcrest\Core\IsSame + */ + public static function sameInstance($object) + { + return \Hamcrest\Core\IsSame::sameInstance($object); + } + + /** + * Is the value a particular built-in type? + */ + public static function typeOf($theType) + { + return \Hamcrest\Core\IsTypeOf::typeOf($theType); + } + + /** + * Matches if value (class, object, or array) has named $property. + */ + public static function set($property) + { + return \Hamcrest\Core\Set::set($property); + } + + /** + * Matches if value (class, object, or array) does not have named $property. + */ + public static function notSet($property) + { + return \Hamcrest\Core\Set::notSet($property); + } + + /** + * Matches if value is a number equal to $value within some range of + * acceptable error $delta. + */ + public static function closeTo($value, $delta) + { + return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta); + } + + /** + * The value is not > $value, nor < $value. + */ + public static function comparesEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value); + } + + /** + * The value is > $value. + */ + public static function greaterThan($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThan($value); + } + + /** + * The value is >= $value. + */ + public static function greaterThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } + + /** + * The value is >= $value. + */ + public static function atLeast($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } + + /** + * The value is < $value. + */ + public static function lessThan($value) + { + return \Hamcrest\Number\OrderingComparison::lessThan($value); + } + + /** + * The value is <= $value. + */ + public static function lessThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } + + /** + * The value is <= $value. + */ + public static function atMost($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } + + /** + * Matches if value is a zero-length string. + */ + public static function isEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } + + /** + * Matches if value is a zero-length string. + */ + public static function emptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } + + /** + * Matches if value is null or a zero-length string. + */ + public static function isEmptyOrNullString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } + + /** + * Matches if value is null or a zero-length string. + */ + public static function nullOrEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } + + /** + * Matches if value is a non-zero-length string. + */ + public static function isNonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } + + /** + * Matches if value is a non-zero-length string. + */ + public static function nonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } + + /** + * Matches if value is a string equal to $string, regardless of the case. + */ + public static function equalToIgnoringCase($string) + { + return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string); + } + + /** + * Matches if value is a string equal to $string, regardless of whitespace. + */ + public static function equalToIgnoringWhiteSpace($string) + { + return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string); + } + + /** + * Matches if value is a string that matches regular expression $pattern. + */ + public static function matchesPattern($pattern) + { + return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern); + } + + /** + * Matches if value is a string that contains $substring. + */ + public static function containsString($substring) + { + return \Hamcrest\Text\StringContains::containsString($substring); + } + + /** + * Matches if value is a string that contains $substring regardless of the case. + */ + public static function containsStringIgnoringCase($substring) + { + return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring); + } + + /** + * Matches if value contains $substrings in a constrained order. + */ + public static function stringContainsInOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args); + } + + /** + * Matches if value is a string that ends with $substring. + */ + public static function endsWith($substring) + { + return \Hamcrest\Text\StringEndsWith::endsWith($substring); + } + + /** + * Matches if value is a string that starts with $substring. + */ + public static function startsWith($substring) + { + return \Hamcrest\Text\StringStartsWith::startsWith($substring); + } + + /** + * Is the value an array? + */ + public static function arrayValue() + { + return \Hamcrest\Type\IsArray::arrayValue(); + } + + /** + * Is the value a boolean? + */ + public static function booleanValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } + + /** + * Is the value a boolean? + */ + public static function boolValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } + + /** + * Is the value callable? + */ + public static function callableValue() + { + return \Hamcrest\Type\IsCallable::callableValue(); + } + + /** + * Is the value a float/double? + */ + public static function doubleValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } + + /** + * Is the value a float/double? + */ + public static function floatValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } + + /** + * Is the value an integer? + */ + public static function integerValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } + + /** + * Is the value an integer? + */ + public static function intValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } + + /** + * Is the value a numeric? + */ + public static function numericValue() + { + return \Hamcrest\Type\IsNumeric::numericValue(); + } + + /** + * Is the value an object? + */ + public static function objectValue() + { + return \Hamcrest\Type\IsObject::objectValue(); + } + + /** + * Is the value an object? + */ + public static function anObject() + { + return \Hamcrest\Type\IsObject::objectValue(); + } + + /** + * Is the value a resource? + */ + public static function resourceValue() + { + return \Hamcrest\Type\IsResource::resourceValue(); + } + + /** + * Is the value a scalar (boolean, integer, double, or string)? + */ + public static function scalarValue() + { + return \Hamcrest\Type\IsScalar::scalarValue(); + } + + /** + * Is the value a string? + */ + public static function stringValue() + { + return \Hamcrest\Type\IsString::stringValue(); + } + + /** + * Wraps $matcher with {@link Hamcrest\Core\IsEqual) + * if it's not a matcher and the XPath in count() + * if it's an integer. + */ + public static function hasXPath($xpath, $matcher = null) + { + return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php new file mode 100644 index 0000000..aae8e46 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php @@ -0,0 +1,43 @@ +_value = $value; + $this->_delta = $delta; + } + + protected function matchesSafely($item) + { + return $this->_actualDelta($item) <= 0.0; + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendValue($item) + ->appendText(' differed by ') + ->appendValue($this->_actualDelta($item)) + ; + } + + public function describeTo(Description $description) + { + $description->appendText('a numeric value within ') + ->appendValue($this->_delta) + ->appendText(' of ') + ->appendValue($this->_value) + ; + } + + /** + * Matches if value is a number equal to $value within some range of + * acceptable error $delta. + * + * @factory + */ + public static function closeTo($value, $delta) + { + return new self($value, $delta); + } + + // -- Private Methods + + private function _actualDelta($item) + { + return (abs(($item - $this->_value)) - $this->_delta); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php new file mode 100644 index 0000000..369d0cf --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php @@ -0,0 +1,132 @@ +_value = $value; + $this->_minCompare = $minCompare; + $this->_maxCompare = $maxCompare; + } + + protected function matchesSafely($other) + { + $compare = $this->_compare($this->_value, $other); + + return ($this->_minCompare <= $compare) && ($compare <= $this->_maxCompare); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription + ->appendValue($item)->appendText(' was ') + ->appendText($this->_comparison($this->_compare($this->_value, $item))) + ->appendText(' ')->appendValue($this->_value) + ; + } + + public function describeTo(Description $description) + { + $description->appendText('a value ') + ->appendText($this->_comparison($this->_minCompare)) + ; + if ($this->_minCompare != $this->_maxCompare) { + $description->appendText(' or ') + ->appendText($this->_comparison($this->_maxCompare)) + ; + } + $description->appendText(' ')->appendValue($this->_value); + } + + /** + * The value is not > $value, nor < $value. + * + * @factory + */ + public static function comparesEqualTo($value) + { + return new self($value, 0, 0); + } + + /** + * The value is > $value. + * + * @factory + */ + public static function greaterThan($value) + { + return new self($value, -1, -1); + } + + /** + * The value is >= $value. + * + * @factory atLeast + */ + public static function greaterThanOrEqualTo($value) + { + return new self($value, -1, 0); + } + + /** + * The value is < $value. + * + * @factory + */ + public static function lessThan($value) + { + return new self($value, 1, 1); + } + + /** + * The value is <= $value. + * + * @factory atMost + */ + public static function lessThanOrEqualTo($value) + { + return new self($value, 0, 1); + } + + // -- Private Methods + + private function _compare($left, $right) + { + $a = $left; + $b = $right; + + if ($a < $b) { + return -1; + } elseif ($a == $b) { + return 0; + } else { + return 1; + } + } + + private function _comparison($compare) + { + if ($compare > 0) { + return 'less than'; + } elseif ($compare == 0) { + return 'equal to'; + } else { + return 'greater than'; + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php new file mode 100644 index 0000000..872fdf9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php @@ -0,0 +1,23 @@ +_out = (string) $out; + } + + public function __toString() + { + return $this->_out; + } + + /** + * Return the description of a {@link Hamcrest\SelfDescribing} object as a + * String. + * + * @param \Hamcrest\SelfDescribing $selfDescribing + * The object to be described. + * + * @return string + * The description of the object. + */ + public static function toString(SelfDescribing $selfDescribing) + { + $self = new self(); + + return (string) $self->appendDescriptionOf($selfDescribing); + } + + /** + * Alias for {@link toString()}. + */ + public static function asString(SelfDescribing $selfDescribing) + { + return self::toString($selfDescribing); + } + + // -- Protected Methods + + protected function append($str) + { + $this->_out .= $str; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php new file mode 100644 index 0000000..2ae61b9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php @@ -0,0 +1,85 @@ +_empty = $empty; + } + + public function matches($item) + { + return $this->_empty + ? ($item === '') + : is_string($item) && $item !== ''; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_empty ? 'an empty string' : 'a non-empty string'); + } + + /** + * Matches if value is a zero-length string. + * + * @factory emptyString + */ + public static function isEmptyString() + { + if (!self::$_INSTANCE) { + self::$_INSTANCE = new self(true); + } + + return self::$_INSTANCE; + } + + /** + * Matches if value is null or a zero-length string. + * + * @factory nullOrEmptyString + */ + public static function isEmptyOrNullString() + { + if (!self::$_NULL_OR_EMPTY_INSTANCE) { + self::$_NULL_OR_EMPTY_INSTANCE = AnyOf::anyOf( + IsNull::nullvalue(), + self::isEmptyString() + ); + } + + return self::$_NULL_OR_EMPTY_INSTANCE; + } + + /** + * Matches if value is a non-zero-length string. + * + * @factory nonEmptyString + */ + public static function isNonEmptyString() + { + if (!self::$_NOT_INSTANCE) { + self::$_NOT_INSTANCE = new self(false); + } + + return self::$_NOT_INSTANCE; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php new file mode 100644 index 0000000..3836a8c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php @@ -0,0 +1,52 @@ +_string = $string; + } + + protected function matchesSafely($item) + { + return strtolower($this->_string) === strtolower($item); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendText($item); + } + + public function describeTo(Description $description) + { + $description->appendText('equalToIgnoringCase(') + ->appendValue($this->_string) + ->appendText(')') + ; + } + + /** + * Matches if value is a string equal to $string, regardless of the case. + * + * @factory + */ + public static function equalToIgnoringCase($string) + { + return new self($string); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php new file mode 100644 index 0000000..853692b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php @@ -0,0 +1,66 @@ +_string = $string; + } + + protected function matchesSafely($item) + { + return (strtolower($this->_stripSpace($item)) + === strtolower($this->_stripSpace($this->_string))); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendText($item); + } + + public function describeTo(Description $description) + { + $description->appendText('equalToIgnoringWhiteSpace(') + ->appendValue($this->_string) + ->appendText(')') + ; + } + + /** + * Matches if value is a string equal to $string, regardless of whitespace. + * + * @factory + */ + public static function equalToIgnoringWhiteSpace($string) + { + return new self($string); + } + + // -- Private Methods + + private function _stripSpace($string) + { + $parts = preg_split("/[\r\n\t ]+/", $string); + foreach ($parts as $i => $part) { + $parts[$i] = trim($part, " \r\n\t"); + } + + return trim(implode(' ', $parts), " \r\n\t"); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php new file mode 100644 index 0000000..fa0d68e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php @@ -0,0 +1,40 @@ +_substring, (string) $item) >= 1; + } + + protected function relationship() + { + return 'matching'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php new file mode 100644 index 0000000..b92786b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php @@ -0,0 +1,45 @@ +_substring); + } + + /** + * Matches if value is a string that contains $substring. + * + * @factory + */ + public static function containsString($substring) + { + return new self($substring); + } + + // -- Protected Methods + + protected function evalSubstringOf($item) + { + return (false !== strpos((string) $item, $this->_substring)); + } + + protected function relationship() + { + return 'containing'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php new file mode 100644 index 0000000..69f37c2 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php @@ -0,0 +1,40 @@ +_substring)); + } + + protected function relationship() + { + return 'containing in any case'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php new file mode 100644 index 0000000..e75de65 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php @@ -0,0 +1,66 @@ +_substrings = $substrings; + } + + protected function matchesSafely($item) + { + $fromIndex = 0; + + foreach ($this->_substrings as $substring) { + if (false === $fromIndex = strpos($item, $substring, $fromIndex)) { + return false; + } + } + + return true; + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendText($item); + } + + public function describeTo(Description $description) + { + $description->appendText('a string containing ') + ->appendValueList('', ', ', '', $this->_substrings) + ->appendText(' in order') + ; + } + + /** + * Matches if value contains $substrings in a constrained order. + * + * @factory ... + */ + public static function stringContainsInOrder(/* args... */) + { + $args = func_get_args(); + + if (isset($args[0]) && is_array($args[0])) { + $args = $args[0]; + } + + return new self($args); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php new file mode 100644 index 0000000..f802ee4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php @@ -0,0 +1,40 @@ +_substring))) === $this->_substring); + } + + protected function relationship() + { + return 'ending with'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php new file mode 100644 index 0000000..79c9565 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php @@ -0,0 +1,40 @@ +_substring)) === $this->_substring); + } + + protected function relationship() + { + return 'starting with'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php new file mode 100644 index 0000000..e560ad6 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php @@ -0,0 +1,45 @@ +_substring = $substring; + } + + protected function matchesSafely($item) + { + return $this->evalSubstringOf($item); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was "')->appendText($item)->appendText('"'); + } + + public function describeTo(Description $description) + { + $description->appendText('a string ') + ->appendText($this->relationship()) + ->appendText(' ') + ->appendValue($this->_substring) + ; + } + + abstract protected function evalSubstringOf($string); + + abstract protected function relationship(); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php new file mode 100644 index 0000000..9179102 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php @@ -0,0 +1,32 @@ +isHexadecimal($item)) { + return true; + } + + return is_numeric($item); + } + + /** + * Return if the string passed is a valid hexadecimal number. + * This check is necessary because PHP 7 doesn't recognize hexadecimal string as numeric anymore. + * + * @param mixed $item + * @return boolean + */ + private function isHexadecimal($item) + { + if (is_string($item) && preg_match('/^0x(.*)$/', $item, $matches)) { + return ctype_xdigit($matches[1]); + } + + return false; + } + + /** + * Is the value a numeric? + * + * @factory + */ + public static function numericValue() + { + return new self; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php new file mode 100644 index 0000000..65918fc --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php @@ -0,0 +1,32 @@ +matchesSafelyWithDiagnosticDescription($item, new NullDescription()); + } + + final public function describeMismatchSafely($item, Description $mismatchDescription) + { + $this->matchesSafelyWithDiagnosticDescription($item, $mismatchDescription); + } + + // -- Protected Methods + + /** + * Subclasses should implement these. The item will already have been checked for + * the specific type. + */ + abstract protected function matchesSafelyWithDiagnosticDescription($item, Description $mismatchDescription); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php new file mode 100644 index 0000000..56e299a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php @@ -0,0 +1,107 @@ +_expectedType = $expectedType; + $this->_expectedSubtype = $expectedSubtype; + } + + final public function matches($item) + { + return $this->_isSafeType($item) && $this->matchesSafely($item); + } + + final public function describeMismatch($item, Description $mismatchDescription) + { + if (!$this->_isSafeType($item)) { + parent::describeMismatch($item, $mismatchDescription); + } else { + $this->describeMismatchSafely($item, $mismatchDescription); + } + } + + // -- Protected Methods + + /** + * The item will already have been checked for the specific type and subtype. + */ + abstract protected function matchesSafely($item); + + /** + * The item will already have been checked for the specific type and subtype. + */ + abstract protected function describeMismatchSafely($item, Description $mismatchDescription); + + // -- Private Methods + + private function _isSafeType($value) + { + switch ($this->_expectedType) { + + case self::TYPE_ANY: + return true; + + case self::TYPE_STRING: + return is_string($value) || is_numeric($value); + + case self::TYPE_NUMERIC: + return is_numeric($value) || is_string($value); + + case self::TYPE_ARRAY: + return is_array($value); + + case self::TYPE_OBJECT: + return is_object($value) + && ($this->_expectedSubtype === null + || $value instanceof $this->_expectedSubtype); + + case self::TYPE_RESOURCE: + return is_resource($value) + && ($this->_expectedSubtype === null + || get_resource_type($value) == $this->_expectedSubtype); + + case self::TYPE_BOOLEAN: + return true; + + default: + return true; + + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php new file mode 100644 index 0000000..169b036 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php @@ -0,0 +1,76 @@ + all items are + */ + public static function createMatcherArray(array $items) + { + //Extract single array item + if (count($items) == 1 && is_array($items[0])) { + $items = $items[0]; + } + + //Replace non-matchers + foreach ($items as &$item) { + if (!($item instanceof Matcher)) { + $item = Core\IsEqual::equalTo($item); + } + } + + return $items; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php new file mode 100644 index 0000000..d9764e4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php @@ -0,0 +1,195 @@ +_xpath = $xpath; + $this->_matcher = $matcher; + } + + /** + * Matches if the XPath matches against the DOM node and the matcher. + * + * @param string|\DOMNode $actual + * @param Description $mismatchDescription + * @return bool + */ + protected function matchesWithDiagnosticDescription($actual, Description $mismatchDescription) + { + if (is_string($actual)) { + $actual = $this->createDocument($actual); + } elseif (!$actual instanceof \DOMNode) { + $mismatchDescription->appendText('was ')->appendValue($actual); + + return false; + } + $result = $this->evaluate($actual); + if ($result instanceof \DOMNodeList) { + return $this->matchesContent($result, $mismatchDescription); + } else { + return $this->matchesExpression($result, $mismatchDescription); + } + } + + /** + * Creates and returns a DOMDocument from the given + * XML or HTML string. + * + * @param string $text + * @return \DOMDocument built from $text + * @throws \InvalidArgumentException if the document is not valid + */ + protected function createDocument($text) + { + $document = new \DOMDocument(); + if (preg_match('/^\s*<\?xml/', $text)) { + if (!@$document->loadXML($text)) { + throw new \InvalidArgumentException('Must pass a valid XML document'); + } + } else { + if (!@$document->loadHTML($text)) { + throw new \InvalidArgumentException('Must pass a valid HTML or XHTML document'); + } + } + + return $document; + } + + /** + * Applies the configured XPath to the DOM node and returns either + * the result if it's an expression or the node list if it's a query. + * + * @param \DOMNode $node context from which to issue query + * @return mixed result of expression or DOMNodeList from query + */ + protected function evaluate(\DOMNode $node) + { + if ($node instanceof \DOMDocument) { + $xpathDocument = new \DOMXPath($node); + + return $xpathDocument->evaluate($this->_xpath); + } else { + $xpathDocument = new \DOMXPath($node->ownerDocument); + + return $xpathDocument->evaluate($this->_xpath, $node); + } + } + + /** + * Matches if the list of nodes is not empty and the content of at least + * one node matches the configured matcher, if supplied. + * + * @param \DOMNodeList $nodes selected by the XPath query + * @param Description $mismatchDescription + * @return bool + */ + protected function matchesContent(\DOMNodeList $nodes, Description $mismatchDescription) + { + if ($nodes->length == 0) { + $mismatchDescription->appendText('XPath returned no results'); + } elseif ($this->_matcher === null) { + return true; + } else { + foreach ($nodes as $node) { + if ($this->_matcher->matches($node->textContent)) { + return true; + } + } + $content = array(); + foreach ($nodes as $node) { + $content[] = $node->textContent; + } + $mismatchDescription->appendText('XPath returned ') + ->appendValue($content); + } + + return false; + } + + /** + * Matches if the result of the XPath expression matches the configured + * matcher or evaluates to true if there is none. + * + * @param mixed $result result of the XPath expression + * @param Description $mismatchDescription + * @return bool + */ + protected function matchesExpression($result, Description $mismatchDescription) + { + if ($this->_matcher === null) { + if ($result) { + return true; + } + $mismatchDescription->appendText('XPath expression result was ') + ->appendValue($result); + } else { + if ($this->_matcher->matches($result)) { + return true; + } + $mismatchDescription->appendText('XPath expression result '); + $this->_matcher->describeMismatch($result, $mismatchDescription); + } + + return false; + } + + public function describeTo(Description $description) + { + $description->appendText('XML or HTML document with XPath "') + ->appendText($this->_xpath) + ->appendText('"'); + if ($this->_matcher !== null) { + $description->appendText(' '); + $this->_matcher->describeTo($description); + } + } + + /** + * Wraps $matcher with {@link Hamcrest\Core\IsEqual) + * if it's not a matcher and the XPath in count() + * if it's an integer. + * + * @factory + */ + public static function hasXPath($xpath, $matcher = null) + { + if ($matcher === null || $matcher instanceof Matcher) { + return new self($xpath, $matcher); + } elseif (is_int($matcher) && strpos($xpath, 'count(') !== 0) { + $xpath = 'count(' . $xpath . ')'; + } + + return new self($xpath, IsEqual::equalTo($matcher)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php new file mode 100644 index 0000000..6c52c0e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php @@ -0,0 +1,66 @@ +assertTrue($matcher->matches($arg), $message); + } + + public function assertDoesNotMatch(\Hamcrest\Matcher $matcher, $arg, $message) + { + $this->assertFalse($matcher->matches($arg), $message); + } + + public function assertDescription($expected, \Hamcrest\Matcher $matcher) + { + $description = new \Hamcrest\StringDescription(); + $description->appendDescriptionOf($matcher); + $this->assertEquals($expected, (string) $description, 'Expected description'); + } + + public function assertMismatchDescription($expected, \Hamcrest\Matcher $matcher, $arg) + { + $description = new \Hamcrest\StringDescription(); + $this->assertFalse( + $matcher->matches($arg), + 'Precondtion: Matcher should not match item' + ); + $matcher->describeMismatch($arg, $description); + $this->assertEquals( + $expected, + (string) $description, + 'Expected mismatch description' + ); + } + + public function testIsNullSafe() + { + //Should not generate any notices + $this->createMatcher()->matches(null); + $this->createMatcher()->describeMismatch( + null, + new \Hamcrest\NullDescription() + ); + } + + public function testCopesWithUnknownTypes() + { + //Should not generate any notices + $this->createMatcher()->matches(new UnknownType()); + $this->createMatcher()->describeMismatch( + new UnknownType(), + new NullDescription() + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php new file mode 100644 index 0000000..45d9f13 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php @@ -0,0 +1,54 @@ +assertDescription('[<1>, <2>] in any order', containsInAnyOrder(array(1, 2))); + } + + public function testMatchesItemsInAnyOrder() + { + $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(1, 2, 3), 'in order'); + $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(3, 2, 1), 'out of order'); + $this->assertMatches(containsInAnyOrder(array(1)), array(1), 'single'); + } + + public function testAppliesMatchersInAnyOrder() + { + $this->assertMatches( + containsInAnyOrder(array(1, 2, 3)), + array(1, 2, 3), + 'in order' + ); + $this->assertMatches( + containsInAnyOrder(array(1, 2, 3)), + array(3, 2, 1), + 'out of order' + ); + $this->assertMatches( + containsInAnyOrder(array(1)), + array(1), + 'single' + ); + } + + public function testMismatchesItemsInAnyOrder() + { + $matcher = containsInAnyOrder(array(1, 2, 3)); + + $this->assertMismatchDescription('was null', $matcher, null); + $this->assertMismatchDescription('No item matches: <1>, <2>, <3> in []', $matcher, array()); + $this->assertMismatchDescription('No item matches: <2>, <3> in [<1>]', $matcher, array(1)); + $this->assertMismatchDescription('Not matched: <4>', $matcher, array(4, 3, 2, 1)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php new file mode 100644 index 0000000..1868343 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php @@ -0,0 +1,44 @@ +assertDescription('[<1>, <2>]', arrayContaining(array(1, 2))); + } + + public function testMatchesItemsInOrder() + { + $this->assertMatches(arrayContaining(array(1, 2, 3)), array(1, 2, 3), 'in order'); + $this->assertMatches(arrayContaining(array(1)), array(1), 'single'); + } + + public function testAppliesMatchersInOrder() + { + $this->assertMatches( + arrayContaining(array(1, 2, 3)), + array(1, 2, 3), + 'in order' + ); + $this->assertMatches(arrayContaining(array(1)), array(1), 'single'); + } + + public function testMismatchesItemsInAnyOrder() + { + $matcher = arrayContaining(array(1, 2, 3)); + $this->assertMismatchDescription('was null', $matcher, null); + $this->assertMismatchDescription('No item matched: <1>', $matcher, array()); + $this->assertMismatchDescription('No item matched: <2>', $matcher, array(1)); + $this->assertMismatchDescription('item with key 0: was <4>', $matcher, array(4, 3, 2, 1)); + $this->assertMismatchDescription('item with key 2: was <4>', $matcher, array(1, 2, 4)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php new file mode 100644 index 0000000..31770d8 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php @@ -0,0 +1,62 @@ +1); + + $this->assertMatches(hasKey('a'), $array, 'Matches single key'); + } + + public function testMatchesArrayContainingKey() + { + $array = array('a'=>1, 'b'=>2, 'c'=>3); + + $this->assertMatches(hasKey('a'), $array, 'Matches a'); + $this->assertMatches(hasKey('c'), $array, 'Matches c'); + } + + public function testMatchesArrayContainingKeyWithIntegerKeys() + { + $array = array(1=>'A', 2=>'B'); + + assertThat($array, hasKey(1)); + } + + public function testMatchesArrayContainingKeyWithNumberKeys() + { + $array = array(1=>'A', 2=>'B'); + + assertThat($array, hasKey(1)); + + // very ugly version! + assertThat($array, IsArrayContainingKey::hasKeyInArray(2)); + } + + public function testHasReadableDescription() + { + $this->assertDescription('array with key "a"', hasKey('a')); + } + + public function testDoesNotMatchEmptyArray() + { + $this->assertMismatchDescription('array was []', hasKey('Foo'), array()); + } + + public function testDoesNotMatchArrayMissingKey() + { + $array = array('a'=>1, 'b'=>2, 'c'=>3); + + $this->assertMismatchDescription('array was ["a" => <1>, "b" => <2>, "c" => <3>]', hasKey('d'), $array); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php new file mode 100644 index 0000000..a415f9f --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php @@ -0,0 +1,36 @@ +1, 'b'=>2); + + $this->assertMatches(hasKeyValuePair(equalTo('a'), equalTo(1)), $array, 'matcherA'); + $this->assertMatches(hasKeyValuePair(equalTo('b'), equalTo(2)), $array, 'matcherB'); + $this->assertMismatchDescription( + 'array was ["a" => <1>, "b" => <2>]', + hasKeyValuePair(equalTo('c'), equalTo(3)), + $array + ); + } + + public function testDoesNotMatchNull() + { + $this->assertMismatchDescription('was null', hasKeyValuePair(anything(), anything()), null); + } + + public function testHasReadableDescription() + { + $this->assertDescription('array containing ["a" => <2>]', hasKeyValuePair(equalTo('a'), equalTo(2))); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php new file mode 100644 index 0000000..8d5bd81 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php @@ -0,0 +1,50 @@ +assertMatches( + hasItemInArray('a'), + array('a', 'b', 'c'), + "should matches array that contains 'a'" + ); + } + + public function testDoesNotMatchAnArrayThatDoesntContainAnElementMatchingTheGivenMatcher() + { + $this->assertDoesNotMatch( + hasItemInArray('a'), + array('b', 'c'), + "should not matches array that doesn't contain 'a'" + ); + $this->assertDoesNotMatch( + hasItemInArray('a'), + array(), + 'should not match empty array' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + hasItemInArray('a'), + null, + 'should not match null' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('an array containing "a"', hasItemInArray('a')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php new file mode 100644 index 0000000..e4db53e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php @@ -0,0 +1,89 @@ +assertMatches( + anArray(array(equalTo('a'), equalTo('b'), equalTo('c'))), + array('a', 'b', 'c'), + 'should match array with matching elements' + ); + } + + public function testDoesNotMatchAnArrayWhenElementsDoNotMatch() + { + $this->assertDoesNotMatch( + anArray(array(equalTo('a'), equalTo('b'))), + array('b', 'c'), + 'should not match array with different elements' + ); + } + + public function testDoesNotMatchAnArrayOfDifferentSize() + { + $this->assertDoesNotMatch( + anArray(array(equalTo('a'), equalTo('b'))), + array('a', 'b', 'c'), + 'should not match larger array' + ); + $this->assertDoesNotMatch( + anArray(array(equalTo('a'), equalTo('b'))), + array('a'), + 'should not match smaller array' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + anArray(array(equalTo('a'))), + null, + 'should not match null' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + '["a", "b"]', + anArray(array(equalTo('a'), equalTo('b'))) + ); + } + + public function testHasAReadableMismatchDescriptionWhenKeysDontMatch() + { + $this->assertMismatchDescription( + 'array keys were [<1>, <2>]', + anArray(array(equalTo('a'), equalTo('b'))), + array(1 => 'a', 2 => 'b') + ); + } + + public function testSupportsMatchesAssociativeArrays() + { + $this->assertMatches( + anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'), 'z'=>equalTo('c'))), + array('x'=>'a', 'y'=>'b', 'z'=>'c'), + 'should match associative array with matching elements' + ); + } + + public function testDoesNotMatchAnAssociativeArrayWhenKeysDoNotMatch() + { + $this->assertDoesNotMatch( + anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'))), + array('x'=>'b', 'z'=>'c'), + 'should not match array with different keys' + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php new file mode 100644 index 0000000..8413c89 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php @@ -0,0 +1,37 @@ +assertMatches(arrayWithSize(equalTo(3)), array(1, 2, 3), 'correct size'); + $this->assertDoesNotMatch(arrayWithSize(equalTo(2)), array(1, 2, 3), 'incorrect size'); + } + + public function testProvidesConvenientShortcutForArrayWithSizeEqualTo() + { + $this->assertMatches(arrayWithSize(3), array(1, 2, 3), 'correct size'); + $this->assertDoesNotMatch(arrayWithSize(2), array(1, 2, 3), 'incorrect size'); + } + + public function testEmptyArray() + { + $this->assertMatches(emptyArray(), array(), 'correct size'); + $this->assertDoesNotMatch(emptyArray(), array(1), 'incorrect size'); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('an array with size <3>', arrayWithSize(equalTo(3))); + $this->assertDescription('an empty array', emptyArray()); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php new file mode 100644 index 0000000..833e2c3 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php @@ -0,0 +1,23 @@ +appendText('SOME DESCRIPTION'); + } + + public function testDescribesItselfWithToStringMethod() + { + $someMatcher = new \Hamcrest\SomeMatcher(); + $this->assertEquals('SOME DESCRIPTION', (string) $someMatcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php new file mode 100644 index 0000000..2f15fb4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php @@ -0,0 +1,77 @@ +assertMatches( + emptyTraversable(), + new \ArrayObject(array()), + 'an empty traversable' + ); + } + + public function testEmptyMatcherDoesNotMatchWhenNotEmpty() + { + $this->assertDoesNotMatch( + emptyTraversable(), + new \ArrayObject(array(1, 2, 3)), + 'a non-empty traversable' + ); + } + + public function testEmptyMatcherDoesNotMatchNull() + { + $this->assertDoesNotMatch( + emptyTraversable(), + null, + 'should not match null' + ); + } + + public function testEmptyMatcherHasAReadableDescription() + { + $this->assertDescription('an empty traversable', emptyTraversable()); + } + + public function testNonEmptyDoesNotMatchNull() + { + $this->assertDoesNotMatch( + nonEmptyTraversable(), + null, + 'should not match null' + ); + } + + public function testNonEmptyDoesNotMatchWhenEmpty() + { + $this->assertDoesNotMatch( + nonEmptyTraversable(), + new \ArrayObject(array()), + 'an empty traversable' + ); + } + + public function testNonEmptyMatchesWhenNotEmpty() + { + $this->assertMatches( + nonEmptyTraversable(), + new \ArrayObject(array(1, 2, 3)), + 'a non-empty traversable' + ); + } + + public function testNonEmptyNonEmptyMatcherHasAReadableDescription() + { + $this->assertDescription('a non-empty traversable', nonEmptyTraversable()); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php new file mode 100644 index 0000000..c1c67a7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php @@ -0,0 +1,57 @@ +assertMatches( + traversableWithSize(equalTo(3)), + new \ArrayObject(array(1, 2, 3)), + 'correct size' + ); + } + + public function testDoesNotMatchWhenSizeIsIncorrect() + { + $this->assertDoesNotMatch( + traversableWithSize(equalTo(2)), + new \ArrayObject(array(1, 2, 3)), + 'incorrect size' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + traversableWithSize(3), + null, + 'should not match null' + ); + } + + public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo() + { + $this->assertMatches( + traversableWithSize(3), + new \ArrayObject(array(1, 2, 3)), + 'correct size' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'a traversable with size <3>', + traversableWithSize(equalTo(3)) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php new file mode 100644 index 0000000..86b8c27 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php @@ -0,0 +1,56 @@ +assertDescription( + '("good" and "bad" and "ugly")', + allOf('good', 'bad', 'ugly') + ); + } + + public function testMismatchDescriptionDescribesFirstFailingMatch() + { + $this->assertMismatchDescription( + '"good" was "bad"', + allOf('bad', 'good'), + 'bad' + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php new file mode 100644 index 0000000..3d62b93 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php @@ -0,0 +1,79 @@ +assertDescription( + '("good" or "bad" or "ugly")', + anyOf('good', 'bad', 'ugly') + ); + } + + public function testNoneOfEvaluatesToTheLogicalDisjunctionOfTwoOtherMatchers() + { + assertThat('good', not(noneOf('bad', 'good'))); + assertThat('good', not(noneOf('good', 'good'))); + assertThat('good', not(noneOf('good', 'bad'))); + + assertThat('good', noneOf('bad', startsWith('b'))); + } + + public function testNoneOfEvaluatesToTheLogicalDisjunctionOfManyOtherMatchers() + { + assertThat('good', not(noneOf('bad', 'good', 'bad', 'bad', 'bad'))); + assertThat('good', noneOf('bad', 'bad', 'bad', 'bad', 'bad')); + } + + public function testNoneOfSupportsMixedTypes() + { + $combined = noneOf( + equalTo(new \Hamcrest\Core\SampleBaseClass('good')), + equalTo(new \Hamcrest\Core\SampleBaseClass('ugly')), + equalTo(new \Hamcrest\Core\SampleSubClass('good')) + ); + + assertThat(new \Hamcrest\Core\SampleSubClass('bad'), $combined); + } + + public function testNoneOfHasAReadableDescription() + { + $this->assertDescription( + 'not ("good" or "bad" or "ugly")', + noneOf('good', 'bad', 'ugly') + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php new file mode 100644 index 0000000..4c22614 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php @@ -0,0 +1,59 @@ +_either_3_or_4 = \Hamcrest\Core\CombinableMatcher::either(equalTo(3))->orElse(equalTo(4)); + $this->_not_3_and_not_4 = \Hamcrest\Core\CombinableMatcher::both(not(equalTo(3)))->andAlso(not(equalTo(4))); + } + + protected function createMatcher() + { + return \Hamcrest\Core\CombinableMatcher::either(equalTo('irrelevant'))->orElse(equalTo('ignored')); + } + + public function testBothAcceptsAndRejects() + { + assertThat(2, $this->_not_3_and_not_4); + assertThat(3, not($this->_not_3_and_not_4)); + } + + public function testAcceptsAndRejectsThreeAnds() + { + $tripleAnd = $this->_not_3_and_not_4->andAlso(equalTo(2)); + assertThat(2, $tripleAnd); + assertThat(3, not($tripleAnd)); + } + + public function testBothDescribesItself() + { + $this->assertEquals('(not <3> and not <4>)', (string) $this->_not_3_and_not_4); + $this->assertMismatchDescription('was <3>', $this->_not_3_and_not_4, 3); + } + + public function testEitherAcceptsAndRejects() + { + assertThat(3, $this->_either_3_or_4); + assertThat(6, not($this->_either_3_or_4)); + } + + public function testAcceptsAndRejectsThreeOrs() + { + $orTriple = $this->_either_3_or_4->orElse(greaterThan(10)); + + assertThat(11, $orTriple); + assertThat(9, not($orTriple)); + } + + public function testEitherDescribesItself() + { + $this->assertEquals('(<3> or <4>)', (string) $this->_either_3_or_4); + $this->assertMismatchDescription('was <6>', $this->_either_3_or_4, 6); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php new file mode 100644 index 0000000..673ab41 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php @@ -0,0 +1,36 @@ +assertDescription('m1 description', $m1); + $this->assertDescription('m2 description', $m2); + } + + public function testAppendsValuesToDescription() + { + $m = describedAs('value 1 = %0, value 2 = %1', anything(), 33, 97); + + $this->assertDescription('value 1 = <33>, value 2 = <97>', $m); + } + + public function testDelegatesMatchingToAnotherMatcher() + { + $m1 = describedAs('irrelevant', anything()); + $m2 = describedAs('irrelevant', not(anything())); + + $this->assertTrue($m1->matches(new \stdClass())); + $this->assertFalse($m2->matches('hi')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php new file mode 100644 index 0000000..5eb153c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php @@ -0,0 +1,30 @@ +assertEquals('every item is a string containing "a"', (string) $each); + + $this->assertMismatchDescription('an item was "BbB"', $each, array('BbB')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php new file mode 100644 index 0000000..e2e136d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php @@ -0,0 +1,108 @@ +assertMatches( + hasToString(equalTo('php')), + new \Hamcrest\Core\PhpForm(), + 'correct __toString' + ); + $this->assertMatches( + hasToString(equalTo('java')), + new \Hamcrest\Core\JavaForm(), + 'correct toString' + ); + } + + public function testPicksJavaOverPhpToString() + { + $this->assertMatches( + hasToString(equalTo('java')), + new \Hamcrest\Core\BothForms(), + 'correct toString' + ); + } + + public function testDoesNotMatchWhenToStringDoesNotMatch() + { + $this->assertDoesNotMatch( + hasToString(equalTo('mismatch')), + new \Hamcrest\Core\PhpForm(), + 'incorrect __toString' + ); + $this->assertDoesNotMatch( + hasToString(equalTo('mismatch')), + new \Hamcrest\Core\JavaForm(), + 'incorrect toString' + ); + $this->assertDoesNotMatch( + hasToString(equalTo('mismatch')), + new \Hamcrest\Core\BothForms(), + 'incorrect __toString' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + hasToString(equalTo('a')), + null, + 'should not match null' + ); + } + + public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo() + { + $this->assertMatches( + hasToString(equalTo('php')), + new \Hamcrest\Core\PhpForm(), + 'correct __toString' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'an object with toString() "php"', + hasToString(equalTo('php')) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php new file mode 100644 index 0000000..f68032e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php @@ -0,0 +1,29 @@ +assertDescription('ANYTHING', anything()); + } + + public function testCanOverrideDescription() + { + $description = 'description'; + $this->assertDescription($description, anything($description)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php new file mode 100644 index 0000000..a3929b5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php @@ -0,0 +1,91 @@ +assertMatches( + $itemMatcher, + array('a', 'b', 'c'), + "should match list that contains 'a'" + ); + } + + public function testDoesNotMatchCollectionThatDoesntContainAnElementMatchingTheGivenMatcher() + { + $matcher1 = hasItem(equalTo('a')); + $this->assertDoesNotMatch( + $matcher1, + array('b', 'c'), + "should not match list that doesn't contain 'a'" + ); + + $matcher2 = hasItem(equalTo('a')); + $this->assertDoesNotMatch( + $matcher2, + array(), + 'should not match the empty list' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + hasItem(equalTo('a')), + null, + 'should not match null' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('a collection containing "a"', hasItem(equalTo('a'))); + } + + public function testMatchesAllItemsInCollection() + { + $matcher1 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); + $this->assertMatches( + $matcher1, + array('a', 'b', 'c'), + 'should match list containing all items' + ); + + $matcher2 = hasItems('a', 'b', 'c'); + $this->assertMatches( + $matcher2, + array('a', 'b', 'c'), + 'should match list containing all items (without matchers)' + ); + + $matcher3 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); + $this->assertMatches( + $matcher3, + array('c', 'b', 'a'), + 'should match list containing all items in any order' + ); + + $matcher4 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); + $this->assertMatches( + $matcher4, + array('e', 'c', 'b', 'a', 'd'), + 'should match list containing all items plus others' + ); + + $matcher5 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); + $this->assertDoesNotMatch( + $matcher5, + array('e', 'c', 'b', 'd'), // 'a' missing + 'should not match list unless it contains all items' + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php new file mode 100644 index 0000000..73e3ff0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php @@ -0,0 +1,102 @@ +_arg = $arg; + } + + public function __toString() + { + return $this->_arg; + } +} + +class IsEqualTest extends \Hamcrest\AbstractMatcherTest +{ + + protected function createMatcher() + { + return \Hamcrest\Core\IsEqual::equalTo('irrelevant'); + } + + public function testComparesObjectsUsingEqualityOperator() + { + assertThat("hi", equalTo("hi")); + assertThat("bye", not(equalTo("hi"))); + + assertThat(1, equalTo(1)); + assertThat(1, not(equalTo(2))); + + assertThat("2", equalTo(2)); + } + + public function testCanCompareNullValues() + { + assertThat(null, equalTo(null)); + + assertThat(null, not(equalTo('hi'))); + assertThat('hi', not(equalTo(null))); + } + + public function testComparesTheElementsOfAnArray() + { + $s1 = array('a', 'b'); + $s2 = array('a', 'b'); + $s3 = array('c', 'd'); + $s4 = array('a', 'b', 'c', 'd'); + + assertThat($s1, equalTo($s1)); + assertThat($s2, equalTo($s1)); + assertThat($s3, not(equalTo($s1))); + assertThat($s4, not(equalTo($s1))); + } + + public function testComparesTheElementsOfAnArrayOfPrimitiveTypes() + { + $i1 = array(1, 2); + $i2 = array(1, 2); + $i3 = array(3, 4); + $i4 = array(1, 2, 3, 4); + + assertThat($i1, equalTo($i1)); + assertThat($i2, equalTo($i1)); + assertThat($i3, not(equalTo($i1))); + assertThat($i4, not(equalTo($i1))); + } + + public function testRecursivelyTestsElementsOfArrays() + { + $i1 = array(array(1, 2), array(3, 4)); + $i2 = array(array(1, 2), array(3, 4)); + $i3 = array(array(5, 6), array(7, 8)); + $i4 = array(array(1, 2, 3, 4), array(3, 4)); + + assertThat($i1, equalTo($i1)); + assertThat($i2, equalTo($i1)); + assertThat($i3, not(equalTo($i1))); + assertThat($i4, not(equalTo($i1))); + } + + public function testIncludesTheResultOfCallingToStringOnItsArgumentInTheDescription() + { + $argumentDescription = 'ARGUMENT DESCRIPTION'; + $argument = new \Hamcrest\Core\DummyToStringClass($argumentDescription); + $this->assertDescription('<' . $argumentDescription . '>', equalTo($argument)); + } + + public function testReturnsAnObviousDescriptionIfCreatedWithANestedMatcherByMistake() + { + $innerMatcher = equalTo('NestedMatcher'); + $this->assertDescription('<' . (string) $innerMatcher . '>', equalTo($innerMatcher)); + } + + public function testReturnsGoodDescriptionIfCreatedWithNullReference() + { + $this->assertDescription('null', equalTo(null)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php new file mode 100644 index 0000000..9cc2794 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php @@ -0,0 +1,30 @@ +assertDescription('"ARG"', identicalTo('ARG')); + } + + public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull() + { + $this->assertDescription('null', identicalTo(null)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php new file mode 100644 index 0000000..7a5f095 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php @@ -0,0 +1,51 @@ +_baseClassInstance = new \Hamcrest\Core\SampleBaseClass('good'); + $this->_subClassInstance = new \Hamcrest\Core\SampleSubClass('good'); + } + + protected function createMatcher() + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf('stdClass'); + } + + public function testEvaluatesToTrueIfArgumentIsInstanceOfASpecificClass() + { + assertThat($this->_baseClassInstance, anInstanceOf('Hamcrest\Core\SampleBaseClass')); + assertThat($this->_subClassInstance, anInstanceOf('Hamcrest\Core\SampleSubClass')); + assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat(new \stdClass(), not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + } + + public function testEvaluatesToFalseIfArgumentIsNotAnObject() + { + assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat(false, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat(5, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat('foo', not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat(array(1, 2, 3), not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('an instance of stdClass', anInstanceOf('stdClass')); + } + + public function testDecribesActualClassInMismatchMessage() + { + $this->assertMismatchDescription( + '[Hamcrest\Core\SampleBaseClass] ', + anInstanceOf('Hamcrest\Core\SampleSubClass'), + $this->_baseClassInstance + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php new file mode 100644 index 0000000..09d4a65 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php @@ -0,0 +1,31 @@ +assertMatches(not(equalTo('A')), 'B', 'should match'); + $this->assertDoesNotMatch(not(equalTo('B')), 'B', 'should not match'); + } + + public function testProvidesConvenientShortcutForNotEqualTo() + { + $this->assertMatches(not('A'), 'B', 'should match'); + $this->assertMatches(not('B'), 'A', 'should match'); + $this->assertDoesNotMatch(not('A'), 'A', 'should not match'); + $this->assertDoesNotMatch(not('B'), 'B', 'should not match'); + } + + public function testUsesDescriptionOfNegatedMatcherWithPrefix() + { + $this->assertDescription('not a value greater than <2>', not(greaterThan(2))); + $this->assertDescription('not "A"', not('A')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php new file mode 100644 index 0000000..bfa4255 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php @@ -0,0 +1,20 @@ +assertDescription('sameInstance("ARG")', sameInstance('ARG')); + } + + public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull() + { + $this->assertDescription('sameInstance(null)', sameInstance(null)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php new file mode 100644 index 0000000..bbd848b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php @@ -0,0 +1,33 @@ +assertMatches(is(equalTo(true)), true, 'should match'); + $this->assertMatches(is(equalTo(false)), false, 'should match'); + $this->assertDoesNotMatch(is(equalTo(true)), false, 'should not match'); + $this->assertDoesNotMatch(is(equalTo(false)), true, 'should not match'); + } + + public function testGeneratesIsPrefixInDescription() + { + $this->assertDescription('is ', is(equalTo(true))); + } + + public function testProvidesConvenientShortcutForIsEqualTo() + { + $this->assertMatches(is('A'), 'A', 'should match'); + $this->assertMatches(is('B'), 'B', 'should match'); + $this->assertDoesNotMatch(is('A'), 'B', 'should not match'); + $this->assertDoesNotMatch(is('B'), 'A', 'should not match'); + $this->assertDescription('is "A"', is('A')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php new file mode 100644 index 0000000..3f48dea --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php @@ -0,0 +1,45 @@ +assertDescription('a double', typeOf('double')); + $this->assertDescription('an integer', typeOf('integer')); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', typeOf('boolean'), null); + $this->assertMismatchDescription('was an integer <5>', typeOf('float'), 5); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php new file mode 100644 index 0000000..c953e7c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php @@ -0,0 +1,18 @@ +_arg = $arg; + } + + public function __toString() + { + return $this->_arg; + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php new file mode 100644 index 0000000..822f1b6 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php @@ -0,0 +1,6 @@ +_instanceProperty); + } + + protected function createMatcher() + { + return \Hamcrest\Core\Set::set('property_name'); + } + + public function testEvaluatesToTrueIfArrayPropertyIsSet() + { + assertThat(array('foo' => 'bar'), set('foo')); + } + + public function testNegatedEvaluatesToFalseIfArrayPropertyIsSet() + { + assertThat(array('foo' => 'bar'), not(notSet('foo'))); + } + + public function testEvaluatesToTrueIfClassPropertyIsSet() + { + self::$_classProperty = 'bar'; + assertThat('Hamcrest\Core\SetTest', set('_classProperty')); + } + + public function testNegatedEvaluatesToFalseIfClassPropertyIsSet() + { + self::$_classProperty = 'bar'; + assertThat('Hamcrest\Core\SetTest', not(notSet('_classProperty'))); + } + + public function testEvaluatesToTrueIfObjectPropertyIsSet() + { + $this->_instanceProperty = 'bar'; + assertThat($this, set('_instanceProperty')); + } + + public function testNegatedEvaluatesToFalseIfObjectPropertyIsSet() + { + $this->_instanceProperty = 'bar'; + assertThat($this, not(notSet('_instanceProperty'))); + } + + public function testEvaluatesToFalseIfArrayPropertyIsNotSet() + { + assertThat(array('foo' => 'bar'), not(set('baz'))); + } + + public function testNegatedEvaluatesToTrueIfArrayPropertyIsNotSet() + { + assertThat(array('foo' => 'bar'), notSet('baz')); + } + + public function testEvaluatesToFalseIfClassPropertyIsNotSet() + { + assertThat('Hamcrest\Core\SetTest', not(set('_classProperty'))); + } + + public function testNegatedEvaluatesToTrueIfClassPropertyIsNotSet() + { + assertThat('Hamcrest\Core\SetTest', notSet('_classProperty')); + } + + public function testEvaluatesToFalseIfObjectPropertyIsNotSet() + { + assertThat($this, not(set('_instanceProperty'))); + } + + public function testNegatedEvaluatesToTrueIfObjectPropertyIsNotSet() + { + assertThat($this, notSet('_instanceProperty')); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('set property foo', set('foo')); + $this->assertDescription('unset property bar', notSet('bar')); + } + + public function testDecribesPropertySettingInMismatchMessage() + { + $this->assertMismatchDescription( + 'was not set', + set('bar'), + array('foo' => 'bar') + ); + $this->assertMismatchDescription( + 'was "bar"', + notSet('foo'), + array('foo' => 'bar') + ); + self::$_classProperty = 'bar'; + $this->assertMismatchDescription( + 'was "bar"', + notSet('_classProperty'), + 'Hamcrest\Core\SetTest' + ); + $this->_instanceProperty = 'bar'; + $this->assertMismatchDescription( + 'was "bar"', + notSet('_instanceProperty'), + $this + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php new file mode 100644 index 0000000..7543294 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php @@ -0,0 +1,73 @@ +_result = $result; + } + public function getResult() + { + return $this->_result; + } +} + +/* Test-specific subclass only */ +class ResultMatcher extends \Hamcrest\FeatureMatcher +{ + public function __construct() + { + parent::__construct(self::TYPE_ANY, null, equalTo('bar'), 'Thingy with result', 'result'); + } + public function featureValueOf($actual) + { + if ($actual instanceof \Hamcrest\Thingy) { + return $actual->getResult(); + } + } +} + +class FeatureMatcherTest extends \Hamcrest\AbstractMatcherTest +{ + + private $_resultMatcher; + + public function setUp() + { + $this->_resultMatcher = $this->_resultMatcher(); + } + + protected function createMatcher() + { + return $this->_resultMatcher(); + } + + public function testMatchesPartOfAnObject() + { + $this->assertMatches($this->_resultMatcher, new \Hamcrest\Thingy('bar'), 'feature'); + $this->assertDescription('Thingy with result "bar"', $this->_resultMatcher); + } + + public function testMismatchesPartOfAnObject() + { + $this->assertMismatchDescription( + 'result was "foo"', + $this->_resultMatcher, + new \Hamcrest\Thingy('foo') + ); + } + + public function testDoesNotGenerateNoticesForNull() + { + $this->assertMismatchDescription('result was null', $this->_resultMatcher, null); + } + + // -- Creation Methods + + private function _resultMatcher() + { + return new \Hamcrest\ResultMatcher(); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php new file mode 100644 index 0000000..2183712 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php @@ -0,0 +1,190 @@ +getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(null); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(''); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(0); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(0.0); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(array()); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithIdentifierAndTrueArgPasses() + { + \Hamcrest\MatcherAssert::assertThat('identifier', true); + \Hamcrest\MatcherAssert::assertThat('identifier', 'non-empty'); + \Hamcrest\MatcherAssert::assertThat('identifier', 1); + \Hamcrest\MatcherAssert::assertThat('identifier', 3.14159); + \Hamcrest\MatcherAssert::assertThat('identifier', array(true)); + self::assertEquals(5, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithIdentifierAndFalseArgFails() + { + try { + \Hamcrest\MatcherAssert::assertThat('identifier', false); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', null); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', ''); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', 0); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', 0.0); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', array()); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithActualValueAndMatcherArgsThatMatchPasses() + { + \Hamcrest\MatcherAssert::assertThat(true, is(true)); + self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithActualValueAndMatcherArgsThatDontMatchFails() + { + $expected = 'expected'; + $actual = 'actual'; + + $expectedMessage = + 'Expected: "expected"' . PHP_EOL . + ' but: was "actual"'; + + try { + \Hamcrest\MatcherAssert::assertThat($actual, equalTo($expected)); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals($expectedMessage, $ex->getMessage()); + self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + } + + public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatMatchPasses() + { + \Hamcrest\MatcherAssert::assertThat('identifier', true, is(true)); + self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatDontMatchFails() + { + $expected = 'expected'; + $actual = 'actual'; + + $expectedMessage = + 'identifier' . PHP_EOL . + 'Expected: "expected"' . PHP_EOL . + ' but: was "actual"'; + + try { + \Hamcrest\MatcherAssert::assertThat('identifier', $actual, equalTo($expected)); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals($expectedMessage, $ex->getMessage()); + self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + } + + public function testAssertThatWithNoArgsThrowsErrorAndDoesntIncrementCount() + { + try { + \Hamcrest\MatcherAssert::assertThat(); + self::fail('expected invalid argument exception'); + } catch (\InvalidArgumentException $ex) { + self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + } + + public function testAssertThatWithFourArgsThrowsErrorAndDoesntIncrementCount() + { + try { + \Hamcrest\MatcherAssert::assertThat(1, 2, 3, 4); + self::fail('expected invalid argument exception'); + } catch (\InvalidArgumentException $ex) { + self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php new file mode 100644 index 0000000..987d552 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php @@ -0,0 +1,27 @@ +assertTrue($p->matches(1.0)); + $this->assertTrue($p->matches(0.5)); + $this->assertTrue($p->matches(1.5)); + + $this->assertDoesNotMatch($p, 2.0, 'too large'); + $this->assertMismatchDescription('<2F> differed by <0.5F>', $p, 2.0); + $this->assertDoesNotMatch($p, 0.0, 'number too small'); + $this->assertMismatchDescription('<0F> differed by <0.5F>', $p, 0.0); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php new file mode 100644 index 0000000..a4c94d3 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php @@ -0,0 +1,41 @@ +_text = $text; + } + + public function describeTo(\Hamcrest\Description $description) + { + $description->appendText($this->_text); + } +} + +class StringDescriptionTest extends \PhpUnit_Framework_TestCase +{ + + private $_description; + + public function setUp() + { + $this->_description = new \Hamcrest\StringDescription(); + } + + public function testAppendTextAppendsTextInformation() + { + $this->_description->appendText('foo')->appendText('bar'); + $this->assertEquals('foobar', (string) $this->_description); + } + + public function testAppendValueCanAppendTextTypes() + { + $this->_description->appendValue('foo'); + $this->assertEquals('"foo"', (string) $this->_description); + } + + public function testSpecialCharactersAreEscapedForStringTypes() + { + $this->_description->appendValue("foo\\bar\"zip\r\n"); + $this->assertEquals('"foo\\bar\\"zip\r\n"', (string) $this->_description); + } + + public function testIntegerValuesCanBeAppended() + { + $this->_description->appendValue(42); + $this->assertEquals('<42>', (string) $this->_description); + } + + public function testFloatValuesCanBeAppended() + { + $this->_description->appendValue(42.78); + $this->assertEquals('<42.78F>', (string) $this->_description); + } + + public function testNullValuesCanBeAppended() + { + $this->_description->appendValue(null); + $this->assertEquals('null', (string) $this->_description); + } + + public function testArraysCanBeAppended() + { + $this->_description->appendValue(array('foo', 42.78)); + $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); + } + + public function testObjectsCanBeAppended() + { + $this->_description->appendValue(new \stdClass()); + $this->assertEquals('', (string) $this->_description); + } + + public function testBooleanValuesCanBeAppended() + { + $this->_description->appendValue(false); + $this->assertEquals('', (string) $this->_description); + } + + public function testListsOfvaluesCanBeAppended() + { + $this->_description->appendValue(array('foo', 42.78)); + $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); + } + + public function testIterableOfvaluesCanBeAppended() + { + $items = new \ArrayObject(array('foo', 42.78)); + $this->_description->appendValue($items); + $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); + } + + public function testIteratorOfvaluesCanBeAppended() + { + $items = new \ArrayObject(array('foo', 42.78)); + $this->_description->appendValue($items->getIterator()); + $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); + } + + public function testListsOfvaluesCanBeAppendedManually() + { + $this->_description->appendValueList('@start@', '@sep@ ', '@end@', array('foo', 42.78)); + $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); + } + + public function testIterableOfvaluesCanBeAppendedManually() + { + $items = new \ArrayObject(array('foo', 42.78)); + $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items); + $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); + } + + public function testIteratorOfvaluesCanBeAppendedManually() + { + $items = new \ArrayObject(array('foo', 42.78)); + $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items->getIterator()); + $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); + } + + public function testSelfDescribingObjectsCanBeAppended() + { + $this->_description + ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('foo')) + ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('bar')) + ; + $this->assertEquals('foobar', (string) $this->_description); + } + + public function testSelfDescribingObjectsCanBeAppendedAsLists() + { + $this->_description->appendList('@start@', '@sep@ ', '@end@', array( + new \Hamcrest\SampleSelfDescriber('foo'), + new \Hamcrest\SampleSelfDescriber('bar') + )); + $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); + } + + public function testSelfDescribingObjectsCanBeAppendedAsIteratedLists() + { + $items = new \ArrayObject(array( + new \Hamcrest\SampleSelfDescriber('foo'), + new \Hamcrest\SampleSelfDescriber('bar') + )); + $this->_description->appendList('@start@', '@sep@ ', '@end@', $items); + $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); + } + + public function testSelfDescribingObjectsCanBeAppendedAsIterators() + { + $items = new \ArrayObject(array( + new \Hamcrest\SampleSelfDescriber('foo'), + new \Hamcrest\SampleSelfDescriber('bar') + )); + $this->_description->appendList('@start@', '@sep@ ', '@end@', $items->getIterator()); + $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php new file mode 100644 index 0000000..8d5c56b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php @@ -0,0 +1,86 @@ +assertDoesNotMatch(emptyString(), null, 'null'); + } + + public function testEmptyDoesNotMatchZero() + { + $this->assertDoesNotMatch(emptyString(), 0, 'zero'); + } + + public function testEmptyDoesNotMatchFalse() + { + $this->assertDoesNotMatch(emptyString(), false, 'false'); + } + + public function testEmptyDoesNotMatchEmptyArray() + { + $this->assertDoesNotMatch(emptyString(), array(), 'empty array'); + } + + public function testEmptyMatchesEmptyString() + { + $this->assertMatches(emptyString(), '', 'empty string'); + } + + public function testEmptyDoesNotMatchNonEmptyString() + { + $this->assertDoesNotMatch(emptyString(), 'foo', 'non-empty string'); + } + + public function testEmptyHasAReadableDescription() + { + $this->assertDescription('an empty string', emptyString()); + } + + public function testEmptyOrNullMatchesNull() + { + $this->assertMatches(nullOrEmptyString(), null, 'null'); + } + + public function testEmptyOrNullMatchesEmptyString() + { + $this->assertMatches(nullOrEmptyString(), '', 'empty string'); + } + + public function testEmptyOrNullDoesNotMatchNonEmptyString() + { + $this->assertDoesNotMatch(nullOrEmptyString(), 'foo', 'non-empty string'); + } + + public function testEmptyOrNullHasAReadableDescription() + { + $this->assertDescription('(null or an empty string)', nullOrEmptyString()); + } + + public function testNonEmptyDoesNotMatchNull() + { + $this->assertDoesNotMatch(nonEmptyString(), null, 'null'); + } + + public function testNonEmptyDoesNotMatchEmptyString() + { + $this->assertDoesNotMatch(nonEmptyString(), '', 'empty string'); + } + + public function testNonEmptyMatchesNonEmptyString() + { + $this->assertMatches(nonEmptyString(), 'foo', 'non-empty string'); + } + + public function testNonEmptyHasAReadableDescription() + { + $this->assertDescription('a non-empty string', nonEmptyString()); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php new file mode 100644 index 0000000..0539fd5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php @@ -0,0 +1,40 @@ +assertDescription( + 'equalToIgnoringCase("heLLo")', + equalToIgnoringCase('heLLo') + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php new file mode 100644 index 0000000..6c2304f --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php @@ -0,0 +1,51 @@ +_matcher = \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace( + "Hello World how\n are we? " + ); + } + + protected function createMatcher() + { + return $this->_matcher; + } + + public function testPassesIfWordsAreSameButWhitespaceDiffers() + { + assertThat('Hello World how are we?', $this->_matcher); + assertThat(" Hello \rWorld \t how are\nwe?", $this->_matcher); + } + + public function testFailsIfTextOtherThanWhitespaceDiffers() + { + assertThat('Hello PLANET how are we?', not($this->_matcher)); + assertThat('Hello World how are we', not($this->_matcher)); + } + + public function testFailsIfWhitespaceIsAddedOrRemovedInMidWord() + { + assertThat('HelloWorld how are we?', not($this->_matcher)); + assertThat('Hello Wo rld how are we?', not($this->_matcher)); + } + + public function testFailsIfMatchingAgainstNull() + { + assertThat(null, not($this->_matcher)); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + "equalToIgnoringWhiteSpace(\"Hello World how\\n are we? \")", + $this->_matcher + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php new file mode 100644 index 0000000..4891598 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php @@ -0,0 +1,30 @@ +assertDescription('a string matching "pattern"', matchesPattern('pattern')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php new file mode 100644 index 0000000..3b5b08e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php @@ -0,0 +1,80 @@ +_stringContains = \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase( + strtolower(self::EXCERPT) + ); + } + + protected function createMatcher() + { + return $this->_stringContains; + } + + public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT . 'END'), + 'should be true if excerpt at beginning' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . self::EXCERPT), + 'should be true if excerpt at end' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . self::EXCERPT . 'END'), + 'should be true if excerpt in middle' + ); + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT . self::EXCERPT), + 'should be true if excerpt is repeated' + ); + + $this->assertFalse( + $this->_stringContains->matches('Something else'), + 'should not be true if excerpt is not in string' + ); + $this->assertFalse( + $this->_stringContains->matches(substr(self::EXCERPT, 1)), + 'should not be true if part of excerpt is in string' + ); + } + + public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT), + 'should be true if excerpt is entire string' + ); + } + + public function testEvaluatesToTrueIfArgumentContainsExactSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(strtolower(self::EXCERPT)), + 'should be false if excerpt is entire string ignoring case' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'), + 'should be false if excerpt is contained in string ignoring case' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'a string containing in any case "' + . strtolower(self::EXCERPT) . '"', + $this->_stringContains + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php new file mode 100644 index 0000000..0be7062 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php @@ -0,0 +1,42 @@ +_m = \Hamcrest\Text\StringContainsInOrder::stringContainsInOrder(array('a', 'b', 'c')); + } + + protected function createMatcher() + { + return $this->_m; + } + + public function testMatchesOnlyIfStringContainsGivenSubstringsInTheSameOrder() + { + $this->assertMatches($this->_m, 'abc', 'substrings in order'); + $this->assertMatches($this->_m, '1a2b3c4', 'substrings separated'); + + $this->assertDoesNotMatch($this->_m, 'cab', 'substrings out of order'); + $this->assertDoesNotMatch($this->_m, 'xyz', 'no substrings in string'); + $this->assertDoesNotMatch($this->_m, 'ac', 'substring missing'); + $this->assertDoesNotMatch($this->_m, '', 'empty string'); + } + + public function testAcceptsVariableArguments() + { + $this->assertMatches(stringContainsInOrder('a', 'b', 'c'), 'abc', 'substrings as variable arguments'); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'a string containing "a", "b", "c" in order', + $this->_m + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php new file mode 100644 index 0000000..203fd91 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php @@ -0,0 +1,86 @@ +_stringContains = \Hamcrest\Text\StringContains::containsString(self::EXCERPT); + } + + protected function createMatcher() + { + return $this->_stringContains; + } + + public function testEvaluatesToTrueIfArgumentContainsSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT . 'END'), + 'should be true if excerpt at beginning' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . self::EXCERPT), + 'should be true if excerpt at end' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . self::EXCERPT . 'END'), + 'should be true if excerpt in middle' + ); + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT . self::EXCERPT), + 'should be true if excerpt is repeated' + ); + + $this->assertFalse( + $this->_stringContains->matches('Something else'), + 'should not be true if excerpt is not in string' + ); + $this->assertFalse( + $this->_stringContains->matches(substr(self::EXCERPT, 1)), + 'should not be true if part of excerpt is in string' + ); + } + + public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT), + 'should be true if excerpt is entire string' + ); + } + + public function testEvaluatesToFalseIfArgumentContainsSubstringIgnoringCase() + { + $this->assertFalse( + $this->_stringContains->matches(strtolower(self::EXCERPT)), + 'should be false if excerpt is entire string ignoring case' + ); + $this->assertFalse( + $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'), + 'should be false if excerpt is contained in string ignoring case' + ); + } + + public function testIgnoringCaseReturnsCorrectMatcher() + { + $this->assertTrue( + $this->_stringContains->ignoringCase()->matches('EXceRpT'), + 'should be true if excerpt is entire string ignoring case' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'a string containing "' + . self::EXCERPT . '"', + $this->_stringContains + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php new file mode 100644 index 0000000..fffa3c9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php @@ -0,0 +1,62 @@ +_stringEndsWith = \Hamcrest\Text\StringEndsWith::endsWith(self::EXCERPT); + } + + protected function createMatcher() + { + return $this->_stringEndsWith; + } + + public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring() + { + $this->assertFalse( + $this->_stringEndsWith->matches(self::EXCERPT . 'END'), + 'should be false if excerpt at beginning' + ); + $this->assertTrue( + $this->_stringEndsWith->matches('START' . self::EXCERPT), + 'should be true if excerpt at end' + ); + $this->assertFalse( + $this->_stringEndsWith->matches('START' . self::EXCERPT . 'END'), + 'should be false if excerpt in middle' + ); + $this->assertTrue( + $this->_stringEndsWith->matches(self::EXCERPT . self::EXCERPT), + 'should be true if excerpt is at end and repeated' + ); + + $this->assertFalse( + $this->_stringEndsWith->matches('Something else'), + 'should be false if excerpt is not in string' + ); + $this->assertFalse( + $this->_stringEndsWith->matches(substr(self::EXCERPT, 0, strlen(self::EXCERPT) - 2)), + 'should be false if part of excerpt is at end of string' + ); + } + + public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() + { + $this->assertTrue( + $this->_stringEndsWith->matches(self::EXCERPT), + 'should be true if excerpt is entire string' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('a string ending with "EXCERPT"', $this->_stringEndsWith); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php new file mode 100644 index 0000000..fc3761b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php @@ -0,0 +1,62 @@ +_stringStartsWith = \Hamcrest\Text\StringStartsWith::startsWith(self::EXCERPT); + } + + protected function createMatcher() + { + return $this->_stringStartsWith; + } + + public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring() + { + $this->assertTrue( + $this->_stringStartsWith->matches(self::EXCERPT . 'END'), + 'should be true if excerpt at beginning' + ); + $this->assertFalse( + $this->_stringStartsWith->matches('START' . self::EXCERPT), + 'should be false if excerpt at end' + ); + $this->assertFalse( + $this->_stringStartsWith->matches('START' . self::EXCERPT . 'END'), + 'should be false if excerpt in middle' + ); + $this->assertTrue( + $this->_stringStartsWith->matches(self::EXCERPT . self::EXCERPT), + 'should be true if excerpt is at beginning and repeated' + ); + + $this->assertFalse( + $this->_stringStartsWith->matches('Something else'), + 'should be false if excerpt is not in string' + ); + $this->assertFalse( + $this->_stringStartsWith->matches(substr(self::EXCERPT, 1)), + 'should be false if part of excerpt is at start of string' + ); + } + + public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() + { + $this->assertTrue( + $this->_stringStartsWith->matches(self::EXCERPT), + 'should be true if excerpt is entire string' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('a string starting with "EXCERPT"', $this->_stringStartsWith); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php new file mode 100644 index 0000000..d13c24d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php @@ -0,0 +1,35 @@ +assertDescription('an array', arrayValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', arrayValue(), null); + $this->assertMismatchDescription('was a string "foo"', arrayValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php new file mode 100644 index 0000000..24309fc --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php @@ -0,0 +1,35 @@ +assertDescription('a boolean', booleanValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', booleanValue(), null); + $this->assertMismatchDescription('was a string "foo"', booleanValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php new file mode 100644 index 0000000..5098e21 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php @@ -0,0 +1,103 @@ +=')) { + $this->markTestSkipped('Closures require php 5.3'); + } + eval('assertThat(function () {}, callableValue());'); + } + + public function testEvaluatesToTrueIfArgumentImplementsInvoke() + { + if (!version_compare(PHP_VERSION, '5.3', '>=')) { + $this->markTestSkipped('Magic method __invoke() requires php 5.3'); + } + assertThat($this, callableValue()); + } + + public function testEvaluatesToFalseIfArgumentIsInvalidFunctionName() + { + if (function_exists('not_a_Hamcrest_function')) { + $this->markTestSkipped('Function "not_a_Hamcrest_function" must not exist'); + } + + assertThat('not_a_Hamcrest_function', not(callableValue())); + } + + public function testEvaluatesToFalseIfArgumentIsInvalidStaticMethodCallback() + { + assertThat( + array('Hamcrest\Type\IsCallableTest', 'noMethod'), + not(callableValue()) + ); + } + + public function testEvaluatesToFalseIfArgumentIsInvalidInstanceMethodCallback() + { + assertThat(array($this, 'noMethod'), not(callableValue())); + } + + public function testEvaluatesToFalseIfArgumentDoesntImplementInvoke() + { + assertThat(new \stdClass(), not(callableValue())); + } + + public function testEvaluatesToFalseIfArgumentDoesntMatchType() + { + assertThat(false, not(callableValue())); + assertThat(5.2, not(callableValue())); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('a callable', callableValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription( + 'was a string "invalid-function"', + callableValue(), + 'invalid-function' + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php new file mode 100644 index 0000000..85c2a96 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php @@ -0,0 +1,35 @@ +assertDescription('a double', doubleValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', doubleValue(), null); + $this->assertMismatchDescription('was a string "foo"', doubleValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php new file mode 100644 index 0000000..ce5a51a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php @@ -0,0 +1,36 @@ +assertDescription('an integer', integerValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', integerValue(), null); + $this->assertMismatchDescription('was a string "foo"', integerValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php new file mode 100644 index 0000000..1fd83ef --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php @@ -0,0 +1,53 @@ +assertDescription('a number', numericValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', numericValue(), null); + $this->assertMismatchDescription('was a string "foo"', numericValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php new file mode 100644 index 0000000..a3b617c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php @@ -0,0 +1,34 @@ +assertDescription('an object', objectValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', objectValue(), null); + $this->assertMismatchDescription('was a string "foo"', objectValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php new file mode 100644 index 0000000..d6ea534 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php @@ -0,0 +1,34 @@ +assertDescription('a resource', resourceValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', resourceValue(), null); + $this->assertMismatchDescription('was a string "foo"', resourceValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php new file mode 100644 index 0000000..72a188d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php @@ -0,0 +1,39 @@ +assertDescription('a scalar', scalarValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', scalarValue(), null); + $this->assertMismatchDescription('was an array ["foo"]', scalarValue(), array('foo')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php new file mode 100644 index 0000000..557d591 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php @@ -0,0 +1,35 @@ +assertDescription('a string', stringValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', stringValue(), null); + $this->assertMismatchDescription('was a double <5.2F>', stringValue(), 5.2); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php new file mode 100644 index 0000000..0c2cd04 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php @@ -0,0 +1,80 @@ +assertSame($matcher, $newMatcher); + } + + public function testWrapValueWithIsEqualWrapsPrimitive() + { + $matcher = \Hamcrest\Util::wrapValueWithIsEqual('foo'); + $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matcher); + $this->assertTrue($matcher->matches('foo')); + } + + public function testCheckAllAreMatchersAcceptsMatchers() + { + \Hamcrest\Util::checkAllAreMatchers(array( + new \Hamcrest\Text\MatchesPattern('/fo+/'), + new \Hamcrest\Core\IsEqual('foo'), + )); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testCheckAllAreMatchersFailsForPrimitive() + { + \Hamcrest\Util::checkAllAreMatchers(array( + new \Hamcrest\Text\MatchesPattern('/fo+/'), + 'foo', + )); + } + + private function callAndAssertCreateMatcherArray($items) + { + $matchers = \Hamcrest\Util::createMatcherArray($items); + $this->assertInternalType('array', $matchers); + $this->assertSameSize($items, $matchers); + foreach ($matchers as $matcher) { + $this->assertInstanceOf('\Hamcrest\Matcher', $matcher); + } + + return $matchers; + } + + public function testCreateMatcherArrayLeavesMatchersUntouched() + { + $matcher = new \Hamcrest\Text\MatchesPattern('/fo+/'); + $items = array($matcher); + $matchers = $this->callAndAssertCreateMatcherArray($items); + $this->assertSame($matcher, $matchers[0]); + } + + public function testCreateMatcherArrayWrapsPrimitiveWithIsEqualMatcher() + { + $matchers = $this->callAndAssertCreateMatcherArray(array('foo')); + $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]); + $this->assertTrue($matchers[0]->matches('foo')); + } + + public function testCreateMatcherArrayDoesntModifyOriginalArray() + { + $items = array('foo'); + $this->callAndAssertCreateMatcherArray($items); + $this->assertSame('foo', $items[0]); + } + + public function testCreateMatcherArrayUnwrapsSingleArrayElement() + { + $matchers = $this->callAndAssertCreateMatcherArray(array(array('foo'))); + $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]); + $this->assertTrue($matchers[0]->matches('foo')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php new file mode 100644 index 0000000..6774887 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php @@ -0,0 +1,198 @@ + + + + alice + Alice Frankel + admin + + + bob + Bob Frankel + user + + + charlie + Charlie Chan + user + + +XML; + self::$doc = new \DOMDocument(); + self::$doc->loadXML(self::$xml); + + self::$html = << + + Home Page + + +

Heading

+

Some text

+ + +HTML; + } + + protected function createMatcher() + { + return \Hamcrest\Xml\HasXPath::hasXPath('/users/user'); + } + + public function testMatchesWhenXPathIsFound() + { + assertThat('one match', self::$doc, hasXPath('user[id = "bob"]')); + assertThat('two matches', self::$doc, hasXPath('user[role = "user"]')); + } + + public function testDoesNotMatchWhenXPathIsNotFound() + { + assertThat( + 'no match', + self::$doc, + not(hasXPath('user[contains(id, "frank")]')) + ); + } + + public function testMatchesWhenExpressionWithoutMatcherEvaluatesToTrue() + { + assertThat( + 'one match', + self::$doc, + hasXPath('count(user[id = "bob"])') + ); + } + + public function testDoesNotMatchWhenExpressionWithoutMatcherEvaluatesToFalse() + { + assertThat( + 'no matches', + self::$doc, + not(hasXPath('count(user[id = "frank"])')) + ); + } + + public function testMatchesWhenExpressionIsEqual() + { + assertThat( + 'one match', + self::$doc, + hasXPath('count(user[id = "bob"])', 1) + ); + assertThat( + 'two matches', + self::$doc, + hasXPath('count(user[role = "user"])', 2) + ); + } + + public function testDoesNotMatchWhenExpressionIsNotEqual() + { + assertThat( + 'no match', + self::$doc, + not(hasXPath('count(user[id = "frank"])', 2)) + ); + assertThat( + 'one match', + self::$doc, + not(hasXPath('count(user[role = "admin"])', 2)) + ); + } + + public function testMatchesWhenContentMatches() + { + assertThat( + 'one match', + self::$doc, + hasXPath('user/name', containsString('ice')) + ); + assertThat( + 'two matches', + self::$doc, + hasXPath('user/role', equalTo('user')) + ); + } + + public function testDoesNotMatchWhenContentDoesNotMatch() + { + assertThat( + 'no match', + self::$doc, + not(hasXPath('user/name', containsString('Bobby'))) + ); + assertThat( + 'no matches', + self::$doc, + not(hasXPath('user/role', equalTo('owner'))) + ); + } + + public function testProvidesConvenientShortcutForHasXPathEqualTo() + { + assertThat('matches', self::$doc, hasXPath('count(user)', 3)); + assertThat('matches', self::$doc, hasXPath('user[2]/id', 'bob')); + } + + public function testProvidesConvenientShortcutForHasXPathCountEqualTo() + { + assertThat('matches', self::$doc, hasXPath('user[id = "charlie"]', 1)); + } + + public function testMatchesAcceptsXmlString() + { + assertThat('accepts XML string', self::$xml, hasXPath('user')); + } + + public function testMatchesAcceptsHtmlString() + { + assertThat('accepts HTML string', self::$html, hasXPath('body/h1', 'Heading')); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'XML or HTML document with XPath "/users/user"', + hasXPath('/users/user') + ); + $this->assertDescription( + 'XML or HTML document with XPath "count(/users/user)" <2>', + hasXPath('/users/user', 2) + ); + $this->assertDescription( + 'XML or HTML document with XPath "/users/user/name"' + . ' a string starting with "Alice"', + hasXPath('/users/user/name', startsWith('Alice')) + ); + } + + public function testHasAReadableMismatchDescription() + { + $this->assertMismatchDescription( + 'XPath returned no results', + hasXPath('/users/name'), + self::$doc + ); + $this->assertMismatchDescription( + 'XPath expression result was <3F>', + hasXPath('/users/user', 2), + self::$doc + ); + $this->assertMismatchDescription( + 'XPath returned ["alice", "bob", "charlie"]', + hasXPath('/users/user/id', 'Frank'), + self::$doc + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/bootstrap.php b/vendor/hamcrest/hamcrest-php/tests/bootstrap.php new file mode 100644 index 0000000..bc4958d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/bootstrap.php @@ -0,0 +1,11 @@ + + + + . + + + + + + ../hamcrest + + + diff --git a/vendor/mockery/mockery b/vendor/mockery/mockery new file mode 160000 index 0000000..7886b29 --- /dev/null +++ b/vendor/mockery/mockery @@ -0,0 +1 @@ +Subproject commit 7886b297ed4a9a0b29461c9efee366c9b1a0484c From 8b7c990786e4cae2bfbd4f75a9cdea39d1e4de7f Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Jan 2018 10:22:26 -0600 Subject: [PATCH 2/5] asdf --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f92a8e4..4fbcdad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea/* library/Vmwarephp/.wsdl_class_map.cache library/Vmwarephp/.clone_ticket.cache -/nbproject/private/ \ No newline at end of file +/nbproject/private/ +vendor From 99ed030c183274566d19f82281629a0d4e861be2 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Jan 2018 10:23:13 -0600 Subject: [PATCH 3/5] asdf --- vendor/composer/installed.json | 119 -- vendor/hamcrest/hamcrest-php/.coveralls.yml | 1 - vendor/hamcrest/hamcrest-php/.gitignore | 1 - vendor/hamcrest/hamcrest-php/.gush.yml | 7 - vendor/hamcrest/hamcrest-php/.travis.yml | 24 - vendor/hamcrest/hamcrest-php/CHANGES.txt | 167 -- vendor/hamcrest/hamcrest-php/LICENSE.txt | 27 - vendor/hamcrest/hamcrest-php/README.md | 53 - vendor/hamcrest/hamcrest-php/TODO.txt | 22 - vendor/hamcrest/hamcrest-php/composer.json | 38 - vendor/hamcrest/hamcrest-php/composer.lock | 1493 ----------------- .../hamcrest-php/generator/FactoryCall.php | 41 - .../hamcrest-php/generator/FactoryClass.php | 72 - .../hamcrest-php/generator/FactoryFile.php | 122 -- .../generator/FactoryGenerator.php | 115 -- .../hamcrest-php/generator/FactoryMethod.php | 231 --- .../generator/FactoryParameter.php | 69 - .../generator/GlobalFunctionFile.php | 42 - .../generator/StaticMethodFile.php | 38 - .../generator/parts/file_header.txt | 7 - .../generator/parts/functions_footer.txt | 0 .../generator/parts/functions_header.txt | 24 - .../generator/parts/functions_imports.txt | 0 .../generator/parts/matchers_footer.txt | 1 - .../generator/parts/matchers_header.txt | 7 - .../generator/parts/matchers_imports.txt | 2 - .../hamcrest/hamcrest-php/generator/run.php | 37 - .../hamcrest-php/hamcrest/Hamcrest.php | 805 --------- .../hamcrest/Hamcrest/Arrays/IsArray.php | 118 -- .../Hamcrest/Arrays/IsArrayContaining.php | 63 - .../Arrays/IsArrayContainingInAnyOrder.php | 59 - .../Arrays/IsArrayContainingInOrder.php | 57 - .../Hamcrest/Arrays/IsArrayContainingKey.php | 75 - .../Arrays/IsArrayContainingKeyValuePair.php | 80 - .../Hamcrest/Arrays/IsArrayWithSize.php | 73 - .../hamcrest/Hamcrest/Arrays/MatchingOnce.php | 69 - .../Hamcrest/Arrays/SeriesMatchingOnce.php | 75 - .../hamcrest/Hamcrest/AssertionError.php | 10 - .../hamcrest/Hamcrest/BaseDescription.php | 132 -- .../hamcrest/Hamcrest/BaseMatcher.php | 25 - .../Collection/IsEmptyTraversable.php | 71 - .../Collection/IsTraversableWithSize.php | 47 - .../hamcrest/Hamcrest/Core/AllOf.php | 59 - .../hamcrest/Hamcrest/Core/AnyOf.php | 58 - .../Hamcrest/Core/CombinableMatcher.php | 78 - .../hamcrest/Hamcrest/Core/DescribedAs.php | 68 - .../hamcrest/Hamcrest/Core/Every.php | 56 - .../hamcrest/Hamcrest/Core/HasToString.php | 56 - .../hamcrest/Hamcrest/Core/Is.php | 57 - .../hamcrest/Hamcrest/Core/IsAnything.php | 45 - .../Hamcrest/Core/IsCollectionContaining.php | 93 - .../hamcrest/Hamcrest/Core/IsEqual.php | 44 - .../hamcrest/Hamcrest/Core/IsIdentical.php | 38 - .../hamcrest/Hamcrest/Core/IsInstanceOf.php | 67 - .../hamcrest/Hamcrest/Core/IsNot.php | 44 - .../hamcrest/Hamcrest/Core/IsNull.php | 56 - .../hamcrest/Hamcrest/Core/IsSame.php | 51 - .../hamcrest/Hamcrest/Core/IsTypeOf.php | 71 - .../hamcrest/Hamcrest/Core/Set.php | 95 -- .../Hamcrest/Core/ShortcutCombination.php | 43 - .../hamcrest/Hamcrest/Description.php | 70 - .../hamcrest/Hamcrest/DiagnosingMatcher.php | 25 - .../hamcrest/Hamcrest/FeatureMatcher.php | 67 - .../Hamcrest/Internal/SelfDescribingValue.php | 27 - .../hamcrest/Hamcrest/Matcher.php | 50 - .../hamcrest/Hamcrest/MatcherAssert.php | 118 -- .../hamcrest/Hamcrest/Matchers.php | 713 -------- .../hamcrest/Hamcrest/NullDescription.php | 43 - .../hamcrest/Hamcrest/Number/IsCloseTo.php | 67 - .../Hamcrest/Number/OrderingComparison.php | 132 -- .../hamcrest/Hamcrest/SelfDescribing.php | 23 - .../hamcrest/Hamcrest/StringDescription.php | 57 - .../hamcrest/Hamcrest/Text/IsEmptyString.php | 85 - .../Hamcrest/Text/IsEqualIgnoringCase.php | 52 - .../Text/IsEqualIgnoringWhiteSpace.php | 66 - .../hamcrest/Hamcrest/Text/MatchesPattern.php | 40 - .../hamcrest/Hamcrest/Text/StringContains.php | 45 - .../Text/StringContainsIgnoringCase.php | 40 - .../Hamcrest/Text/StringContainsInOrder.php | 66 - .../hamcrest/Hamcrest/Text/StringEndsWith.php | 40 - .../Hamcrest/Text/StringStartsWith.php | 40 - .../Hamcrest/Text/SubstringMatcher.php | 45 - .../hamcrest/Hamcrest/Type/IsArray.php | 32 - .../hamcrest/Hamcrest/Type/IsBoolean.php | 32 - .../hamcrest/Hamcrest/Type/IsCallable.php | 37 - .../hamcrest/Hamcrest/Type/IsDouble.php | 34 - .../hamcrest/Hamcrest/Type/IsInteger.php | 32 - .../hamcrest/Hamcrest/Type/IsNumeric.php | 54 - .../hamcrest/Hamcrest/Type/IsObject.php | 32 - .../hamcrest/Hamcrest/Type/IsResource.php | 32 - .../hamcrest/Hamcrest/Type/IsScalar.php | 34 - .../hamcrest/Hamcrest/Type/IsString.php | 32 - .../Hamcrest/TypeSafeDiagnosingMatcher.php | 29 - .../hamcrest/Hamcrest/TypeSafeMatcher.php | 107 -- .../hamcrest-php/hamcrest/Hamcrest/Util.php | 76 - .../hamcrest/Hamcrest/Xml/HasXPath.php | 195 --- .../tests/Hamcrest/AbstractMatcherTest.php | 66 - .../Array/IsArrayContainingInAnyOrderTest.php | 54 - .../Array/IsArrayContainingInOrderTest.php | 44 - .../Array/IsArrayContainingKeyTest.php | 62 - .../IsArrayContainingKeyValuePairTest.php | 36 - .../Hamcrest/Array/IsArrayContainingTest.php | 50 - .../tests/Hamcrest/Array/IsArrayTest.php | 89 - .../Hamcrest/Array/IsArrayWithSizeTest.php | 37 - .../tests/Hamcrest/BaseMatcherTest.php | 23 - .../Collection/IsEmptyTraversableTest.php | 77 - .../Collection/IsTraversableWithSizeTest.php | 57 - .../tests/Hamcrest/Core/AllOfTest.php | 56 - .../tests/Hamcrest/Core/AnyOfTest.php | 79 - .../Hamcrest/Core/CombinableMatcherTest.php | 59 - .../tests/Hamcrest/Core/DescribedAsTest.php | 36 - .../tests/Hamcrest/Core/EveryTest.php | 30 - .../tests/Hamcrest/Core/HasToStringTest.php | 108 -- .../tests/Hamcrest/Core/IsAnythingTest.php | 29 - .../Core/IsCollectionContainingTest.php | 91 - .../tests/Hamcrest/Core/IsEqualTest.php | 102 -- .../tests/Hamcrest/Core/IsIdenticalTest.php | 30 - .../tests/Hamcrest/Core/IsInstanceOfTest.php | 51 - .../tests/Hamcrest/Core/IsNotTest.php | 31 - .../tests/Hamcrest/Core/IsNullTest.php | 20 - .../tests/Hamcrest/Core/IsSameTest.php | 30 - .../tests/Hamcrest/Core/IsTest.php | 33 - .../tests/Hamcrest/Core/IsTypeOfTest.php | 45 - .../tests/Hamcrest/Core/SampleBaseClass.php | 18 - .../tests/Hamcrest/Core/SampleSubClass.php | 6 - .../tests/Hamcrest/Core/SetTest.php | 116 -- .../tests/Hamcrest/FeatureMatcherTest.php | 73 - .../tests/Hamcrest/MatcherAssertTest.php | 190 --- .../tests/Hamcrest/Number/IsCloseToTest.php | 27 - .../Number/OrderingComparisonTest.php | 41 - .../tests/Hamcrest/StringDescriptionTest.php | 160 -- .../tests/Hamcrest/Text/IsEmptyStringTest.php | 86 - .../Hamcrest/Text/IsEqualIgnoringCaseTest.php | 40 - .../Text/IsEqualIgnoringWhiteSpaceTest.php | 51 - .../Hamcrest/Text/MatchesPatternTest.php | 30 - .../Text/StringContainsIgnoringCaseTest.php | 80 - .../Text/StringContainsInOrderTest.php | 42 - .../Hamcrest/Text/StringContainsTest.php | 86 - .../Hamcrest/Text/StringEndsWithTest.php | 62 - .../Hamcrest/Text/StringStartsWithTest.php | 62 - .../tests/Hamcrest/Type/IsArrayTest.php | 35 - .../tests/Hamcrest/Type/IsBooleanTest.php | 35 - .../tests/Hamcrest/Type/IsCallableTest.php | 103 -- .../tests/Hamcrest/Type/IsDoubleTest.php | 35 - .../tests/Hamcrest/Type/IsIntegerTest.php | 36 - .../tests/Hamcrest/Type/IsNumericTest.php | 53 - .../tests/Hamcrest/Type/IsObjectTest.php | 34 - .../tests/Hamcrest/Type/IsResourceTest.php | 34 - .../tests/Hamcrest/Type/IsScalarTest.php | 39 - .../tests/Hamcrest/Type/IsStringTest.php | 35 - .../hamcrest-php/tests/Hamcrest/UtilTest.php | 80 - .../tests/Hamcrest/Xml/HasXPathTest.php | 198 --- .../hamcrest/hamcrest-php/tests/bootstrap.php | 11 - .../hamcrest-php/tests/phpunit.xml.dist | 22 - vendor/mockery/mockery | 1 - 155 files changed, 11613 deletions(-) delete mode 100644 vendor/composer/installed.json delete mode 100644 vendor/hamcrest/hamcrest-php/.coveralls.yml delete mode 100644 vendor/hamcrest/hamcrest-php/.gitignore delete mode 100644 vendor/hamcrest/hamcrest-php/.gush.yml delete mode 100644 vendor/hamcrest/hamcrest-php/.travis.yml delete mode 100644 vendor/hamcrest/hamcrest-php/CHANGES.txt delete mode 100644 vendor/hamcrest/hamcrest-php/LICENSE.txt delete mode 100644 vendor/hamcrest/hamcrest-php/README.md delete mode 100644 vendor/hamcrest/hamcrest-php/TODO.txt delete mode 100644 vendor/hamcrest/hamcrest-php/composer.json delete mode 100644 vendor/hamcrest/hamcrest-php/composer.lock delete mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryCall.php delete mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryClass.php delete mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryFile.php delete mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php delete mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php delete mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php delete mode 100644 vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php delete mode 100644 vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php delete mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt delete mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/functions_footer.txt delete mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/functions_header.txt delete mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt delete mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt delete mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt delete mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt delete mode 100644 vendor/hamcrest/hamcrest-php/generator/run.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php delete mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsSameTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SetTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/StringDescriptionTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/bootstrap.php delete mode 100644 vendor/hamcrest/hamcrest-php/tests/phpunit.xml.dist delete mode 160000 vendor/mockery/mockery diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json deleted file mode 100644 index fffb9b7..0000000 --- a/vendor/composer/installed.json +++ /dev/null @@ -1,119 +0,0 @@ -[ - { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.0", - "version_normalized": "2.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "^1.0" - }, - "time": "2016-01-20 08:20:44", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "hamcrest" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ] - }, - { - "name": "mockery/mockery", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "7886b297ed4a9a0b29461c9efee366c9b1a0484c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/7886b297ed4a9a0b29461c9efee366c9b1a0484c", - "reference": "7886b297ed4a9a0b29461c9efee366c9b1a0484c", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "~2.0", - "lib-pcre": ">=7.0", - "php": ">=5.6.0" - }, - "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5" - }, - "time": "2018-01-22 09:54:57", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework", - "homepage": "https://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ] - } -] diff --git a/vendor/hamcrest/hamcrest-php/.coveralls.yml b/vendor/hamcrest/hamcrest-php/.coveralls.yml deleted file mode 100644 index f2f9ed5..0000000 --- a/vendor/hamcrest/hamcrest-php/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -src_dir: hamcrest diff --git a/vendor/hamcrest/hamcrest-php/.gitignore b/vendor/hamcrest/hamcrest-php/.gitignore deleted file mode 100644 index 22d0d82..0000000 --- a/vendor/hamcrest/hamcrest-php/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor diff --git a/vendor/hamcrest/hamcrest-php/.gush.yml b/vendor/hamcrest/hamcrest-php/.gush.yml deleted file mode 100644 index b7c226d..0000000 --- a/vendor/hamcrest/hamcrest-php/.gush.yml +++ /dev/null @@ -1,7 +0,0 @@ -adapter: github -issue_tracker: github -meta-header: "Copyright (c) 2009-2015 hamcrest.org" -table-pr: - fixed_tickets: ['Fixed Tickets', ''] - license: ['License', MIT] -base: master diff --git a/vendor/hamcrest/hamcrest-php/.travis.yml b/vendor/hamcrest/hamcrest-php/.travis.yml deleted file mode 100644 index 80b4ed0..0000000 --- a/vendor/hamcrest/hamcrest-php/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: php -php: - - 5.6 - - 5.5 - - 5.4 - - 5.3 - - hhvm - - 7.0 - -matrix: - allow_failures: - - php: hhvm - -install: - - composer update --prefer-source - -script: - - mkdir -p build/logs - - php vendor/bin/phpunit --coverage-clover=build/logs/clover.xml -c tests/phpunit.xml.dist - -after_script: - - php vendor/bin/coveralls -v - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml diff --git a/vendor/hamcrest/hamcrest-php/CHANGES.txt b/vendor/hamcrest/hamcrest-php/CHANGES.txt deleted file mode 100644 index 708193b..0000000 --- a/vendor/hamcrest/hamcrest-php/CHANGES.txt +++ /dev/null @@ -1,167 +0,0 @@ -== Version 2.0: Released XXX XX 2016 == - -* Removed automatic loading of global functions - -== Version 1.1.0: Released Feb 2 2012 == - -Issues Fixed: 121, 138, 147 - -* Added non-empty matchers to complement the emptiness-matching forms. - - - nonEmptyString() - - nonEmptyArray() - - nonEmptyTraversable() - -* Added ability to pass variable arguments to several array-based matcher - factory methods so they work like allOf() et al. - - - anArray() - - arrayContainingInAnyOrder(), containsInAnyOrder() - - arrayContaining(), contains() - - stringContainsInOrder() - -* Matchers that accept an array of matchers now also accept variable arguments. - Any non-matcher arguments are wrapped by IsEqual. - -* Added noneOf() as a shortcut for not(anyOf()). - - -== Version 1.0.0: Released Jan 20 2012 == - -Issues Fixed: 119, 136, 139, 141, 148, 149, 172 - -* Moved hamcrest.php into Hamcrest folder and renamed to Hamcrest.php. - This is more in line with PEAR packaging standards. - -* Renamed callable() to callableValue() for compatibility with PHP 5.4. - -* Added Hamcrest_Text_StringContainsIgnoringCase to assert using stripos(). - - assertThat('fOObAr', containsStringIgnoringCase('oba')); - assertThat('fOObAr', containsString('oba')->ignoringCase()); - -* Fixed Hamcrest_Core_IsInstanceOf to return false for native types. - -* Moved string-based matchers to Hamcrest_Text package. - StringContains, StringEndsWith, StringStartsWith, and SubstringMatcher - -* Hamcrest.php and Hamcrest_Matchers.php are now built from @factory doctags. - Added @factory doctag to every static factory method. - -* Hamcrest_Matchers and Hamcrest.php now import each matcher as-needed - and Hamcrest.php calls the matchers directly instead of Hamcrest_Matchers. - - -== Version 0.3.0: Released Jul 26 2010 == - -* Added running count to Hamcrest_MatcherAssert with methods to get and reset it. - This can be used by unit testing frameworks for reporting. - -* Added Hamcrest_Core_HasToString to assert return value of toString() or __toString(). - - assertThat($anObject, hasToString('foo')); - -* Added Hamcrest_Type_IsScalar to assert is_scalar(). - Matches values of type bool, int, float, double, and string. - - assertThat($count, scalarValue()); - assertThat('foo', scalarValue()); - -* Added Hamcrest_Collection package. - - - IsEmptyTraversable - - IsTraversableWithSize - - assertThat($iterator, emptyTraversable()); - assertThat($iterator, traversableWithSize(5)); - -* Added Hamcrest_Xml_HasXPath to assert XPath expressions or the content of nodes in an XML/HTML DOM. - - assertThat($dom, hasXPath('books/book/title')); - assertThat($dom, hasXPath('books/book[contains(title, "Alice")]', 3)); - assertThat($dom, hasXPath('books/book/title', 'Alice in Wonderland')); - assertThat($dom, hasXPath('count(books/book)', greaterThan(10))); - -* Added aliases to match the Java API. - - hasEntry() -> hasKeyValuePair() - hasValue() -> hasItemInArray() - contains() -> arrayContaining() - containsInAnyOrder() -> arrayContainingInAnyOrder() - -* Added optional subtype to Hamcrest_TypeSafeMatcher to enforce object class or resource type. - -* Hamcrest_TypeSafeDiagnosingMatcher now extends Hamcrest_TypeSafeMatcher. - - -== Version 0.2.0: Released Jul 14 2010 == - -Issues Fixed: 109, 111, 114, 115 - -* Description::appendValues() and appendValueList() accept Iterator and IteratorAggregate. [111] - BaseDescription::appendValue() handles IteratorAggregate. - -* assertThat() accepts a single boolean parameter and - wraps any non-Matcher third parameter with equalTo(). - -* Removed null return value from assertThat(). [114] - -* Fixed wrong variable name in contains(). [109] - -* Added Hamcrest_Core_IsSet to assert isset(). - - assertThat(array('foo' => 'bar'), set('foo')); - assertThat(array('foo' => 'bar'), notSet('bar')); - -* Added Hamcrest_Core_IsTypeOf to assert built-in types with gettype(). [115] - Types: array, boolean, double, integer, null, object, resource, and string. - Note that gettype() returns "double" for float values. - - assertThat($count, typeOf('integer')); - assertThat(3.14159, typeOf('double')); - assertThat(array('foo', 'bar'), typeOf('array')); - assertThat(new stdClass(), typeOf('object')); - -* Added type-specific matchers in new Hamcrest_Type package. - - - IsArray - - IsBoolean - - IsDouble (includes float values) - - IsInteger - - IsObject - - IsResource - - IsString - - assertThat($count, integerValue()); - assertThat(3.14159, floatValue()); - assertThat('foo', stringValue()); - -* Added Hamcrest_Type_IsNumeric to assert is_numeric(). - Matches values of type int and float/double or strings that are formatted as numbers. - - assertThat(5, numericValue()); - assertThat('-5e+3', numericValue()); - -* Added Hamcrest_Type_IsCallable to assert is_callable(). - - assertThat('preg_match', callable()); - assertThat(array('SomeClass', 'SomeMethod'), callable()); - assertThat(array($object, 'SomeMethod'), callable()); - assertThat($object, callable()); - assertThat(function ($x, $y) { return $x + $y; }, callable()); - -* Added Hamcrest_Text_MatchesPattern for regex matching with preg_match(). - - assertThat('foobar', matchesPattern('/o+b/')); - -* Added aliases: - - atLeast() for greaterThanOrEqualTo() - - atMost() for lessThanOrEqualTo() - - -== Version 0.1.0: Released Jul 7 2010 == - -* Created PEAR package - -* Core matchers - diff --git a/vendor/hamcrest/hamcrest-php/LICENSE.txt b/vendor/hamcrest/hamcrest-php/LICENSE.txt deleted file mode 100644 index 91cd329..0000000 --- a/vendor/hamcrest/hamcrest-php/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD License - -Copyright (c) 2000-2014, www.hamcrest.org -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 Hamcrest 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/hamcrest/hamcrest-php/README.md b/vendor/hamcrest/hamcrest-php/README.md deleted file mode 100644 index 0b07c71..0000000 --- a/vendor/hamcrest/hamcrest-php/README.md +++ /dev/null @@ -1,53 +0,0 @@ -This is the PHP port of Hamcrest Matchers -========================================= - -[![Build Status](https://travis-ci.org/hamcrest/hamcrest-php.png?branch=master)](https://travis-ci.org/hamcrest/hamcrest-php) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/?branch=master) -[![Code Coverage](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/?branch=master) - -Hamcrest is a matching library originally written for Java, but -subsequently ported to many other languages. hamcrest-php is the -official PHP port of Hamcrest and essentially follows a literal -translation of the original Java API for Hamcrest, with a few -Exceptions, mostly down to PHP language barriers: - - 1. `instanceOf($theClass)` is actually `anInstanceOf($theClass)` - - 2. `both(containsString('a'))->and(containsString('b'))` - is actually `both(containsString('a'))->andAlso(containsString('b'))` - - 3. `either(containsString('a'))->or(containsString('b'))` - is actually `either(containsString('a'))->orElse(containsString('b'))` - - 4. Unless it would be non-semantic for a matcher to do so, hamcrest-php - allows dynamic typing for it's input, in "the PHP way". Exception are - where semantics surrounding the type itself would suggest otherwise, - such as stringContains() and greaterThan(). - - 5. Several official matchers have not been ported because they don't - make sense or don't apply in PHP: - - - `typeCompatibleWith($theClass)` - - `eventFrom($source)` - - `hasProperty($name)` ** - - `samePropertyValuesAs($obj)` ** - - 6. When most of the collections matchers are finally ported, PHP-specific - aliases will probably be created due to a difference in naming - conventions between Java's Arrays, Collections, Sets and Maps compared - with PHP's Arrays. - ---- -** [Unless we consider POPO's (Plain Old PHP Objects) akin to JavaBeans] - - The POPO thing is a joke. Java devs coin the term POJO's (Plain Old - Java Objects). - - -Usage ------ - -Hamcrest matchers are easy to use as: - -```php -Hamcrest_MatcherAssert::assertThat('a', Hamcrest_Matchers::equalToIgnoringCase('A')); -``` diff --git a/vendor/hamcrest/hamcrest-php/TODO.txt b/vendor/hamcrest/hamcrest-php/TODO.txt deleted file mode 100644 index 92e1190..0000000 --- a/vendor/hamcrest/hamcrest-php/TODO.txt +++ /dev/null @@ -1,22 +0,0 @@ -Still TODO Before Complete for PHP ----------------------------------- - -Port: - - - Hamcrest_Collection_* - - IsCollectionWithSize - - IsEmptyCollection - - IsIn - - IsTraversableContainingInAnyOrder - - IsTraversableContainingInOrder - - IsMapContaining (aliases) - -Aliasing/Deprecation (questionable): - - - Find and fix any factory methods that start with "is". - -Namespaces: - - - Investigate adding PHP 5.3+ namespace support in a way that still permits - use in PHP 5.2. - - Other than a parallel codebase, I don't see how this could be possible. diff --git a/vendor/hamcrest/hamcrest-php/composer.json b/vendor/hamcrest/hamcrest-php/composer.json deleted file mode 100644 index 5349f5f..0000000 --- a/vendor/hamcrest/hamcrest-php/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "hamcrest/hamcrest-php", - "type": "library", - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": ["test"], - "license": "BSD", - "authors": [ - ], - - "autoload": { - "classmap": ["hamcrest"] - }, - "autoload-dev": { - "classmap": ["tests", "generator"] - }, - - "require": { - "php": "^5.3|^7.0" - }, - - "require-dev": { - "satooshi/php-coveralls": "^1.0", - "phpunit/php-file-iterator": "1.3.3", - "phpunit/phpunit": "~4.0" - }, - - "replace": { - "kodova/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "cordoval/hamcrest-php": "*" - }, - - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - } -} diff --git a/vendor/hamcrest/hamcrest-php/composer.lock b/vendor/hamcrest/hamcrest-php/composer.lock deleted file mode 100644 index 0581a4e..0000000 --- a/vendor/hamcrest/hamcrest-php/composer.lock +++ /dev/null @@ -1,1493 +0,0 @@ -{ - "_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": "52d9e3c2e238bdc2aab7f6e1d322e31d", - "content-hash": "ed113672807f01f40b4d9809b102dc31", - "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": "guzzle/guzzle", - "version": "v3.9.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" - }, - "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" - }, - "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.9-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" - } - ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2015-03-18 18:23:50" - }, - { - "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.4", - "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": "*" - }, - "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-10-06 15:47:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.3.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "16a78140ed2fc01b945cfa539665fadc6a038029" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/16a78140ed2fc01b945cfa539665fadc6a038029", - "reference": "16a78140ed2fc01b945cfa539665fadc6a038029", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "File/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2012-10-11 11:44:38" - }, - { - "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.5.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d6429b0995b24a2d9dfe5587ee3a7071c1161af4", - "reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "~1.3,>=1.3.1", - "phpunit/php-code-coverage": "~2.0,>=2.0.11", - "phpunit/php-file-iterator": "~1.3.2", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.2", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.5.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-03-29 09:24:05" - }, - { - "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": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "satooshi/php-coveralls", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/satooshi/php-coveralls.git", - "reference": "3edbdbdb4f4cfab5cb9ce83655ff81432f2221a6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/3edbdbdb4f4cfab5cb9ce83655ff81432f2221a6", - "reference": "3edbdbdb4f4cfab5cb9ce83655ff81432f2221a6", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzle/guzzle": "^2.8|^3.0", - "php": ">=5.3.3", - "psr/log": "^1.0", - "symfony/config": "^2.4|^3.0", - "symfony/console": "^2.1|^3.0", - "symfony/stopwatch": "^2.2|^3.0", - "symfony/yaml": "^2.1|^3.0" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "bin/coveralls" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.8-dev" - } - }, - "autoload": { - "psr-4": { - "Satooshi\\": "src/Satooshi/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/satooshi/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "time": "2015-12-28 09:07:32" - }, - { - "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.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "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": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-12-08 07:14:41" - }, - { - "name": "sebastian/environment", - "version": "1.3.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6e7133793a8e5a5714a551a8324337374be209df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", - "reference": "6e7133793a8e5a5714a551a8324337374be209df", - "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-12-02 08:37:27" - }, - { - "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.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "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": "2015-10-12 03:26:01" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", - "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-11-11 19:50:13" - }, - { - "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/config", - "version": "v2.8.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2", - "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/filesystem": "~2.3|~3.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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 Config Component", - "homepage": "https://symfony.com", - "time": "2015-12-26 13:37:56" - }, - { - "name": "symfony/console", - "version": "v2.8.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2e06a5ccb19dcf9b89f1c6a677a39a8df773635a", - "reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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 Console Component", - "homepage": "https://symfony.com", - "time": "2015-12-22 10:25:57" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.8.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5eb815363c0388e83247e7e9853e5dbc14999cc", - "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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 EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2015-10-30 20:15:42" - }, - { - "name": "symfony/filesystem", - "version": "v2.8.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/a7ad724530a764d70c168d321ac226ba3d2f10fc", - "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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 Filesystem Component", - "homepage": "https://symfony.com", - "time": "2015-12-22 10:25:57" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/49ff736bd5d41f45240cec77b44967d76e0c3d25", - "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2015-11-20 09:19:13" - }, - { - "name": "symfony/stopwatch", - "version": "v2.8.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "5f1e2ebd1044da542d2b9510527836e8be92b1cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5f1e2ebd1044da542d2b9510527836e8be92b1cb", - "reference": "5f1e2ebd1044da542d2b9510527836e8be92b1cb", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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 Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2015-10-30 20:15:42" - }, - { - "name": "symfony/yaml", - "version": "v2.8.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", - "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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-12-26 13:37:56" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.3.2" - }, - "platform-dev": [] -} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php deleted file mode 100644 index 83965b2..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php +++ /dev/null @@ -1,41 +0,0 @@ -method = $method; - $this->name = $name; - } - - public function getMethod() - { - return $this->method; - } - - public function getName() - { - return $this->name; - } -} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php deleted file mode 100644 index 0c6bf78..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php +++ /dev/null @@ -1,72 +0,0 @@ -file = $file; - $this->reflector = $class; - $this->extractFactoryMethods(); - } - - public function extractFactoryMethods() - { - $this->methods = array(); - foreach ($this->getPublicStaticMethods() as $method) { - if ($method->isFactory()) { -// echo $this->getName() . '::' . $method->getName() . ' : ' . count($method->getCalls()) . PHP_EOL; - $this->methods[] = $method; - } - } - } - - public function getPublicStaticMethods() - { - $methods = array(); - foreach ($this->reflector->getMethods(ReflectionMethod::IS_STATIC) as $method) { - if ($method->isPublic() && $method->getDeclaringClass() == $this->reflector) { - $methods[] = new FactoryMethod($this, $method); - } - } - return $methods; - } - - public function getFile() - { - return $this->file; - } - - public function getName() - { - return $this->reflector->name; - } - - public function isFactory() - { - return !empty($this->methods); - } - - public function getMethods() - { - return $this->methods; - } -} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php deleted file mode 100644 index ac3d6c7..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php +++ /dev/null @@ -1,122 +0,0 @@ -file = $file; - $this->indent = $indent; - } - - abstract public function addCall(FactoryCall $call); - - abstract public function build(); - - public function addFileHeader() - { - $this->code = ''; - $this->addPart('file_header'); - } - - public function addPart($name) - { - $this->addCode($this->readPart($name)); - } - - public function addCode($code) - { - $this->code .= $code; - } - - public function readPart($name) - { - return file_get_contents(__DIR__ . "/parts/$name.txt"); - } - - public function generateFactoryCall(FactoryCall $call) - { - $method = $call->getMethod(); - $code = $method->getComment($this->indent) . PHP_EOL; - $code .= $this->generateDeclaration($call->getName(), $method); - // $code .= $this->generateImport($method); - $code .= $this->generateCall($method); - $code .= $this->generateClosing(); - return $code; - } - - public function generateDeclaration($name, FactoryMethod $method) - { - $code = $this->indent . $this->getDeclarationModifiers() - . 'function ' . $name . '(' - . $this->generateDeclarationArguments($method) - . ')' . PHP_EOL . $this->indent . '{' . PHP_EOL; - return $code; - } - - public function getDeclarationModifiers() - { - return ''; - } - - public function generateDeclarationArguments(FactoryMethod $method) - { - if ($method->acceptsVariableArguments()) { - return '/* args... */'; - } else { - return $method->getParameterDeclarations(); - } - } - - public function generateImport(FactoryMethod $method) - { - return $this->indent . self::INDENT . "require_once '" . $method->getClass()->getFile() . "';" . PHP_EOL; - } - - public function generateCall(FactoryMethod $method) - { - $code = ''; - if ($method->acceptsVariableArguments()) { - $code .= $this->indent . self::INDENT . '$args = func_get_args();' . PHP_EOL; - } - - $code .= $this->indent . self::INDENT . 'return '; - if ($method->acceptsVariableArguments()) { - $code .= 'call_user_func_array(array(\'' - . '\\' . $method->getClassName() . '\', \'' - . $method->getName() . '\'), $args);' . PHP_EOL; - } else { - $code .= '\\' . $method->getClassName() . '::' - . $method->getName() . '(' - . $method->getParameterInvocations() . ');' . PHP_EOL; - } - - return $code; - } - - public function generateClosing() - { - return $this->indent . '}' . PHP_EOL; - } - - public function write() - { - file_put_contents($this->file, $this->code); - } -} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php deleted file mode 100644 index 37f80b6..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php +++ /dev/null @@ -1,115 +0,0 @@ -path = $path; - $this->factoryFiles = array(); - } - - public function addFactoryFile(FactoryFile $factoryFile) - { - $this->factoryFiles[] = $factoryFile; - } - - public function generate() - { - $classes = $this->getClassesWithFactoryMethods(); - foreach ($classes as $class) { - foreach ($class->getMethods() as $method) { - foreach ($method->getCalls() as $call) { - foreach ($this->factoryFiles as $file) { - $file->addCall($call); - } - } - } - } - } - - public function write() - { - foreach ($this->factoryFiles as $file) { - $file->build(); - $file->write(); - } - } - - public function getClassesWithFactoryMethods() - { - $classes = array(); - $files = $this->getSortedFiles(); - foreach ($files as $file) { - $class = $this->getFactoryClass($file); - if ($class !== null) { - $classes[] = $class; - } - } - - return $classes; - } - - public function getSortedFiles() - { - $iter = \File_Iterator_Factory::getFileIterator($this->path, '.php'); - $files = array(); - foreach ($iter as $file) { - $files[] = $file; - } - sort($files, SORT_STRING); - - return $files; - } - - public function getFactoryClass($file) - { - $name = $this->getFactoryClassName($file); - if ($name !== null) { - require_once $file; - - if (class_exists($name)) { - $class = new FactoryClass(substr($file, strpos($file, 'Hamcrest/')), new ReflectionClass($name)); - if ($class->isFactory()) { - return $class; - } - } - } - - return null; - } - - public function getFactoryClassName($file) - { - $content = file_get_contents($file); - if (preg_match('/namespace\s+(.+);/', $content, $namespace) - && preg_match('/\n\s*class\s+(\w+)\s+extends\b/', $content, $className) - && preg_match('/@factory\b/', $content) - ) { - return $namespace[1] . '\\' . $className[1]; - } - - return null; - } -} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php deleted file mode 100644 index 44f8dc5..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php +++ /dev/null @@ -1,231 +0,0 @@ -class = $class; - $this->reflector = $reflector; - $this->extractCommentWithoutLeadingShashesAndStars(); - $this->extractFactoryNamesFromComment(); - $this->extractParameters(); - } - - public function extractCommentWithoutLeadingShashesAndStars() - { - $this->comment = explode("\n", $this->reflector->getDocComment()); - foreach ($this->comment as &$line) { - $line = preg_replace('#^\s*(/\\*+|\\*+/|\\*)\s?#', '', $line); - } - $this->trimLeadingBlankLinesFromComment(); - $this->trimTrailingBlankLinesFromComment(); - } - - public function trimLeadingBlankLinesFromComment() - { - while (count($this->comment) > 0) { - $line = array_shift($this->comment); - if (trim($line) != '') { - array_unshift($this->comment, $line); - break; - } - } - } - - public function trimTrailingBlankLinesFromComment() - { - while (count($this->comment) > 0) { - $line = array_pop($this->comment); - if (trim($line) != '') { - array_push($this->comment, $line); - break; - } - } - } - - public function extractFactoryNamesFromComment() - { - $this->calls = array(); - for ($i = 0; $i < count($this->comment); $i++) { - if ($this->extractFactoryNamesFromLine($this->comment[$i])) { - unset($this->comment[$i]); - } - } - $this->trimTrailingBlankLinesFromComment(); - } - - public function extractFactoryNamesFromLine($line) - { - if (preg_match('/^\s*@factory(\s+(.+))?$/', $line, $match)) { - $this->createCalls( - $this->extractFactoryNamesFromAnnotation( - isset($match[2]) ? trim($match[2]) : null - ) - ); - return true; - } - return false; - } - - public function extractFactoryNamesFromAnnotation($value) - { - $primaryName = $this->reflector->getName(); - if (empty($value)) { - return array($primaryName); - } - preg_match_all('/(\.{3}|-|[a-zA-Z_][a-zA-Z_0-9]*)/', $value, $match); - $names = $match[0]; - if (in_array('...', $names)) { - $this->isVarArgs = true; - } - if (!in_array('-', $names) && !in_array($primaryName, $names)) { - array_unshift($names, $primaryName); - } - return $names; - } - - public function createCalls(array $names) - { - $names = array_unique($names); - foreach ($names as $name) { - if ($name != '-' && $name != '...') { - $this->calls[] = new FactoryCall($this, $name); - } - } - } - - public function extractParameters() - { - $this->parameters = array(); - if (!$this->isVarArgs) { - foreach ($this->reflector->getParameters() as $parameter) { - $this->parameters[] = new FactoryParameter($this, $parameter); - } - } - } - - public function getParameterDeclarations() - { - if ($this->isVarArgs || !$this->hasParameters()) { - return ''; - } - $params = array(); - foreach ($this->parameters as /** @var $parameter FactoryParameter */ - $parameter) { - $params[] = $parameter->getDeclaration(); - } - return implode(', ', $params); - } - - public function getParameterInvocations() - { - if ($this->isVarArgs) { - return ''; - } - $params = array(); - foreach ($this->parameters as $parameter) { - $params[] = $parameter->getInvocation(); - } - return implode(', ', $params); - } - - - public function getClass() - { - return $this->class; - } - - public function getClassName() - { - return $this->class->getName(); - } - - public function getName() - { - return $this->reflector->name; - } - - public function isFactory() - { - return count($this->calls) > 0; - } - - public function getCalls() - { - return $this->calls; - } - - public function acceptsVariableArguments() - { - return $this->isVarArgs; - } - - public function hasParameters() - { - return !empty($this->parameters); - } - - public function getParameters() - { - return $this->parameters; - } - - public function getFullName() - { - return $this->getClassName() . '::' . $this->getName(); - } - - public function getCommentText() - { - return implode(PHP_EOL, $this->comment); - } - - public function getComment($indent = '') - { - $comment = $indent . '/**'; - foreach ($this->comment as $line) { - $comment .= PHP_EOL . rtrim($indent . ' * ' . $line); - } - $comment .= PHP_EOL . $indent . ' */'; - return $comment; - } -} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php deleted file mode 100644 index 93a76b3..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php +++ /dev/null @@ -1,69 +0,0 @@ -method = $method; - $this->reflector = $reflector; - } - - public function getDeclaration() - { - if ($this->reflector->isArray()) { - $code = 'array '; - } else { - $class = $this->reflector->getClass(); - if ($class !== null) { - $code = '\\' . $class->name . ' '; - } else { - $code = ''; - } - } - $code .= '$' . $this->reflector->name; - if ($this->reflector->isOptional()) { - $default = $this->reflector->getDefaultValue(); - if (is_null($default)) { - $default = 'null'; - } elseif (is_bool($default)) { - $default = $default ? 'true' : 'false'; - } elseif (is_string($default)) { - $default = "'" . $default . "'"; - } elseif (is_numeric($default)) { - $default = strval($default); - } elseif (is_array($default)) { - $default = 'array()'; - } else { - echo 'Warning: unknown default type for ' . $this->getMethod()->getFullName() . PHP_EOL; - var_dump($default); - $default = 'null'; - } - $code .= ' = ' . $default; - } - return $code; - } - - public function getInvocation() - { - return '$' . $this->reflector->name; - } - - public function getMethod() - { - return $this->method; - } -} diff --git a/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php deleted file mode 100644 index 5ee1b69..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php +++ /dev/null @@ -1,42 +0,0 @@ -functions = ''; - } - - public function addCall(FactoryCall $call) - { - $this->functions .= PHP_EOL . $this->generateFactoryCall($call); - } - - public function build() - { - $this->addFileHeader(); - $this->addPart('functions_imports'); - $this->addPart('functions_header'); - $this->addCode($this->functions); - $this->addPart('functions_footer'); - } - - public function generateFactoryCall(FactoryCall $call) - { - $code = "if (!function_exists('{$call->getName()}')) {"; - $code.= parent::generateFactoryCall($call); - $code.= "}\n"; - - return $code; - } -} diff --git a/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php deleted file mode 100644 index 44cec02..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php +++ /dev/null @@ -1,38 +0,0 @@ -methods = ''; - } - - public function addCall(FactoryCall $call) - { - $this->methods .= PHP_EOL . $this->generateFactoryCall($call); - } - - public function getDeclarationModifiers() - { - return 'public static '; - } - - public function build() - { - $this->addFileHeader(); - $this->addPart('matchers_imports'); - $this->addPart('matchers_header'); - $this->addCode($this->methods); - $this->addPart('matchers_footer'); - } -} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt deleted file mode 100644 index 7b352e4..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt +++ /dev/null @@ -1,7 +0,0 @@ - - * //With an identifier - * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty")); - * //Without an identifier - * assertThat($apple->flavour(), equalTo("tasty")); - * //Evaluating a boolean expression - * assertThat("some error", $a > $b); - * - */ - function assertThat() - { - $args = func_get_args(); - call_user_func_array( - array('Hamcrest\MatcherAssert', 'assertThat'), - $args - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt deleted file mode 100644 index 5c34318..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt +++ /dev/null @@ -1 +0,0 @@ -} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt deleted file mode 100644 index 4f8bb2b..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt +++ /dev/null @@ -1,7 +0,0 @@ - - -/** - * A series of static factories for all hamcrest matchers. - */ -class Matchers -{ diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt deleted file mode 100644 index 7dd6849..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt +++ /dev/null @@ -1,2 +0,0 @@ - -namespace Hamcrest; \ No newline at end of file diff --git a/vendor/hamcrest/hamcrest-php/generator/run.php b/vendor/hamcrest/hamcrest-php/generator/run.php deleted file mode 100644 index 924d752..0000000 --- a/vendor/hamcrest/hamcrest-php/generator/run.php +++ /dev/null @@ -1,37 +0,0 @@ -addFactoryFile(new StaticMethodFile(STATIC_MATCHERS_FILE)); -$generator->addFactoryFile(new GlobalFunctionFile(GLOBAL_FUNCTIONS_FILE)); -$generator->generate(); -$generator->write(); diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php deleted file mode 100644 index 8a719eb..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php +++ /dev/null @@ -1,805 +0,0 @@ - - * //With an identifier - * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty")); - * //Without an identifier - * assertThat($apple->flavour(), equalTo("tasty")); - * //Evaluating a boolean expression - * assertThat("some error", $a > $b); - * - */ - function assertThat() - { - $args = func_get_args(); - call_user_func_array( - array('Hamcrest\MatcherAssert', 'assertThat'), - $args - ); - } -} - -if (!function_exists('anArray')) { /** - * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i]. - */ - function anArray(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Arrays\IsArray', 'anArray'), $args); - } -} - -if (!function_exists('hasItemInArray')) { /** - * Evaluates to true if any item in an array satisfies the given matcher. - * - * @param mixed $item as a {@link Hamcrest\Matcher} or a value. - * - * @return \Hamcrest\Arrays\IsArrayContaining - */ - function hasItemInArray($item) - { - return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item); - } -} - -if (!function_exists('hasValue')) { /** - * Evaluates to true if any item in an array satisfies the given matcher. - * - * @param mixed $item as a {@link Hamcrest\Matcher} or a value. - * - * @return \Hamcrest\Arrays\IsArrayContaining - */ - function hasValue($item) - { - return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item); - } -} - -if (!function_exists('arrayContainingInAnyOrder')) { /** - * An array with elements that match the given matchers. - */ - function arrayContainingInAnyOrder(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args); - } -} - -if (!function_exists('containsInAnyOrder')) { /** - * An array with elements that match the given matchers. - */ - function containsInAnyOrder(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args); - } -} - -if (!function_exists('arrayContaining')) { /** - * An array with elements that match the given matchers in the same order. - */ - function arrayContaining(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args); - } -} - -if (!function_exists('contains')) { /** - * An array with elements that match the given matchers in the same order. - */ - function contains(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args); - } -} - -if (!function_exists('hasKeyInArray')) { /** - * Evaluates to true if any key in an array matches the given matcher. - * - * @param mixed $key as a {@link Hamcrest\Matcher} or a value. - * - * @return \Hamcrest\Arrays\IsArrayContainingKey - */ - function hasKeyInArray($key) - { - return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key); - } -} - -if (!function_exists('hasKey')) { /** - * Evaluates to true if any key in an array matches the given matcher. - * - * @param mixed $key as a {@link Hamcrest\Matcher} or a value. - * - * @return \Hamcrest\Arrays\IsArrayContainingKey - */ - function hasKey($key) - { - return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key); - } -} - -if (!function_exists('hasKeyValuePair')) { /** - * Test if an array has both an key and value in parity with each other. - */ - function hasKeyValuePair($key, $value) - { - return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value); - } -} - -if (!function_exists('hasEntry')) { /** - * Test if an array has both an key and value in parity with each other. - */ - function hasEntry($key, $value) - { - return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value); - } -} - -if (!function_exists('arrayWithSize')) { /** - * Does array size satisfy a given matcher? - * - * @param \Hamcrest\Matcher|int $size as a {@link Hamcrest\Matcher} or a value. - * - * @return \Hamcrest\Arrays\IsArrayWithSize - */ - function arrayWithSize($size) - { - return \Hamcrest\Arrays\IsArrayWithSize::arrayWithSize($size); - } -} - -if (!function_exists('emptyArray')) { /** - * Matches an empty array. - */ - function emptyArray() - { - return \Hamcrest\Arrays\IsArrayWithSize::emptyArray(); - } -} - -if (!function_exists('nonEmptyArray')) { /** - * Matches an empty array. - */ - function nonEmptyArray() - { - return \Hamcrest\Arrays\IsArrayWithSize::nonEmptyArray(); - } -} - -if (!function_exists('emptyTraversable')) { /** - * Returns true if traversable is empty. - */ - function emptyTraversable() - { - return \Hamcrest\Collection\IsEmptyTraversable::emptyTraversable(); - } -} - -if (!function_exists('nonEmptyTraversable')) { /** - * Returns true if traversable is not empty. - */ - function nonEmptyTraversable() - { - return \Hamcrest\Collection\IsEmptyTraversable::nonEmptyTraversable(); - } -} - -if (!function_exists('traversableWithSize')) { /** - * Does traversable size satisfy a given matcher? - */ - function traversableWithSize($size) - { - return \Hamcrest\Collection\IsTraversableWithSize::traversableWithSize($size); - } -} - -if (!function_exists('allOf')) { /** - * Evaluates to true only if ALL of the passed in matchers evaluate to true. - */ - function allOf(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Core\AllOf', 'allOf'), $args); - } -} - -if (!function_exists('anyOf')) { /** - * Evaluates to true if ANY of the passed in matchers evaluate to true. - */ - function anyOf(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'anyOf'), $args); - } -} - -if (!function_exists('noneOf')) { /** - * Evaluates to false if ANY of the passed in matchers evaluate to true. - */ - function noneOf(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'noneOf'), $args); - } -} - -if (!function_exists('both')) { /** - * This is useful for fluently combining matchers that must both pass. - * For example: - *
-     *   assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
-     * 
- */ - function both(\Hamcrest\Matcher $matcher) - { - return \Hamcrest\Core\CombinableMatcher::both($matcher); - } -} - -if (!function_exists('either')) { /** - * This is useful for fluently combining matchers where either may pass, - * for example: - *
-     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
-     * 
- */ - function either(\Hamcrest\Matcher $matcher) - { - return \Hamcrest\Core\CombinableMatcher::either($matcher); - } -} - -if (!function_exists('describedAs')) { /** - * Wraps an existing matcher and overrides the description when it fails. - */ - function describedAs(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args); - } -} - -if (!function_exists('everyItem')) { /** - * @param Matcher $itemMatcher - * A matcher to apply to every element in an array. - * - * @return \Hamcrest\Core\Every - * Evaluates to TRUE for a collection in which every item matches $itemMatcher - */ - function everyItem(\Hamcrest\Matcher $itemMatcher) - { - return \Hamcrest\Core\Every::everyItem($itemMatcher); - } -} - -if (!function_exists('hasToString')) { /** - * Does array size satisfy a given matcher? - */ - function hasToString($matcher) - { - return \Hamcrest\Core\HasToString::hasToString($matcher); - } -} - -if (!function_exists('is')) { /** - * Decorates another Matcher, retaining the behavior but allowing tests - * to be slightly more expressive. - * - * For example: assertThat($cheese, equalTo($smelly)) - * vs. assertThat($cheese, is(equalTo($smelly))) - */ - function is($value) - { - return \Hamcrest\Core\Is::is($value); - } -} - -if (!function_exists('anything')) { /** - * This matcher always evaluates to true. - * - * @param string $description A meaningful string used when describing itself. - * - * @return \Hamcrest\Core\IsAnything - */ - function anything($description = 'ANYTHING') - { - return \Hamcrest\Core\IsAnything::anything($description); - } -} - -if (!function_exists('hasItem')) { /** - * Test if the value is an array containing this matcher. - * - * Example: - *
-     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
-     * //Convenience defaults to equalTo()
-     * assertThat(array('a', 'b'), hasItem('b'));
-     * 
- */ - function hasItem(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args); - } -} - -if (!function_exists('hasItems')) { /** - * Test if the value is an array containing elements that match all of these - * matchers. - * - * Example: - *
-     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
-     * 
- */ - function hasItems(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args); - } -} - -if (!function_exists('equalTo')) { /** - * Is the value equal to another value, as tested by the use of the "==" - * comparison operator? - */ - function equalTo($item) - { - return \Hamcrest\Core\IsEqual::equalTo($item); - } -} - -if (!function_exists('identicalTo')) { /** - * Tests of the value is identical to $value as tested by the "===" operator. - */ - function identicalTo($value) - { - return \Hamcrest\Core\IsIdentical::identicalTo($value); - } -} - -if (!function_exists('anInstanceOf')) { /** - * Is the value an instance of a particular type? - * This version assumes no relationship between the required type and - * the signature of the method that sets it up, for example in - * assertThat($anObject, anInstanceOf('Thing')); - */ - function anInstanceOf($theClass) - { - return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); - } -} - -if (!function_exists('any')) { /** - * Is the value an instance of a particular type? - * This version assumes no relationship between the required type and - * the signature of the method that sets it up, for example in - * assertThat($anObject, anInstanceOf('Thing')); - */ - function any($theClass) - { - return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); - } -} - -if (!function_exists('not')) { /** - * Matches if value does not match $value. - */ - function not($value) - { - return \Hamcrest\Core\IsNot::not($value); - } -} - -if (!function_exists('nullValue')) { /** - * Matches if value is null. - */ - function nullValue() - { - return \Hamcrest\Core\IsNull::nullValue(); - } -} - -if (!function_exists('notNullValue')) { /** - * Matches if value is not null. - */ - function notNullValue() - { - return \Hamcrest\Core\IsNull::notNullValue(); - } -} - -if (!function_exists('sameInstance')) { /** - * Creates a new instance of IsSame. - * - * @param mixed $object - * The predicate evaluates to true only when the argument is - * this object. - * - * @return \Hamcrest\Core\IsSame - */ - function sameInstance($object) - { - return \Hamcrest\Core\IsSame::sameInstance($object); - } -} - -if (!function_exists('typeOf')) { /** - * Is the value a particular built-in type? - */ - function typeOf($theType) - { - return \Hamcrest\Core\IsTypeOf::typeOf($theType); - } -} - -if (!function_exists('set')) { /** - * Matches if value (class, object, or array) has named $property. - */ - function set($property) - { - return \Hamcrest\Core\Set::set($property); - } -} - -if (!function_exists('notSet')) { /** - * Matches if value (class, object, or array) does not have named $property. - */ - function notSet($property) - { - return \Hamcrest\Core\Set::notSet($property); - } -} - -if (!function_exists('closeTo')) { /** - * Matches if value is a number equal to $value within some range of - * acceptable error $delta. - */ - function closeTo($value, $delta) - { - return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta); - } -} - -if (!function_exists('comparesEqualTo')) { /** - * The value is not > $value, nor < $value. - */ - function comparesEqualTo($value) - { - return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value); - } -} - -if (!function_exists('greaterThan')) { /** - * The value is > $value. - */ - function greaterThan($value) - { - return \Hamcrest\Number\OrderingComparison::greaterThan($value); - } -} - -if (!function_exists('greaterThanOrEqualTo')) { /** - * The value is >= $value. - */ - function greaterThanOrEqualTo($value) - { - return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); - } -} - -if (!function_exists('atLeast')) { /** - * The value is >= $value. - */ - function atLeast($value) - { - return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); - } -} - -if (!function_exists('lessThan')) { /** - * The value is < $value. - */ - function lessThan($value) - { - return \Hamcrest\Number\OrderingComparison::lessThan($value); - } -} - -if (!function_exists('lessThanOrEqualTo')) { /** - * The value is <= $value. - */ - function lessThanOrEqualTo($value) - { - return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); - } -} - -if (!function_exists('atMost')) { /** - * The value is <= $value. - */ - function atMost($value) - { - return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); - } -} - -if (!function_exists('isEmptyString')) { /** - * Matches if value is a zero-length string. - */ - function isEmptyString() - { - return \Hamcrest\Text\IsEmptyString::isEmptyString(); - } -} - -if (!function_exists('emptyString')) { /** - * Matches if value is a zero-length string. - */ - function emptyString() - { - return \Hamcrest\Text\IsEmptyString::isEmptyString(); - } -} - -if (!function_exists('isEmptyOrNullString')) { /** - * Matches if value is null or a zero-length string. - */ - function isEmptyOrNullString() - { - return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); - } -} - -if (!function_exists('nullOrEmptyString')) { /** - * Matches if value is null or a zero-length string. - */ - function nullOrEmptyString() - { - return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); - } -} - -if (!function_exists('isNonEmptyString')) { /** - * Matches if value is a non-zero-length string. - */ - function isNonEmptyString() - { - return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); - } -} - -if (!function_exists('nonEmptyString')) { /** - * Matches if value is a non-zero-length string. - */ - function nonEmptyString() - { - return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); - } -} - -if (!function_exists('equalToIgnoringCase')) { /** - * Matches if value is a string equal to $string, regardless of the case. - */ - function equalToIgnoringCase($string) - { - return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string); - } -} - -if (!function_exists('equalToIgnoringWhiteSpace')) { /** - * Matches if value is a string equal to $string, regardless of whitespace. - */ - function equalToIgnoringWhiteSpace($string) - { - return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string); - } -} - -if (!function_exists('matchesPattern')) { /** - * Matches if value is a string that matches regular expression $pattern. - */ - function matchesPattern($pattern) - { - return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern); - } -} - -if (!function_exists('containsString')) { /** - * Matches if value is a string that contains $substring. - */ - function containsString($substring) - { - return \Hamcrest\Text\StringContains::containsString($substring); - } -} - -if (!function_exists('containsStringIgnoringCase')) { /** - * Matches if value is a string that contains $substring regardless of the case. - */ - function containsStringIgnoringCase($substring) - { - return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring); - } -} - -if (!function_exists('stringContainsInOrder')) { /** - * Matches if value contains $substrings in a constrained order. - */ - function stringContainsInOrder(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args); - } -} - -if (!function_exists('endsWith')) { /** - * Matches if value is a string that ends with $substring. - */ - function endsWith($substring) - { - return \Hamcrest\Text\StringEndsWith::endsWith($substring); - } -} - -if (!function_exists('startsWith')) { /** - * Matches if value is a string that starts with $substring. - */ - function startsWith($substring) - { - return \Hamcrest\Text\StringStartsWith::startsWith($substring); - } -} - -if (!function_exists('arrayValue')) { /** - * Is the value an array? - */ - function arrayValue() - { - return \Hamcrest\Type\IsArray::arrayValue(); - } -} - -if (!function_exists('booleanValue')) { /** - * Is the value a boolean? - */ - function booleanValue() - { - return \Hamcrest\Type\IsBoolean::booleanValue(); - } -} - -if (!function_exists('boolValue')) { /** - * Is the value a boolean? - */ - function boolValue() - { - return \Hamcrest\Type\IsBoolean::booleanValue(); - } -} - -if (!function_exists('callableValue')) { /** - * Is the value callable? - */ - function callableValue() - { - return \Hamcrest\Type\IsCallable::callableValue(); - } -} - -if (!function_exists('doubleValue')) { /** - * Is the value a float/double? - */ - function doubleValue() - { - return \Hamcrest\Type\IsDouble::doubleValue(); - } -} - -if (!function_exists('floatValue')) { /** - * Is the value a float/double? - */ - function floatValue() - { - return \Hamcrest\Type\IsDouble::doubleValue(); - } -} - -if (!function_exists('integerValue')) { /** - * Is the value an integer? - */ - function integerValue() - { - return \Hamcrest\Type\IsInteger::integerValue(); - } -} - -if (!function_exists('intValue')) { /** - * Is the value an integer? - */ - function intValue() - { - return \Hamcrest\Type\IsInteger::integerValue(); - } -} - -if (!function_exists('numericValue')) { /** - * Is the value a numeric? - */ - function numericValue() - { - return \Hamcrest\Type\IsNumeric::numericValue(); - } -} - -if (!function_exists('objectValue')) { /** - * Is the value an object? - */ - function objectValue() - { - return \Hamcrest\Type\IsObject::objectValue(); - } -} - -if (!function_exists('anObject')) { /** - * Is the value an object? - */ - function anObject() - { - return \Hamcrest\Type\IsObject::objectValue(); - } -} - -if (!function_exists('resourceValue')) { /** - * Is the value a resource? - */ - function resourceValue() - { - return \Hamcrest\Type\IsResource::resourceValue(); - } -} - -if (!function_exists('scalarValue')) { /** - * Is the value a scalar (boolean, integer, double, or string)? - */ - function scalarValue() - { - return \Hamcrest\Type\IsScalar::scalarValue(); - } -} - -if (!function_exists('stringValue')) { /** - * Is the value a string? - */ - function stringValue() - { - return \Hamcrest\Type\IsString::stringValue(); - } -} - -if (!function_exists('hasXPath')) { /** - * Wraps $matcher with {@link Hamcrest\Core\IsEqual) - * if it's not a matcher and the XPath in count() - * if it's an integer. - */ - function hasXPath($xpath, $matcher = null) - { - return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php deleted file mode 100644 index 9ea5697..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php +++ /dev/null @@ -1,118 +0,0 @@ -_elementMatchers = $elementMatchers; - } - - protected function matchesSafely($array) - { - if (array_keys($array) != array_keys($this->_elementMatchers)) { - return false; - } - - /** @var $matcher \Hamcrest\Matcher */ - foreach ($this->_elementMatchers as $k => $matcher) { - if (!$matcher->matches($array[$k])) { - return false; - } - } - - return true; - } - - protected function describeMismatchSafely($actual, Description $mismatchDescription) - { - if (count($actual) != count($this->_elementMatchers)) { - $mismatchDescription->appendText('array length was ' . count($actual)); - - return; - } elseif (array_keys($actual) != array_keys($this->_elementMatchers)) { - $mismatchDescription->appendText('array keys were ') - ->appendValueList( - $this->descriptionStart(), - $this->descriptionSeparator(), - $this->descriptionEnd(), - array_keys($actual) - ) - ; - - return; - } - - /** @var $matcher \Hamcrest\Matcher */ - foreach ($this->_elementMatchers as $k => $matcher) { - if (!$matcher->matches($actual[$k])) { - $mismatchDescription->appendText('element ')->appendValue($k) - ->appendText(' was ')->appendValue($actual[$k]); - - return; - } - } - } - - public function describeTo(Description $description) - { - $description->appendList( - $this->descriptionStart(), - $this->descriptionSeparator(), - $this->descriptionEnd(), - $this->_elementMatchers - ); - } - - /** - * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i]. - * - * @factory ... - */ - public static function anArray(/* args... */) - { - $args = func_get_args(); - - return new self(Util::createMatcherArray($args)); - } - - // -- Protected Methods - - protected function descriptionStart() - { - return '['; - } - - protected function descriptionSeparator() - { - return ', '; - } - - protected function descriptionEnd() - { - return ']'; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php deleted file mode 100644 index 0e4a1ed..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php +++ /dev/null @@ -1,63 +0,0 @@ -_elementMatcher = $elementMatcher; - } - - protected function matchesSafely($array) - { - foreach ($array as $element) { - if ($this->_elementMatcher->matches($element)) { - return true; - } - } - - return false; - } - - protected function describeMismatchSafely($array, Description $mismatchDescription) - { - $mismatchDescription->appendText('was ')->appendValue($array); - } - - public function describeTo(Description $description) - { - $description - ->appendText('an array containing ') - ->appendDescriptionOf($this->_elementMatcher) - ; - } - - /** - * Evaluates to true if any item in an array satisfies the given matcher. - * - * @param mixed $item as a {@link Hamcrest\Matcher} or a value. - * - * @return \Hamcrest\Arrays\IsArrayContaining - * @factory hasValue - */ - public static function hasItemInArray($item) - { - return new self(Util::wrapValueWithIsEqual($item)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php deleted file mode 100644 index 9009026..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php +++ /dev/null @@ -1,59 +0,0 @@ -_elementMatchers = $elementMatchers; - } - - protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription) - { - $matching = new MatchingOnce($this->_elementMatchers, $mismatchDescription); - - foreach ($array as $element) { - if (!$matching->matches($element)) { - return false; - } - } - - return $matching->isFinished($array); - } - - public function describeTo(Description $description) - { - $description->appendList('[', ', ', ']', $this->_elementMatchers) - ->appendText(' in any order') - ; - } - - /** - * An array with elements that match the given matchers. - * - * @factory containsInAnyOrder ... - */ - public static function arrayContainingInAnyOrder(/* args... */) - { - $args = func_get_args(); - - return new self(Util::createMatcherArray($args)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php deleted file mode 100644 index 6115740..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php +++ /dev/null @@ -1,57 +0,0 @@ -_elementMatchers = $elementMatchers; - } - - protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription) - { - $series = new SeriesMatchingOnce($this->_elementMatchers, $mismatchDescription); - - foreach ($array as $element) { - if (!$series->matches($element)) { - return false; - } - } - - return $series->isFinished(); - } - - public function describeTo(Description $description) - { - $description->appendList('[', ', ', ']', $this->_elementMatchers); - } - - /** - * An array with elements that match the given matchers in the same order. - * - * @factory contains ... - */ - public static function arrayContaining(/* args... */) - { - $args = func_get_args(); - - return new self(Util::createMatcherArray($args)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php deleted file mode 100644 index 523477e..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php +++ /dev/null @@ -1,75 +0,0 @@ -_keyMatcher = $keyMatcher; - } - - protected function matchesSafely($array) - { - foreach ($array as $key => $element) { - if ($this->_keyMatcher->matches($key)) { - return true; - } - } - - return false; - } - - protected function describeMismatchSafely($array, Description $mismatchDescription) - { - //Not using appendValueList() so that keys can be shown - $mismatchDescription->appendText('array was ') - ->appendText('[') - ; - $loop = false; - foreach ($array as $key => $value) { - if ($loop) { - $mismatchDescription->appendText(', '); - } - $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value); - $loop = true; - } - $mismatchDescription->appendText(']'); - } - - public function describeTo(Description $description) - { - $description - ->appendText('array with key ') - ->appendDescriptionOf($this->_keyMatcher) - ; - } - - /** - * Evaluates to true if any key in an array matches the given matcher. - * - * @param mixed $key as a {@link Hamcrest\Matcher} or a value. - * - * @return \Hamcrest\Arrays\IsArrayContainingKey - * @factory hasKey - */ - public static function hasKeyInArray($key) - { - return new self(Util::wrapValueWithIsEqual($key)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php deleted file mode 100644 index 9ac3eba..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php +++ /dev/null @@ -1,80 +0,0 @@ -_keyMatcher = $keyMatcher; - $this->_valueMatcher = $valueMatcher; - } - - protected function matchesSafely($array) - { - foreach ($array as $key => $value) { - if ($this->_keyMatcher->matches($key) && $this->_valueMatcher->matches($value)) { - return true; - } - } - - return false; - } - - protected function describeMismatchSafely($array, Description $mismatchDescription) - { - //Not using appendValueList() so that keys can be shown - $mismatchDescription->appendText('array was ') - ->appendText('[') - ; - $loop = false; - foreach ($array as $key => $value) { - if ($loop) { - $mismatchDescription->appendText(', '); - } - $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value); - $loop = true; - } - $mismatchDescription->appendText(']'); - } - - public function describeTo(Description $description) - { - $description->appendText('array containing [') - ->appendDescriptionOf($this->_keyMatcher) - ->appendText(' => ') - ->appendDescriptionOf($this->_valueMatcher) - ->appendText(']') - ; - } - - /** - * Test if an array has both an key and value in parity with each other. - * - * @factory hasEntry - */ - public static function hasKeyValuePair($key, $value) - { - return new self( - Util::wrapValueWithIsEqual($key), - Util::wrapValueWithIsEqual($value) - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php deleted file mode 100644 index 074375c..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php +++ /dev/null @@ -1,73 +0,0 @@ -_elementMatchers = $elementMatchers; - $this->_mismatchDescription = $mismatchDescription; - } - - public function matches($item) - { - return $this->_isNotSurplus($item) && $this->_isMatched($item); - } - - public function isFinished($items) - { - if (empty($this->_elementMatchers)) { - return true; - } - - $this->_mismatchDescription - ->appendText('No item matches: ')->appendList('', ', ', '', $this->_elementMatchers) - ->appendText(' in ')->appendValueList('[', ', ', ']', $items) - ; - - return false; - } - - // -- Private Methods - - private function _isNotSurplus($item) - { - if (empty($this->_elementMatchers)) { - $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); - - return false; - } - - return true; - } - - private function _isMatched($item) - { - /** @var $matcher \Hamcrest\Matcher */ - foreach ($this->_elementMatchers as $i => $matcher) { - if ($matcher->matches($item)) { - unset($this->_elementMatchers[$i]); - - return true; - } - } - - $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); - - return false; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php deleted file mode 100644 index 12a912d..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php +++ /dev/null @@ -1,75 +0,0 @@ -_elementMatchers = $elementMatchers; - $this->_keys = array_keys($elementMatchers); - $this->_mismatchDescription = $mismatchDescription; - } - - public function matches($item) - { - return $this->_isNotSurplus($item) && $this->_isMatched($item); - } - - public function isFinished() - { - if (!empty($this->_elementMatchers)) { - $nextMatcher = current($this->_elementMatchers); - $this->_mismatchDescription->appendText('No item matched: ')->appendDescriptionOf($nextMatcher); - - return false; - } - - return true; - } - - // -- Private Methods - - private function _isNotSurplus($item) - { - if (empty($this->_elementMatchers)) { - $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); - - return false; - } - - return true; - } - - private function _isMatched($item) - { - $this->_nextMatchKey = array_shift($this->_keys); - $nextMatcher = array_shift($this->_elementMatchers); - - if (!$nextMatcher->matches($item)) { - $this->_describeMismatch($nextMatcher, $item); - - return false; - } - - return true; - } - - private function _describeMismatch(Matcher $matcher, $item) - { - $this->_mismatchDescription->appendText('item with key ' . $this->_nextMatchKey . ': '); - $matcher->describeMismatch($item, $this->_mismatchDescription); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php deleted file mode 100644 index 3a2a0e7..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php +++ /dev/null @@ -1,10 +0,0 @@ -append($text); - - return $this; - } - - public function appendDescriptionOf(SelfDescribing $value) - { - $value->describeTo($this); - - return $this; - } - - public function appendValue($value) - { - if (is_null($value)) { - $this->append('null'); - } elseif (is_string($value)) { - $this->_toPhpSyntax($value); - } elseif (is_float($value)) { - $this->append('<'); - $this->append($value); - $this->append('F>'); - } elseif (is_bool($value)) { - $this->append('<'); - $this->append($value ? 'true' : 'false'); - $this->append('>'); - } elseif (is_array($value) || $value instanceof \Iterator || $value instanceof \IteratorAggregate) { - $this->appendValueList('[', ', ', ']', $value); - } elseif (is_object($value) && !method_exists($value, '__toString')) { - $this->append('<'); - $this->append(get_class($value)); - $this->append('>'); - } else { - $this->append('<'); - $this->append($value); - $this->append('>'); - } - - return $this; - } - - public function appendValueList($start, $separator, $end, $values) - { - $list = array(); - foreach ($values as $v) { - $list[] = new SelfDescribingValue($v); - } - - $this->appendList($start, $separator, $end, $list); - - return $this; - } - - public function appendList($start, $separator, $end, $values) - { - $this->append($start); - - $separate = false; - - foreach ($values as $value) { - /*if (!($value instanceof Hamcrest\SelfDescribing)) { - $value = new Hamcrest\Internal\SelfDescribingValue($value); - }*/ - - if ($separate) { - $this->append($separator); - } - - $this->appendDescriptionOf($value); - - $separate = true; - } - - $this->append($end); - - return $this; - } - - // -- Protected Methods - - /** - * Append the String $str to the description. - */ - abstract protected function append($str); - - // -- Private Methods - - private function _toPhpSyntax($value) - { - $str = '"'; - for ($i = 0, $len = strlen($value); $i < $len; ++$i) { - switch ($value[$i]) { - case '"': - $str .= '\\"'; - break; - - case "\t": - $str .= '\\t'; - break; - - case "\r": - $str .= '\\r'; - break; - - case "\n": - $str .= '\\n'; - break; - - default: - $str .= $value[$i]; - } - } - $str .= '"'; - $this->append($str); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php deleted file mode 100644 index 286db3e..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php +++ /dev/null @@ -1,25 +0,0 @@ -appendText('was ')->appendValue($item); - } - - public function __toString() - { - return StringDescription::toString($this); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php deleted file mode 100644 index 8ab58ea..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php +++ /dev/null @@ -1,71 +0,0 @@ -_empty = $empty; - } - - public function matches($item) - { - if (!$item instanceof \Traversable) { - return false; - } - - foreach ($item as $value) { - return !$this->_empty; - } - - return $this->_empty; - } - - public function describeTo(Description $description) - { - $description->appendText($this->_empty ? 'an empty traversable' : 'a non-empty traversable'); - } - - /** - * Returns true if traversable is empty. - * - * @factory - */ - public static function emptyTraversable() - { - if (!self::$_INSTANCE) { - self::$_INSTANCE = new self; - } - - return self::$_INSTANCE; - } - - /** - * Returns true if traversable is not empty. - * - * @factory - */ - public static function nonEmptyTraversable() - { - if (!self::$_NOT_INSTANCE) { - self::$_NOT_INSTANCE = new self(false); - } - - return self::$_NOT_INSTANCE; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php deleted file mode 100644 index c95edc5..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php +++ /dev/null @@ -1,47 +0,0 @@ -false. - */ -class AllOf extends DiagnosingMatcher -{ - - private $_matchers; - - public function __construct(array $matchers) - { - Util::checkAllAreMatchers($matchers); - - $this->_matchers = $matchers; - } - - public function matchesWithDiagnosticDescription($item, Description $mismatchDescription) - { - /** @var $matcher \Hamcrest\Matcher */ - foreach ($this->_matchers as $matcher) { - if (!$matcher->matches($item)) { - $mismatchDescription->appendDescriptionOf($matcher)->appendText(' '); - $matcher->describeMismatch($item, $mismatchDescription); - - return false; - } - } - - return true; - } - - public function describeTo(Description $description) - { - $description->appendList('(', ' and ', ')', $this->_matchers); - } - - /** - * Evaluates to true only if ALL of the passed in matchers evaluate to true. - * - * @factory ... - */ - public static function allOf(/* args... */) - { - $args = func_get_args(); - - return new self(Util::createMatcherArray($args)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php deleted file mode 100644 index 4504279..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php +++ /dev/null @@ -1,58 +0,0 @@ -true. - */ -class AnyOf extends ShortcutCombination -{ - - public function __construct(array $matchers) - { - parent::__construct($matchers); - } - - public function matches($item) - { - return $this->matchesWithShortcut($item, true); - } - - public function describeTo(Description $description) - { - $this->describeToWithOperator($description, 'or'); - } - - /** - * Evaluates to true if ANY of the passed in matchers evaluate to true. - * - * @factory ... - */ - public static function anyOf(/* args... */) - { - $args = func_get_args(); - - return new self(Util::createMatcherArray($args)); - } - - /** - * Evaluates to false if ANY of the passed in matchers evaluate to true. - * - * @factory ... - */ - public static function noneOf(/* args... */) - { - $args = func_get_args(); - - return IsNot::not( - new self(Util::createMatcherArray($args)) - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php deleted file mode 100644 index e3b4aa7..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php +++ /dev/null @@ -1,78 +0,0 @@ -_matcher = $matcher; - } - - public function matches($item) - { - return $this->_matcher->matches($item); - } - - public function describeTo(Description $description) - { - $description->appendDescriptionOf($this->_matcher); - } - - /** Diversion from Hamcrest-Java... Logical "and" not permitted */ - public function andAlso(Matcher $other) - { - return new self(new AllOf($this->_templatedListWith($other))); - } - - /** Diversion from Hamcrest-Java... Logical "or" not permitted */ - public function orElse(Matcher $other) - { - return new self(new AnyOf($this->_templatedListWith($other))); - } - - /** - * This is useful for fluently combining matchers that must both pass. - * For example: - *
-     *   assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
-     * 
- * - * @factory - */ - public static function both(Matcher $matcher) - { - return new self($matcher); - } - - /** - * This is useful for fluently combining matchers where either may pass, - * for example: - *
-     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
-     * 
- * - * @factory - */ - public static function either(Matcher $matcher) - { - return new self($matcher); - } - - // -- Private Methods - - private function _templatedListWith(Matcher $other) - { - return array($this->_matcher, $other); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php deleted file mode 100644 index 5b2583f..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php +++ /dev/null @@ -1,68 +0,0 @@ -_descriptionTemplate = $descriptionTemplate; - $this->_matcher = $matcher; - $this->_values = $values; - } - - public function matches($item) - { - return $this->_matcher->matches($item); - } - - public function describeTo(Description $description) - { - $textStart = 0; - while (preg_match(self::ARG_PATTERN, $this->_descriptionTemplate, $matches, PREG_OFFSET_CAPTURE, $textStart)) { - $text = $matches[0][0]; - $index = $matches[1][0]; - $offset = $matches[0][1]; - - $description->appendText(substr($this->_descriptionTemplate, $textStart, $offset - $textStart)); - $description->appendValue($this->_values[$index]); - - $textStart = $offset + strlen($text); - } - - if ($textStart < strlen($this->_descriptionTemplate)) { - $description->appendText(substr($this->_descriptionTemplate, $textStart)); - } - } - - /** - * Wraps an existing matcher and overrides the description when it fails. - * - * @factory ... - */ - public static function describedAs(/* $description, Hamcrest\Matcher $matcher, $values... */) - { - $args = func_get_args(); - $description = array_shift($args); - $matcher = array_shift($args); - $values = $args; - - return new self($description, $matcher, $values); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php deleted file mode 100644 index d686f8d..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php +++ /dev/null @@ -1,56 +0,0 @@ -_matcher = $matcher; - } - - protected function matchesSafelyWithDiagnosticDescription($items, Description $mismatchDescription) - { - foreach ($items as $item) { - if (!$this->_matcher->matches($item)) { - $mismatchDescription->appendText('an item '); - $this->_matcher->describeMismatch($item, $mismatchDescription); - - return false; - } - } - - return true; - } - - public function describeTo(Description $description) - { - $description->appendText('every item is ')->appendDescriptionOf($this->_matcher); - } - - /** - * @param Matcher $itemMatcher - * A matcher to apply to every element in an array. - * - * @return \Hamcrest\Core\Every - * Evaluates to TRUE for a collection in which every item matches $itemMatcher - * - * @factory - */ - public static function everyItem(Matcher $itemMatcher) - { - return new self($itemMatcher); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php deleted file mode 100644 index 45bd910..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php +++ /dev/null @@ -1,56 +0,0 @@ -toString(); - } - - return (string) $actual; - } - - /** - * Does array size satisfy a given matcher? - * - * @factory - */ - public static function hasToString($matcher) - { - return new self(Util::wrapValueWithIsEqual($matcher)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php deleted file mode 100644 index 41266dc..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php +++ /dev/null @@ -1,57 +0,0 @@ -_matcher = $matcher; - } - - public function matches($arg) - { - return $this->_matcher->matches($arg); - } - - public function describeTo(Description $description) - { - $description->appendText('is ')->appendDescriptionOf($this->_matcher); - } - - public function describeMismatch($item, Description $mismatchDescription) - { - $this->_matcher->describeMismatch($item, $mismatchDescription); - } - - /** - * Decorates another Matcher, retaining the behavior but allowing tests - * to be slightly more expressive. - * - * For example: assertThat($cheese, equalTo($smelly)) - * vs. assertThat($cheese, is(equalTo($smelly))) - * - * @factory - */ - public static function is($value) - { - return new self(Util::wrapValueWithIsEqual($value)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php deleted file mode 100644 index f20e6c0..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php +++ /dev/null @@ -1,45 +0,0 @@ -true. - */ -class IsAnything extends BaseMatcher -{ - - private $_message; - - public function __construct($message = 'ANYTHING') - { - $this->_message = $message; - } - - public function matches($item) - { - return true; - } - - public function describeTo(Description $description) - { - $description->appendText($this->_message); - } - - /** - * This matcher always evaluates to true. - * - * @param string $description A meaningful string used when describing itself. - * - * @return \Hamcrest\Core\IsAnything - * @factory - */ - public static function anything($description = 'ANYTHING') - { - return new self($description); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php deleted file mode 100644 index 5e60426..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php +++ /dev/null @@ -1,93 +0,0 @@ -_elementMatcher = $elementMatcher; - } - - protected function matchesSafely($items) - { - foreach ($items as $item) { - if ($this->_elementMatcher->matches($item)) { - return true; - } - } - - return false; - } - - protected function describeMismatchSafely($items, Description $mismatchDescription) - { - $mismatchDescription->appendText('was ')->appendValue($items); - } - - public function describeTo(Description $description) - { - $description - ->appendText('a collection containing ') - ->appendDescriptionOf($this->_elementMatcher) - ; - } - - /** - * Test if the value is an array containing this matcher. - * - * Example: - *
-     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
-     * //Convenience defaults to equalTo()
-     * assertThat(array('a', 'b'), hasItem('b'));
-     * 
- * - * @factory ... - */ - public static function hasItem() - { - $args = func_get_args(); - $firstArg = array_shift($args); - - return new self(Util::wrapValueWithIsEqual($firstArg)); - } - - /** - * Test if the value is an array containing elements that match all of these - * matchers. - * - * Example: - *
-     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
-     * 
- * - * @factory ... - */ - public static function hasItems(/* args... */) - { - $args = func_get_args(); - $matchers = array(); - - foreach ($args as $arg) { - $matchers[] = self::hasItem($arg); - } - - return AllOf::allOf($matchers); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php deleted file mode 100644 index 523fba0..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php +++ /dev/null @@ -1,44 +0,0 @@ -_item = $item; - } - - public function matches($arg) - { - return (($arg == $this->_item) && ($this->_item == $arg)); - } - - public function describeTo(Description $description) - { - $description->appendValue($this->_item); - } - - /** - * Is the value equal to another value, as tested by the use of the "==" - * comparison operator? - * - * @factory - */ - public static function equalTo($item) - { - return new self($item); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php deleted file mode 100644 index 28f7b36..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php +++ /dev/null @@ -1,38 +0,0 @@ -_value = $value; - } - - public function describeTo(Description $description) - { - $description->appendValue($this->_value); - } - - /** - * Tests of the value is identical to $value as tested by the "===" operator. - * - * @factory - */ - public static function identicalTo($value) - { - return new self($value); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php deleted file mode 100644 index 7a5c92a..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php +++ /dev/null @@ -1,67 +0,0 @@ -_theClass = $theClass; - } - - protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription) - { - if (!is_object($item)) { - $mismatchDescription->appendText('was ')->appendValue($item); - - return false; - } - - if (!($item instanceof $this->_theClass)) { - $mismatchDescription->appendText('[' . get_class($item) . '] ') - ->appendValue($item); - - return false; - } - - return true; - } - - public function describeTo(Description $description) - { - $description->appendText('an instance of ') - ->appendText($this->_theClass) - ; - } - - /** - * Is the value an instance of a particular type? - * This version assumes no relationship between the required type and - * the signature of the method that sets it up, for example in - * assertThat($anObject, anInstanceOf('Thing')); - * - * @factory any - */ - public static function anInstanceOf($theClass) - { - return new self($theClass); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php deleted file mode 100644 index 167f0d0..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php +++ /dev/null @@ -1,44 +0,0 @@ -_matcher = $matcher; - } - - public function matches($arg) - { - return !$this->_matcher->matches($arg); - } - - public function describeTo(Description $description) - { - $description->appendText('not ')->appendDescriptionOf($this->_matcher); - } - - /** - * Matches if value does not match $value. - * - * @factory - */ - public static function not($value) - { - return new self(Util::wrapValueWithIsEqual($value)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php deleted file mode 100644 index 91a454c..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php +++ /dev/null @@ -1,56 +0,0 @@ -appendText('null'); - } - - /** - * Matches if value is null. - * - * @factory - */ - public static function nullValue() - { - if (!self::$_INSTANCE) { - self::$_INSTANCE = new self(); - } - - return self::$_INSTANCE; - } - - /** - * Matches if value is not null. - * - * @factory - */ - public static function notNullValue() - { - if (!self::$_NOT_INSTANCE) { - self::$_NOT_INSTANCE = IsNot::not(self::nullValue()); - } - - return self::$_NOT_INSTANCE; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php deleted file mode 100644 index 8107870..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php +++ /dev/null @@ -1,51 +0,0 @@ -_object = $object; - } - - public function matches($object) - { - return ($object === $this->_object) && ($this->_object === $object); - } - - public function describeTo(Description $description) - { - $description->appendText('sameInstance(') - ->appendValue($this->_object) - ->appendText(')') - ; - } - - /** - * Creates a new instance of IsSame. - * - * @param mixed $object - * The predicate evaluates to true only when the argument is - * this object. - * - * @return \Hamcrest\Core\IsSame - * @factory - */ - public static function sameInstance($object) - { - return new self($object); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php deleted file mode 100644 index d24f0f9..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php +++ /dev/null @@ -1,71 +0,0 @@ -_theType = strtolower($theType); - } - - public function matches($item) - { - return strtolower(gettype($item)) == $this->_theType; - } - - public function describeTo(Description $description) - { - $description->appendText(self::getTypeDescription($this->_theType)); - } - - public function describeMismatch($item, Description $description) - { - if ($item === null) { - $description->appendText('was null'); - } else { - $description->appendText('was ') - ->appendText(self::getTypeDescription(strtolower(gettype($item)))) - ->appendText(' ') - ->appendValue($item) - ; - } - } - - public static function getTypeDescription($type) - { - if ($type == 'null') { - return 'null'; - } - - return (strpos('aeiou', substr($type, 0, 1)) === false ? 'a ' : 'an ') - . $type; - } - - /** - * Is the value a particular built-in type? - * - * @factory - */ - public static function typeOf($theType) - { - return new self($theType); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php deleted file mode 100644 index cdc45d5..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php +++ /dev/null @@ -1,95 +0,0 @@ - - * assertThat(array('a', 'b'), set('b')); - * assertThat($foo, set('bar')); - * assertThat('Server', notSet('defaultPort')); - * - * - * @todo Replace $property with a matcher and iterate all property names. - */ -class Set extends BaseMatcher -{ - - private $_property; - private $_not; - - public function __construct($property, $not = false) - { - $this->_property = $property; - $this->_not = $not; - } - - public function matches($item) - { - if ($item === null) { - return false; - } - $property = $this->_property; - if (is_array($item)) { - $result = isset($item[$property]); - } elseif (is_object($item)) { - $result = isset($item->$property); - } elseif (is_string($item)) { - $result = isset($item::$$property); - } else { - throw new \InvalidArgumentException('Must pass an object, array, or class name'); - } - - return $this->_not ? !$result : $result; - } - - public function describeTo(Description $description) - { - $description->appendText($this->_not ? 'unset property ' : 'set property ')->appendText($this->_property); - } - - public function describeMismatch($item, Description $description) - { - $value = ''; - if (!$this->_not) { - $description->appendText('was not set'); - } else { - $property = $this->_property; - if (is_array($item)) { - $value = $item[$property]; - } elseif (is_object($item)) { - $value = $item->$property; - } elseif (is_string($item)) { - $value = $item::$$property; - } - parent::describeMismatch($value, $description); - } - } - - /** - * Matches if value (class, object, or array) has named $property. - * - * @factory - */ - public static function set($property) - { - return new self($property); - } - - /** - * Matches if value (class, object, or array) does not have named $property. - * - * @factory - */ - public static function notSet($property) - { - return new self($property, true); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php deleted file mode 100644 index d93db74..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ - private $_matchers; - - public function __construct(array $matchers) - { - Util::checkAllAreMatchers($matchers); - - $this->_matchers = $matchers; - } - - protected function matchesWithShortcut($item, $shortcut) - { - /** @var $matcher \Hamcrest\Matcher */ - foreach ($this->_matchers as $matcher) { - if ($matcher->matches($item) == $shortcut) { - return $shortcut; - } - } - - return !$shortcut; - } - - public function describeToWithOperator(Description $description, $operator) - { - $description->appendList('(', ' ' . $operator . ' ', ')', $this->_matchers); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php deleted file mode 100644 index 9a482db..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php +++ /dev/null @@ -1,70 +0,0 @@ -matchesWithDiagnosticDescription($item, new NullDescription()); - } - - public function describeMismatch($item, Description $mismatchDescription) - { - $this->matchesWithDiagnosticDescription($item, $mismatchDescription); - } - - abstract protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription); -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php deleted file mode 100644 index 59f6cc7..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php +++ /dev/null @@ -1,67 +0,0 @@ -featureValueOf() in a subclass to pull out the feature to be - * matched against. - */ -abstract class FeatureMatcher extends TypeSafeDiagnosingMatcher -{ - - private $_subMatcher; - private $_featureDescription; - private $_featureName; - - /** - * Constructor. - * - * @param string $type - * @param string $subtype - * @param \Hamcrest\Matcher $subMatcher The matcher to apply to the feature - * @param string $featureDescription Descriptive text to use in describeTo - * @param string $featureName Identifying text for mismatch message - */ - public function __construct($type, $subtype, Matcher $subMatcher, $featureDescription, $featureName) - { - parent::__construct($type, $subtype); - - $this->_subMatcher = $subMatcher; - $this->_featureDescription = $featureDescription; - $this->_featureName = $featureName; - } - - /** - * Implement this to extract the interesting feature. - * - * @param mixed $actual the target object - * - * @return mixed the feature to be matched - */ - abstract protected function featureValueOf($actual); - - public function matchesSafelyWithDiagnosticDescription($actual, Description $mismatchDescription) - { - $featureValue = $this->featureValueOf($actual); - - if (!$this->_subMatcher->matches($featureValue)) { - $mismatchDescription->appendText($this->_featureName) - ->appendText(' was ')->appendValue($featureValue); - - return false; - } - - return true; - } - - final public function describeTo(Description $description) - { - $description->appendText($this->_featureDescription)->appendText(' ') - ->appendDescriptionOf($this->_subMatcher) - ; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php deleted file mode 100644 index 995da71..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php +++ /dev/null @@ -1,27 +0,0 @@ -_value = $value; - } - - public function describeTo(Description $description) - { - $description->appendValue($this->_value); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php deleted file mode 100644 index e5dcf09..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php +++ /dev/null @@ -1,50 +0,0 @@ - - * Matcher implementations should NOT directly implement this interface. - * Instead, extend the {@link Hamcrest\BaseMatcher} abstract class, - * which will ensure that the Matcher API can grow to support - * new features and remain compatible with all Matcher implementations. - *

- * For easy access to common Matcher implementations, use the static factory - * methods in {@link Hamcrest\CoreMatchers}. - * - * @see Hamcrest\CoreMatchers - * @see Hamcrest\BaseMatcher - */ -interface Matcher extends SelfDescribing -{ - - /** - * Evaluates the matcher for argument $item. - * - * @param mixed $item the object against which the matcher is evaluated. - * - * @return boolean true if $item matches, - * otherwise false. - * - * @see Hamcrest\BaseMatcher - */ - public function matches($item); - - /** - * Generate a description of why the matcher has not accepted the item. - * The description will be part of a larger description of why a matching - * failed, so it should be concise. - * This method assumes that matches($item) is false, but - * will not check this. - * - * @param mixed $item The item that the Matcher has rejected. - * @param Description $description - * @return - */ - public function describeMismatch($item, Description $description); -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php deleted file mode 100644 index d546dbe..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php +++ /dev/null @@ -1,118 +0,0 @@ - - * // With an identifier - * assertThat("apple flavour", $apple->flavour(), equalTo("tasty")); - * // Without an identifier - * assertThat($apple->flavour(), equalTo("tasty")); - * // Evaluating a boolean expression - * assertThat("some error", $a > $b); - * assertThat($a > $b); - * - */ - public static function assertThat(/* $args ... */) - { - $args = func_get_args(); - switch (count($args)) { - case 1: - self::$_count++; - if (!$args[0]) { - throw new AssertionError(); - } - break; - - case 2: - self::$_count++; - if ($args[1] instanceof Matcher) { - self::doAssert('', $args[0], $args[1]); - } elseif (!$args[1]) { - throw new AssertionError($args[0]); - } - break; - - case 3: - self::$_count++; - self::doAssert( - $args[0], - $args[1], - Util::wrapValueWithIsEqual($args[2]) - ); - break; - - default: - throw new \InvalidArgumentException('assertThat() requires one to three arguments'); - } - } - - /** - * Returns the number of assertions performed. - * - * @return int - */ - public static function getCount() - { - return self::$_count; - } - - /** - * Resets the number of assertions performed to zero. - */ - public static function resetCount() - { - self::$_count = 0; - } - - /** - * Performs the actual assertion logic. - * - * If $matcher doesn't match $actual, - * throws a {@link Hamcrest\AssertionError} with a description - * of the failure along with the optional $identifier. - * - * @param string $identifier added to the message upon failure - * @param mixed $actual value to compare against $matcher - * @param \Hamcrest\Matcher $matcher applied to $actual - * @throws AssertionError - */ - private static function doAssert($identifier, $actual, Matcher $matcher) - { - if (!$matcher->matches($actual)) { - $description = new StringDescription(); - if (!empty($identifier)) { - $description->appendText($identifier . PHP_EOL); - } - $description->appendText('Expected: ') - ->appendDescriptionOf($matcher) - ->appendText(PHP_EOL . ' but: '); - - $matcher->describeMismatch($actual, $description); - - throw new AssertionError((string) $description); - } - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php deleted file mode 100644 index 23232e4..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php +++ /dev/null @@ -1,713 +0,0 @@ - - * assertThat($string, both(containsString("a"))->andAlso(containsString("b"))); - * - */ - public static function both(\Hamcrest\Matcher $matcher) - { - return \Hamcrest\Core\CombinableMatcher::both($matcher); - } - - /** - * This is useful for fluently combining matchers where either may pass, - * for example: - *

-     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
-     * 
- */ - public static function either(\Hamcrest\Matcher $matcher) - { - return \Hamcrest\Core\CombinableMatcher::either($matcher); - } - - /** - * Wraps an existing matcher and overrides the description when it fails. - */ - public static function describedAs(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args); - } - - /** - * @param Matcher $itemMatcher - * A matcher to apply to every element in an array. - * - * @return \Hamcrest\Core\Every - * Evaluates to TRUE for a collection in which every item matches $itemMatcher - */ - public static function everyItem(\Hamcrest\Matcher $itemMatcher) - { - return \Hamcrest\Core\Every::everyItem($itemMatcher); - } - - /** - * Does array size satisfy a given matcher? - */ - public static function hasToString($matcher) - { - return \Hamcrest\Core\HasToString::hasToString($matcher); - } - - /** - * Decorates another Matcher, retaining the behavior but allowing tests - * to be slightly more expressive. - * - * For example: assertThat($cheese, equalTo($smelly)) - * vs. assertThat($cheese, is(equalTo($smelly))) - */ - public static function is($value) - { - return \Hamcrest\Core\Is::is($value); - } - - /** - * This matcher always evaluates to true. - * - * @param string $description A meaningful string used when describing itself. - * - * @return \Hamcrest\Core\IsAnything - */ - public static function anything($description = 'ANYTHING') - { - return \Hamcrest\Core\IsAnything::anything($description); - } - - /** - * Test if the value is an array containing this matcher. - * - * Example: - *
-     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
-     * //Convenience defaults to equalTo()
-     * assertThat(array('a', 'b'), hasItem('b'));
-     * 
- */ - public static function hasItem(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args); - } - - /** - * Test if the value is an array containing elements that match all of these - * matchers. - * - * Example: - *
-     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
-     * 
- */ - public static function hasItems(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args); - } - - /** - * Is the value equal to another value, as tested by the use of the "==" - * comparison operator? - */ - public static function equalTo($item) - { - return \Hamcrest\Core\IsEqual::equalTo($item); - } - - /** - * Tests of the value is identical to $value as tested by the "===" operator. - */ - public static function identicalTo($value) - { - return \Hamcrest\Core\IsIdentical::identicalTo($value); - } - - /** - * Is the value an instance of a particular type? - * This version assumes no relationship between the required type and - * the signature of the method that sets it up, for example in - * assertThat($anObject, anInstanceOf('Thing')); - */ - public static function anInstanceOf($theClass) - { - return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); - } - - /** - * Is the value an instance of a particular type? - * This version assumes no relationship between the required type and - * the signature of the method that sets it up, for example in - * assertThat($anObject, anInstanceOf('Thing')); - */ - public static function any($theClass) - { - return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); - } - - /** - * Matches if value does not match $value. - */ - public static function not($value) - { - return \Hamcrest\Core\IsNot::not($value); - } - - /** - * Matches if value is null. - */ - public static function nullValue() - { - return \Hamcrest\Core\IsNull::nullValue(); - } - - /** - * Matches if value is not null. - */ - public static function notNullValue() - { - return \Hamcrest\Core\IsNull::notNullValue(); - } - - /** - * Creates a new instance of IsSame. - * - * @param mixed $object - * The predicate evaluates to true only when the argument is - * this object. - * - * @return \Hamcrest\Core\IsSame - */ - public static function sameInstance($object) - { - return \Hamcrest\Core\IsSame::sameInstance($object); - } - - /** - * Is the value a particular built-in type? - */ - public static function typeOf($theType) - { - return \Hamcrest\Core\IsTypeOf::typeOf($theType); - } - - /** - * Matches if value (class, object, or array) has named $property. - */ - public static function set($property) - { - return \Hamcrest\Core\Set::set($property); - } - - /** - * Matches if value (class, object, or array) does not have named $property. - */ - public static function notSet($property) - { - return \Hamcrest\Core\Set::notSet($property); - } - - /** - * Matches if value is a number equal to $value within some range of - * acceptable error $delta. - */ - public static function closeTo($value, $delta) - { - return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta); - } - - /** - * The value is not > $value, nor < $value. - */ - public static function comparesEqualTo($value) - { - return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value); - } - - /** - * The value is > $value. - */ - public static function greaterThan($value) - { - return \Hamcrest\Number\OrderingComparison::greaterThan($value); - } - - /** - * The value is >= $value. - */ - public static function greaterThanOrEqualTo($value) - { - return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); - } - - /** - * The value is >= $value. - */ - public static function atLeast($value) - { - return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); - } - - /** - * The value is < $value. - */ - public static function lessThan($value) - { - return \Hamcrest\Number\OrderingComparison::lessThan($value); - } - - /** - * The value is <= $value. - */ - public static function lessThanOrEqualTo($value) - { - return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); - } - - /** - * The value is <= $value. - */ - public static function atMost($value) - { - return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); - } - - /** - * Matches if value is a zero-length string. - */ - public static function isEmptyString() - { - return \Hamcrest\Text\IsEmptyString::isEmptyString(); - } - - /** - * Matches if value is a zero-length string. - */ - public static function emptyString() - { - return \Hamcrest\Text\IsEmptyString::isEmptyString(); - } - - /** - * Matches if value is null or a zero-length string. - */ - public static function isEmptyOrNullString() - { - return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); - } - - /** - * Matches if value is null or a zero-length string. - */ - public static function nullOrEmptyString() - { - return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); - } - - /** - * Matches if value is a non-zero-length string. - */ - public static function isNonEmptyString() - { - return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); - } - - /** - * Matches if value is a non-zero-length string. - */ - public static function nonEmptyString() - { - return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); - } - - /** - * Matches if value is a string equal to $string, regardless of the case. - */ - public static function equalToIgnoringCase($string) - { - return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string); - } - - /** - * Matches if value is a string equal to $string, regardless of whitespace. - */ - public static function equalToIgnoringWhiteSpace($string) - { - return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string); - } - - /** - * Matches if value is a string that matches regular expression $pattern. - */ - public static function matchesPattern($pattern) - { - return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern); - } - - /** - * Matches if value is a string that contains $substring. - */ - public static function containsString($substring) - { - return \Hamcrest\Text\StringContains::containsString($substring); - } - - /** - * Matches if value is a string that contains $substring regardless of the case. - */ - public static function containsStringIgnoringCase($substring) - { - return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring); - } - - /** - * Matches if value contains $substrings in a constrained order. - */ - public static function stringContainsInOrder(/* args... */) - { - $args = func_get_args(); - return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args); - } - - /** - * Matches if value is a string that ends with $substring. - */ - public static function endsWith($substring) - { - return \Hamcrest\Text\StringEndsWith::endsWith($substring); - } - - /** - * Matches if value is a string that starts with $substring. - */ - public static function startsWith($substring) - { - return \Hamcrest\Text\StringStartsWith::startsWith($substring); - } - - /** - * Is the value an array? - */ - public static function arrayValue() - { - return \Hamcrest\Type\IsArray::arrayValue(); - } - - /** - * Is the value a boolean? - */ - public static function booleanValue() - { - return \Hamcrest\Type\IsBoolean::booleanValue(); - } - - /** - * Is the value a boolean? - */ - public static function boolValue() - { - return \Hamcrest\Type\IsBoolean::booleanValue(); - } - - /** - * Is the value callable? - */ - public static function callableValue() - { - return \Hamcrest\Type\IsCallable::callableValue(); - } - - /** - * Is the value a float/double? - */ - public static function doubleValue() - { - return \Hamcrest\Type\IsDouble::doubleValue(); - } - - /** - * Is the value a float/double? - */ - public static function floatValue() - { - return \Hamcrest\Type\IsDouble::doubleValue(); - } - - /** - * Is the value an integer? - */ - public static function integerValue() - { - return \Hamcrest\Type\IsInteger::integerValue(); - } - - /** - * Is the value an integer? - */ - public static function intValue() - { - return \Hamcrest\Type\IsInteger::integerValue(); - } - - /** - * Is the value a numeric? - */ - public static function numericValue() - { - return \Hamcrest\Type\IsNumeric::numericValue(); - } - - /** - * Is the value an object? - */ - public static function objectValue() - { - return \Hamcrest\Type\IsObject::objectValue(); - } - - /** - * Is the value an object? - */ - public static function anObject() - { - return \Hamcrest\Type\IsObject::objectValue(); - } - - /** - * Is the value a resource? - */ - public static function resourceValue() - { - return \Hamcrest\Type\IsResource::resourceValue(); - } - - /** - * Is the value a scalar (boolean, integer, double, or string)? - */ - public static function scalarValue() - { - return \Hamcrest\Type\IsScalar::scalarValue(); - } - - /** - * Is the value a string? - */ - public static function stringValue() - { - return \Hamcrest\Type\IsString::stringValue(); - } - - /** - * Wraps $matcher with {@link Hamcrest\Core\IsEqual) - * if it's not a matcher and the XPath in count() - * if it's an integer. - */ - public static function hasXPath($xpath, $matcher = null) - { - return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php deleted file mode 100644 index aae8e46..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php +++ /dev/null @@ -1,43 +0,0 @@ -_value = $value; - $this->_delta = $delta; - } - - protected function matchesSafely($item) - { - return $this->_actualDelta($item) <= 0.0; - } - - protected function describeMismatchSafely($item, Description $mismatchDescription) - { - $mismatchDescription->appendValue($item) - ->appendText(' differed by ') - ->appendValue($this->_actualDelta($item)) - ; - } - - public function describeTo(Description $description) - { - $description->appendText('a numeric value within ') - ->appendValue($this->_delta) - ->appendText(' of ') - ->appendValue($this->_value) - ; - } - - /** - * Matches if value is a number equal to $value within some range of - * acceptable error $delta. - * - * @factory - */ - public static function closeTo($value, $delta) - { - return new self($value, $delta); - } - - // -- Private Methods - - private function _actualDelta($item) - { - return (abs(($item - $this->_value)) - $this->_delta); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php deleted file mode 100644 index 369d0cf..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php +++ /dev/null @@ -1,132 +0,0 @@ -_value = $value; - $this->_minCompare = $minCompare; - $this->_maxCompare = $maxCompare; - } - - protected function matchesSafely($other) - { - $compare = $this->_compare($this->_value, $other); - - return ($this->_minCompare <= $compare) && ($compare <= $this->_maxCompare); - } - - protected function describeMismatchSafely($item, Description $mismatchDescription) - { - $mismatchDescription - ->appendValue($item)->appendText(' was ') - ->appendText($this->_comparison($this->_compare($this->_value, $item))) - ->appendText(' ')->appendValue($this->_value) - ; - } - - public function describeTo(Description $description) - { - $description->appendText('a value ') - ->appendText($this->_comparison($this->_minCompare)) - ; - if ($this->_minCompare != $this->_maxCompare) { - $description->appendText(' or ') - ->appendText($this->_comparison($this->_maxCompare)) - ; - } - $description->appendText(' ')->appendValue($this->_value); - } - - /** - * The value is not > $value, nor < $value. - * - * @factory - */ - public static function comparesEqualTo($value) - { - return new self($value, 0, 0); - } - - /** - * The value is > $value. - * - * @factory - */ - public static function greaterThan($value) - { - return new self($value, -1, -1); - } - - /** - * The value is >= $value. - * - * @factory atLeast - */ - public static function greaterThanOrEqualTo($value) - { - return new self($value, -1, 0); - } - - /** - * The value is < $value. - * - * @factory - */ - public static function lessThan($value) - { - return new self($value, 1, 1); - } - - /** - * The value is <= $value. - * - * @factory atMost - */ - public static function lessThanOrEqualTo($value) - { - return new self($value, 0, 1); - } - - // -- Private Methods - - private function _compare($left, $right) - { - $a = $left; - $b = $right; - - if ($a < $b) { - return -1; - } elseif ($a == $b) { - return 0; - } else { - return 1; - } - } - - private function _comparison($compare) - { - if ($compare > 0) { - return 'less than'; - } elseif ($compare == 0) { - return 'equal to'; - } else { - return 'greater than'; - } - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php deleted file mode 100644 index 872fdf9..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php +++ /dev/null @@ -1,23 +0,0 @@ -_out = (string) $out; - } - - public function __toString() - { - return $this->_out; - } - - /** - * Return the description of a {@link Hamcrest\SelfDescribing} object as a - * String. - * - * @param \Hamcrest\SelfDescribing $selfDescribing - * The object to be described. - * - * @return string - * The description of the object. - */ - public static function toString(SelfDescribing $selfDescribing) - { - $self = new self(); - - return (string) $self->appendDescriptionOf($selfDescribing); - } - - /** - * Alias for {@link toString()}. - */ - public static function asString(SelfDescribing $selfDescribing) - { - return self::toString($selfDescribing); - } - - // -- Protected Methods - - protected function append($str) - { - $this->_out .= $str; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php deleted file mode 100644 index 2ae61b9..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php +++ /dev/null @@ -1,85 +0,0 @@ -_empty = $empty; - } - - public function matches($item) - { - return $this->_empty - ? ($item === '') - : is_string($item) && $item !== ''; - } - - public function describeTo(Description $description) - { - $description->appendText($this->_empty ? 'an empty string' : 'a non-empty string'); - } - - /** - * Matches if value is a zero-length string. - * - * @factory emptyString - */ - public static function isEmptyString() - { - if (!self::$_INSTANCE) { - self::$_INSTANCE = new self(true); - } - - return self::$_INSTANCE; - } - - /** - * Matches if value is null or a zero-length string. - * - * @factory nullOrEmptyString - */ - public static function isEmptyOrNullString() - { - if (!self::$_NULL_OR_EMPTY_INSTANCE) { - self::$_NULL_OR_EMPTY_INSTANCE = AnyOf::anyOf( - IsNull::nullvalue(), - self::isEmptyString() - ); - } - - return self::$_NULL_OR_EMPTY_INSTANCE; - } - - /** - * Matches if value is a non-zero-length string. - * - * @factory nonEmptyString - */ - public static function isNonEmptyString() - { - if (!self::$_NOT_INSTANCE) { - self::$_NOT_INSTANCE = new self(false); - } - - return self::$_NOT_INSTANCE; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php deleted file mode 100644 index 3836a8c..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php +++ /dev/null @@ -1,52 +0,0 @@ -_string = $string; - } - - protected function matchesSafely($item) - { - return strtolower($this->_string) === strtolower($item); - } - - protected function describeMismatchSafely($item, Description $mismatchDescription) - { - $mismatchDescription->appendText('was ')->appendText($item); - } - - public function describeTo(Description $description) - { - $description->appendText('equalToIgnoringCase(') - ->appendValue($this->_string) - ->appendText(')') - ; - } - - /** - * Matches if value is a string equal to $string, regardless of the case. - * - * @factory - */ - public static function equalToIgnoringCase($string) - { - return new self($string); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php deleted file mode 100644 index 853692b..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php +++ /dev/null @@ -1,66 +0,0 @@ -_string = $string; - } - - protected function matchesSafely($item) - { - return (strtolower($this->_stripSpace($item)) - === strtolower($this->_stripSpace($this->_string))); - } - - protected function describeMismatchSafely($item, Description $mismatchDescription) - { - $mismatchDescription->appendText('was ')->appendText($item); - } - - public function describeTo(Description $description) - { - $description->appendText('equalToIgnoringWhiteSpace(') - ->appendValue($this->_string) - ->appendText(')') - ; - } - - /** - * Matches if value is a string equal to $string, regardless of whitespace. - * - * @factory - */ - public static function equalToIgnoringWhiteSpace($string) - { - return new self($string); - } - - // -- Private Methods - - private function _stripSpace($string) - { - $parts = preg_split("/[\r\n\t ]+/", $string); - foreach ($parts as $i => $part) { - $parts[$i] = trim($part, " \r\n\t"); - } - - return trim(implode(' ', $parts), " \r\n\t"); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php deleted file mode 100644 index fa0d68e..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php +++ /dev/null @@ -1,40 +0,0 @@ -_substring, (string) $item) >= 1; - } - - protected function relationship() - { - return 'matching'; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php deleted file mode 100644 index b92786b..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php +++ /dev/null @@ -1,45 +0,0 @@ -_substring); - } - - /** - * Matches if value is a string that contains $substring. - * - * @factory - */ - public static function containsString($substring) - { - return new self($substring); - } - - // -- Protected Methods - - protected function evalSubstringOf($item) - { - return (false !== strpos((string) $item, $this->_substring)); - } - - protected function relationship() - { - return 'containing'; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php deleted file mode 100644 index 69f37c2..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php +++ /dev/null @@ -1,40 +0,0 @@ -_substring)); - } - - protected function relationship() - { - return 'containing in any case'; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php deleted file mode 100644 index e75de65..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php +++ /dev/null @@ -1,66 +0,0 @@ -_substrings = $substrings; - } - - protected function matchesSafely($item) - { - $fromIndex = 0; - - foreach ($this->_substrings as $substring) { - if (false === $fromIndex = strpos($item, $substring, $fromIndex)) { - return false; - } - } - - return true; - } - - protected function describeMismatchSafely($item, Description $mismatchDescription) - { - $mismatchDescription->appendText('was ')->appendText($item); - } - - public function describeTo(Description $description) - { - $description->appendText('a string containing ') - ->appendValueList('', ', ', '', $this->_substrings) - ->appendText(' in order') - ; - } - - /** - * Matches if value contains $substrings in a constrained order. - * - * @factory ... - */ - public static function stringContainsInOrder(/* args... */) - { - $args = func_get_args(); - - if (isset($args[0]) && is_array($args[0])) { - $args = $args[0]; - } - - return new self($args); - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php deleted file mode 100644 index f802ee4..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php +++ /dev/null @@ -1,40 +0,0 @@ -_substring))) === $this->_substring); - } - - protected function relationship() - { - return 'ending with'; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php deleted file mode 100644 index 79c9565..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php +++ /dev/null @@ -1,40 +0,0 @@ -_substring)) === $this->_substring); - } - - protected function relationship() - { - return 'starting with'; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php deleted file mode 100644 index e560ad6..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php +++ /dev/null @@ -1,45 +0,0 @@ -_substring = $substring; - } - - protected function matchesSafely($item) - { - return $this->evalSubstringOf($item); - } - - protected function describeMismatchSafely($item, Description $mismatchDescription) - { - $mismatchDescription->appendText('was "')->appendText($item)->appendText('"'); - } - - public function describeTo(Description $description) - { - $description->appendText('a string ') - ->appendText($this->relationship()) - ->appendText(' ') - ->appendValue($this->_substring) - ; - } - - abstract protected function evalSubstringOf($string); - - abstract protected function relationship(); -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php deleted file mode 100644 index 9179102..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php +++ /dev/null @@ -1,32 +0,0 @@ -isHexadecimal($item)) { - return true; - } - - return is_numeric($item); - } - - /** - * Return if the string passed is a valid hexadecimal number. - * This check is necessary because PHP 7 doesn't recognize hexadecimal string as numeric anymore. - * - * @param mixed $item - * @return boolean - */ - private function isHexadecimal($item) - { - if (is_string($item) && preg_match('/^0x(.*)$/', $item, $matches)) { - return ctype_xdigit($matches[1]); - } - - return false; - } - - /** - * Is the value a numeric? - * - * @factory - */ - public static function numericValue() - { - return new self; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php deleted file mode 100644 index 65918fc..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php +++ /dev/null @@ -1,32 +0,0 @@ -matchesSafelyWithDiagnosticDescription($item, new NullDescription()); - } - - final public function describeMismatchSafely($item, Description $mismatchDescription) - { - $this->matchesSafelyWithDiagnosticDescription($item, $mismatchDescription); - } - - // -- Protected Methods - - /** - * Subclasses should implement these. The item will already have been checked for - * the specific type. - */ - abstract protected function matchesSafelyWithDiagnosticDescription($item, Description $mismatchDescription); -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php deleted file mode 100644 index 56e299a..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php +++ /dev/null @@ -1,107 +0,0 @@ -_expectedType = $expectedType; - $this->_expectedSubtype = $expectedSubtype; - } - - final public function matches($item) - { - return $this->_isSafeType($item) && $this->matchesSafely($item); - } - - final public function describeMismatch($item, Description $mismatchDescription) - { - if (!$this->_isSafeType($item)) { - parent::describeMismatch($item, $mismatchDescription); - } else { - $this->describeMismatchSafely($item, $mismatchDescription); - } - } - - // -- Protected Methods - - /** - * The item will already have been checked for the specific type and subtype. - */ - abstract protected function matchesSafely($item); - - /** - * The item will already have been checked for the specific type and subtype. - */ - abstract protected function describeMismatchSafely($item, Description $mismatchDescription); - - // -- Private Methods - - private function _isSafeType($value) - { - switch ($this->_expectedType) { - - case self::TYPE_ANY: - return true; - - case self::TYPE_STRING: - return is_string($value) || is_numeric($value); - - case self::TYPE_NUMERIC: - return is_numeric($value) || is_string($value); - - case self::TYPE_ARRAY: - return is_array($value); - - case self::TYPE_OBJECT: - return is_object($value) - && ($this->_expectedSubtype === null - || $value instanceof $this->_expectedSubtype); - - case self::TYPE_RESOURCE: - return is_resource($value) - && ($this->_expectedSubtype === null - || get_resource_type($value) == $this->_expectedSubtype); - - case self::TYPE_BOOLEAN: - return true; - - default: - return true; - - } - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php deleted file mode 100644 index 169b036..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php +++ /dev/null @@ -1,76 +0,0 @@ - all items are - */ - public static function createMatcherArray(array $items) - { - //Extract single array item - if (count($items) == 1 && is_array($items[0])) { - $items = $items[0]; - } - - //Replace non-matchers - foreach ($items as &$item) { - if (!($item instanceof Matcher)) { - $item = Core\IsEqual::equalTo($item); - } - } - - return $items; - } -} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php deleted file mode 100644 index d9764e4..0000000 --- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php +++ /dev/null @@ -1,195 +0,0 @@ -_xpath = $xpath; - $this->_matcher = $matcher; - } - - /** - * Matches if the XPath matches against the DOM node and the matcher. - * - * @param string|\DOMNode $actual - * @param Description $mismatchDescription - * @return bool - */ - protected function matchesWithDiagnosticDescription($actual, Description $mismatchDescription) - { - if (is_string($actual)) { - $actual = $this->createDocument($actual); - } elseif (!$actual instanceof \DOMNode) { - $mismatchDescription->appendText('was ')->appendValue($actual); - - return false; - } - $result = $this->evaluate($actual); - if ($result instanceof \DOMNodeList) { - return $this->matchesContent($result, $mismatchDescription); - } else { - return $this->matchesExpression($result, $mismatchDescription); - } - } - - /** - * Creates and returns a DOMDocument from the given - * XML or HTML string. - * - * @param string $text - * @return \DOMDocument built from $text - * @throws \InvalidArgumentException if the document is not valid - */ - protected function createDocument($text) - { - $document = new \DOMDocument(); - if (preg_match('/^\s*<\?xml/', $text)) { - if (!@$document->loadXML($text)) { - throw new \InvalidArgumentException('Must pass a valid XML document'); - } - } else { - if (!@$document->loadHTML($text)) { - throw new \InvalidArgumentException('Must pass a valid HTML or XHTML document'); - } - } - - return $document; - } - - /** - * Applies the configured XPath to the DOM node and returns either - * the result if it's an expression or the node list if it's a query. - * - * @param \DOMNode $node context from which to issue query - * @return mixed result of expression or DOMNodeList from query - */ - protected function evaluate(\DOMNode $node) - { - if ($node instanceof \DOMDocument) { - $xpathDocument = new \DOMXPath($node); - - return $xpathDocument->evaluate($this->_xpath); - } else { - $xpathDocument = new \DOMXPath($node->ownerDocument); - - return $xpathDocument->evaluate($this->_xpath, $node); - } - } - - /** - * Matches if the list of nodes is not empty and the content of at least - * one node matches the configured matcher, if supplied. - * - * @param \DOMNodeList $nodes selected by the XPath query - * @param Description $mismatchDescription - * @return bool - */ - protected function matchesContent(\DOMNodeList $nodes, Description $mismatchDescription) - { - if ($nodes->length == 0) { - $mismatchDescription->appendText('XPath returned no results'); - } elseif ($this->_matcher === null) { - return true; - } else { - foreach ($nodes as $node) { - if ($this->_matcher->matches($node->textContent)) { - return true; - } - } - $content = array(); - foreach ($nodes as $node) { - $content[] = $node->textContent; - } - $mismatchDescription->appendText('XPath returned ') - ->appendValue($content); - } - - return false; - } - - /** - * Matches if the result of the XPath expression matches the configured - * matcher or evaluates to true if there is none. - * - * @param mixed $result result of the XPath expression - * @param Description $mismatchDescription - * @return bool - */ - protected function matchesExpression($result, Description $mismatchDescription) - { - if ($this->_matcher === null) { - if ($result) { - return true; - } - $mismatchDescription->appendText('XPath expression result was ') - ->appendValue($result); - } else { - if ($this->_matcher->matches($result)) { - return true; - } - $mismatchDescription->appendText('XPath expression result '); - $this->_matcher->describeMismatch($result, $mismatchDescription); - } - - return false; - } - - public function describeTo(Description $description) - { - $description->appendText('XML or HTML document with XPath "') - ->appendText($this->_xpath) - ->appendText('"'); - if ($this->_matcher !== null) { - $description->appendText(' '); - $this->_matcher->describeTo($description); - } - } - - /** - * Wraps $matcher with {@link Hamcrest\Core\IsEqual) - * if it's not a matcher and the XPath in count() - * if it's an integer. - * - * @factory - */ - public static function hasXPath($xpath, $matcher = null) - { - if ($matcher === null || $matcher instanceof Matcher) { - return new self($xpath, $matcher); - } elseif (is_int($matcher) && strpos($xpath, 'count(') !== 0) { - $xpath = 'count(' . $xpath . ')'; - } - - return new self($xpath, IsEqual::equalTo($matcher)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php deleted file mode 100644 index 6c52c0e..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php +++ /dev/null @@ -1,66 +0,0 @@ -assertTrue($matcher->matches($arg), $message); - } - - public function assertDoesNotMatch(\Hamcrest\Matcher $matcher, $arg, $message) - { - $this->assertFalse($matcher->matches($arg), $message); - } - - public function assertDescription($expected, \Hamcrest\Matcher $matcher) - { - $description = new \Hamcrest\StringDescription(); - $description->appendDescriptionOf($matcher); - $this->assertEquals($expected, (string) $description, 'Expected description'); - } - - public function assertMismatchDescription($expected, \Hamcrest\Matcher $matcher, $arg) - { - $description = new \Hamcrest\StringDescription(); - $this->assertFalse( - $matcher->matches($arg), - 'Precondtion: Matcher should not match item' - ); - $matcher->describeMismatch($arg, $description); - $this->assertEquals( - $expected, - (string) $description, - 'Expected mismatch description' - ); - } - - public function testIsNullSafe() - { - //Should not generate any notices - $this->createMatcher()->matches(null); - $this->createMatcher()->describeMismatch( - null, - new \Hamcrest\NullDescription() - ); - } - - public function testCopesWithUnknownTypes() - { - //Should not generate any notices - $this->createMatcher()->matches(new UnknownType()); - $this->createMatcher()->describeMismatch( - new UnknownType(), - new NullDescription() - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php deleted file mode 100644 index 45d9f13..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php +++ /dev/null @@ -1,54 +0,0 @@ -assertDescription('[<1>, <2>] in any order', containsInAnyOrder(array(1, 2))); - } - - public function testMatchesItemsInAnyOrder() - { - $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(1, 2, 3), 'in order'); - $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(3, 2, 1), 'out of order'); - $this->assertMatches(containsInAnyOrder(array(1)), array(1), 'single'); - } - - public function testAppliesMatchersInAnyOrder() - { - $this->assertMatches( - containsInAnyOrder(array(1, 2, 3)), - array(1, 2, 3), - 'in order' - ); - $this->assertMatches( - containsInAnyOrder(array(1, 2, 3)), - array(3, 2, 1), - 'out of order' - ); - $this->assertMatches( - containsInAnyOrder(array(1)), - array(1), - 'single' - ); - } - - public function testMismatchesItemsInAnyOrder() - { - $matcher = containsInAnyOrder(array(1, 2, 3)); - - $this->assertMismatchDescription('was null', $matcher, null); - $this->assertMismatchDescription('No item matches: <1>, <2>, <3> in []', $matcher, array()); - $this->assertMismatchDescription('No item matches: <2>, <3> in [<1>]', $matcher, array(1)); - $this->assertMismatchDescription('Not matched: <4>', $matcher, array(4, 3, 2, 1)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php deleted file mode 100644 index 1868343..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php +++ /dev/null @@ -1,44 +0,0 @@ -assertDescription('[<1>, <2>]', arrayContaining(array(1, 2))); - } - - public function testMatchesItemsInOrder() - { - $this->assertMatches(arrayContaining(array(1, 2, 3)), array(1, 2, 3), 'in order'); - $this->assertMatches(arrayContaining(array(1)), array(1), 'single'); - } - - public function testAppliesMatchersInOrder() - { - $this->assertMatches( - arrayContaining(array(1, 2, 3)), - array(1, 2, 3), - 'in order' - ); - $this->assertMatches(arrayContaining(array(1)), array(1), 'single'); - } - - public function testMismatchesItemsInAnyOrder() - { - $matcher = arrayContaining(array(1, 2, 3)); - $this->assertMismatchDescription('was null', $matcher, null); - $this->assertMismatchDescription('No item matched: <1>', $matcher, array()); - $this->assertMismatchDescription('No item matched: <2>', $matcher, array(1)); - $this->assertMismatchDescription('item with key 0: was <4>', $matcher, array(4, 3, 2, 1)); - $this->assertMismatchDescription('item with key 2: was <4>', $matcher, array(1, 2, 4)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php deleted file mode 100644 index 31770d8..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php +++ /dev/null @@ -1,62 +0,0 @@ -1); - - $this->assertMatches(hasKey('a'), $array, 'Matches single key'); - } - - public function testMatchesArrayContainingKey() - { - $array = array('a'=>1, 'b'=>2, 'c'=>3); - - $this->assertMatches(hasKey('a'), $array, 'Matches a'); - $this->assertMatches(hasKey('c'), $array, 'Matches c'); - } - - public function testMatchesArrayContainingKeyWithIntegerKeys() - { - $array = array(1=>'A', 2=>'B'); - - assertThat($array, hasKey(1)); - } - - public function testMatchesArrayContainingKeyWithNumberKeys() - { - $array = array(1=>'A', 2=>'B'); - - assertThat($array, hasKey(1)); - - // very ugly version! - assertThat($array, IsArrayContainingKey::hasKeyInArray(2)); - } - - public function testHasReadableDescription() - { - $this->assertDescription('array with key "a"', hasKey('a')); - } - - public function testDoesNotMatchEmptyArray() - { - $this->assertMismatchDescription('array was []', hasKey('Foo'), array()); - } - - public function testDoesNotMatchArrayMissingKey() - { - $array = array('a'=>1, 'b'=>2, 'c'=>3); - - $this->assertMismatchDescription('array was ["a" => <1>, "b" => <2>, "c" => <3>]', hasKey('d'), $array); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php deleted file mode 100644 index a415f9f..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php +++ /dev/null @@ -1,36 +0,0 @@ -1, 'b'=>2); - - $this->assertMatches(hasKeyValuePair(equalTo('a'), equalTo(1)), $array, 'matcherA'); - $this->assertMatches(hasKeyValuePair(equalTo('b'), equalTo(2)), $array, 'matcherB'); - $this->assertMismatchDescription( - 'array was ["a" => <1>, "b" => <2>]', - hasKeyValuePair(equalTo('c'), equalTo(3)), - $array - ); - } - - public function testDoesNotMatchNull() - { - $this->assertMismatchDescription('was null', hasKeyValuePair(anything(), anything()), null); - } - - public function testHasReadableDescription() - { - $this->assertDescription('array containing ["a" => <2>]', hasKeyValuePair(equalTo('a'), equalTo(2))); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php deleted file mode 100644 index 8d5bd81..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php +++ /dev/null @@ -1,50 +0,0 @@ -assertMatches( - hasItemInArray('a'), - array('a', 'b', 'c'), - "should matches array that contains 'a'" - ); - } - - public function testDoesNotMatchAnArrayThatDoesntContainAnElementMatchingTheGivenMatcher() - { - $this->assertDoesNotMatch( - hasItemInArray('a'), - array('b', 'c'), - "should not matches array that doesn't contain 'a'" - ); - $this->assertDoesNotMatch( - hasItemInArray('a'), - array(), - 'should not match empty array' - ); - } - - public function testDoesNotMatchNull() - { - $this->assertDoesNotMatch( - hasItemInArray('a'), - null, - 'should not match null' - ); - } - - public function testHasAReadableDescription() - { - $this->assertDescription('an array containing "a"', hasItemInArray('a')); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php deleted file mode 100644 index e4db53e..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php +++ /dev/null @@ -1,89 +0,0 @@ -assertMatches( - anArray(array(equalTo('a'), equalTo('b'), equalTo('c'))), - array('a', 'b', 'c'), - 'should match array with matching elements' - ); - } - - public function testDoesNotMatchAnArrayWhenElementsDoNotMatch() - { - $this->assertDoesNotMatch( - anArray(array(equalTo('a'), equalTo('b'))), - array('b', 'c'), - 'should not match array with different elements' - ); - } - - public function testDoesNotMatchAnArrayOfDifferentSize() - { - $this->assertDoesNotMatch( - anArray(array(equalTo('a'), equalTo('b'))), - array('a', 'b', 'c'), - 'should not match larger array' - ); - $this->assertDoesNotMatch( - anArray(array(equalTo('a'), equalTo('b'))), - array('a'), - 'should not match smaller array' - ); - } - - public function testDoesNotMatchNull() - { - $this->assertDoesNotMatch( - anArray(array(equalTo('a'))), - null, - 'should not match null' - ); - } - - public function testHasAReadableDescription() - { - $this->assertDescription( - '["a", "b"]', - anArray(array(equalTo('a'), equalTo('b'))) - ); - } - - public function testHasAReadableMismatchDescriptionWhenKeysDontMatch() - { - $this->assertMismatchDescription( - 'array keys were [<1>, <2>]', - anArray(array(equalTo('a'), equalTo('b'))), - array(1 => 'a', 2 => 'b') - ); - } - - public function testSupportsMatchesAssociativeArrays() - { - $this->assertMatches( - anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'), 'z'=>equalTo('c'))), - array('x'=>'a', 'y'=>'b', 'z'=>'c'), - 'should match associative array with matching elements' - ); - } - - public function testDoesNotMatchAnAssociativeArrayWhenKeysDoNotMatch() - { - $this->assertDoesNotMatch( - anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'))), - array('x'=>'b', 'z'=>'c'), - 'should not match array with different keys' - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php deleted file mode 100644 index 8413c89..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php +++ /dev/null @@ -1,37 +0,0 @@ -assertMatches(arrayWithSize(equalTo(3)), array(1, 2, 3), 'correct size'); - $this->assertDoesNotMatch(arrayWithSize(equalTo(2)), array(1, 2, 3), 'incorrect size'); - } - - public function testProvidesConvenientShortcutForArrayWithSizeEqualTo() - { - $this->assertMatches(arrayWithSize(3), array(1, 2, 3), 'correct size'); - $this->assertDoesNotMatch(arrayWithSize(2), array(1, 2, 3), 'incorrect size'); - } - - public function testEmptyArray() - { - $this->assertMatches(emptyArray(), array(), 'correct size'); - $this->assertDoesNotMatch(emptyArray(), array(1), 'incorrect size'); - } - - public function testHasAReadableDescription() - { - $this->assertDescription('an array with size <3>', arrayWithSize(equalTo(3))); - $this->assertDescription('an empty array', emptyArray()); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php deleted file mode 100644 index 833e2c3..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php +++ /dev/null @@ -1,23 +0,0 @@ -appendText('SOME DESCRIPTION'); - } - - public function testDescribesItselfWithToStringMethod() - { - $someMatcher = new \Hamcrest\SomeMatcher(); - $this->assertEquals('SOME DESCRIPTION', (string) $someMatcher); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php deleted file mode 100644 index 2f15fb4..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php +++ /dev/null @@ -1,77 +0,0 @@ -assertMatches( - emptyTraversable(), - new \ArrayObject(array()), - 'an empty traversable' - ); - } - - public function testEmptyMatcherDoesNotMatchWhenNotEmpty() - { - $this->assertDoesNotMatch( - emptyTraversable(), - new \ArrayObject(array(1, 2, 3)), - 'a non-empty traversable' - ); - } - - public function testEmptyMatcherDoesNotMatchNull() - { - $this->assertDoesNotMatch( - emptyTraversable(), - null, - 'should not match null' - ); - } - - public function testEmptyMatcherHasAReadableDescription() - { - $this->assertDescription('an empty traversable', emptyTraversable()); - } - - public function testNonEmptyDoesNotMatchNull() - { - $this->assertDoesNotMatch( - nonEmptyTraversable(), - null, - 'should not match null' - ); - } - - public function testNonEmptyDoesNotMatchWhenEmpty() - { - $this->assertDoesNotMatch( - nonEmptyTraversable(), - new \ArrayObject(array()), - 'an empty traversable' - ); - } - - public function testNonEmptyMatchesWhenNotEmpty() - { - $this->assertMatches( - nonEmptyTraversable(), - new \ArrayObject(array(1, 2, 3)), - 'a non-empty traversable' - ); - } - - public function testNonEmptyNonEmptyMatcherHasAReadableDescription() - { - $this->assertDescription('a non-empty traversable', nonEmptyTraversable()); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php deleted file mode 100644 index c1c67a7..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertMatches( - traversableWithSize(equalTo(3)), - new \ArrayObject(array(1, 2, 3)), - 'correct size' - ); - } - - public function testDoesNotMatchWhenSizeIsIncorrect() - { - $this->assertDoesNotMatch( - traversableWithSize(equalTo(2)), - new \ArrayObject(array(1, 2, 3)), - 'incorrect size' - ); - } - - public function testDoesNotMatchNull() - { - $this->assertDoesNotMatch( - traversableWithSize(3), - null, - 'should not match null' - ); - } - - public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo() - { - $this->assertMatches( - traversableWithSize(3), - new \ArrayObject(array(1, 2, 3)), - 'correct size' - ); - } - - public function testHasAReadableDescription() - { - $this->assertDescription( - 'a traversable with size <3>', - traversableWithSize(equalTo(3)) - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php deleted file mode 100644 index 86b8c27..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php +++ /dev/null @@ -1,56 +0,0 @@ -assertDescription( - '("good" and "bad" and "ugly")', - allOf('good', 'bad', 'ugly') - ); - } - - public function testMismatchDescriptionDescribesFirstFailingMatch() - { - $this->assertMismatchDescription( - '"good" was "bad"', - allOf('bad', 'good'), - 'bad' - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php deleted file mode 100644 index 3d62b93..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php +++ /dev/null @@ -1,79 +0,0 @@ -assertDescription( - '("good" or "bad" or "ugly")', - anyOf('good', 'bad', 'ugly') - ); - } - - public function testNoneOfEvaluatesToTheLogicalDisjunctionOfTwoOtherMatchers() - { - assertThat('good', not(noneOf('bad', 'good'))); - assertThat('good', not(noneOf('good', 'good'))); - assertThat('good', not(noneOf('good', 'bad'))); - - assertThat('good', noneOf('bad', startsWith('b'))); - } - - public function testNoneOfEvaluatesToTheLogicalDisjunctionOfManyOtherMatchers() - { - assertThat('good', not(noneOf('bad', 'good', 'bad', 'bad', 'bad'))); - assertThat('good', noneOf('bad', 'bad', 'bad', 'bad', 'bad')); - } - - public function testNoneOfSupportsMixedTypes() - { - $combined = noneOf( - equalTo(new \Hamcrest\Core\SampleBaseClass('good')), - equalTo(new \Hamcrest\Core\SampleBaseClass('ugly')), - equalTo(new \Hamcrest\Core\SampleSubClass('good')) - ); - - assertThat(new \Hamcrest\Core\SampleSubClass('bad'), $combined); - } - - public function testNoneOfHasAReadableDescription() - { - $this->assertDescription( - 'not ("good" or "bad" or "ugly")', - noneOf('good', 'bad', 'ugly') - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php deleted file mode 100644 index 4c22614..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php +++ /dev/null @@ -1,59 +0,0 @@ -_either_3_or_4 = \Hamcrest\Core\CombinableMatcher::either(equalTo(3))->orElse(equalTo(4)); - $this->_not_3_and_not_4 = \Hamcrest\Core\CombinableMatcher::both(not(equalTo(3)))->andAlso(not(equalTo(4))); - } - - protected function createMatcher() - { - return \Hamcrest\Core\CombinableMatcher::either(equalTo('irrelevant'))->orElse(equalTo('ignored')); - } - - public function testBothAcceptsAndRejects() - { - assertThat(2, $this->_not_3_and_not_4); - assertThat(3, not($this->_not_3_and_not_4)); - } - - public function testAcceptsAndRejectsThreeAnds() - { - $tripleAnd = $this->_not_3_and_not_4->andAlso(equalTo(2)); - assertThat(2, $tripleAnd); - assertThat(3, not($tripleAnd)); - } - - public function testBothDescribesItself() - { - $this->assertEquals('(not <3> and not <4>)', (string) $this->_not_3_and_not_4); - $this->assertMismatchDescription('was <3>', $this->_not_3_and_not_4, 3); - } - - public function testEitherAcceptsAndRejects() - { - assertThat(3, $this->_either_3_or_4); - assertThat(6, not($this->_either_3_or_4)); - } - - public function testAcceptsAndRejectsThreeOrs() - { - $orTriple = $this->_either_3_or_4->orElse(greaterThan(10)); - - assertThat(11, $orTriple); - assertThat(9, not($orTriple)); - } - - public function testEitherDescribesItself() - { - $this->assertEquals('(<3> or <4>)', (string) $this->_either_3_or_4); - $this->assertMismatchDescription('was <6>', $this->_either_3_or_4, 6); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php deleted file mode 100644 index 673ab41..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php +++ /dev/null @@ -1,36 +0,0 @@ -assertDescription('m1 description', $m1); - $this->assertDescription('m2 description', $m2); - } - - public function testAppendsValuesToDescription() - { - $m = describedAs('value 1 = %0, value 2 = %1', anything(), 33, 97); - - $this->assertDescription('value 1 = <33>, value 2 = <97>', $m); - } - - public function testDelegatesMatchingToAnotherMatcher() - { - $m1 = describedAs('irrelevant', anything()); - $m2 = describedAs('irrelevant', not(anything())); - - $this->assertTrue($m1->matches(new \stdClass())); - $this->assertFalse($m2->matches('hi')); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php deleted file mode 100644 index 5eb153c..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php +++ /dev/null @@ -1,30 +0,0 @@ -assertEquals('every item is a string containing "a"', (string) $each); - - $this->assertMismatchDescription('an item was "BbB"', $each, array('BbB')); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php deleted file mode 100644 index e2e136d..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php +++ /dev/null @@ -1,108 +0,0 @@ -assertMatches( - hasToString(equalTo('php')), - new \Hamcrest\Core\PhpForm(), - 'correct __toString' - ); - $this->assertMatches( - hasToString(equalTo('java')), - new \Hamcrest\Core\JavaForm(), - 'correct toString' - ); - } - - public function testPicksJavaOverPhpToString() - { - $this->assertMatches( - hasToString(equalTo('java')), - new \Hamcrest\Core\BothForms(), - 'correct toString' - ); - } - - public function testDoesNotMatchWhenToStringDoesNotMatch() - { - $this->assertDoesNotMatch( - hasToString(equalTo('mismatch')), - new \Hamcrest\Core\PhpForm(), - 'incorrect __toString' - ); - $this->assertDoesNotMatch( - hasToString(equalTo('mismatch')), - new \Hamcrest\Core\JavaForm(), - 'incorrect toString' - ); - $this->assertDoesNotMatch( - hasToString(equalTo('mismatch')), - new \Hamcrest\Core\BothForms(), - 'incorrect __toString' - ); - } - - public function testDoesNotMatchNull() - { - $this->assertDoesNotMatch( - hasToString(equalTo('a')), - null, - 'should not match null' - ); - } - - public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo() - { - $this->assertMatches( - hasToString(equalTo('php')), - new \Hamcrest\Core\PhpForm(), - 'correct __toString' - ); - } - - public function testHasAReadableDescription() - { - $this->assertDescription( - 'an object with toString() "php"', - hasToString(equalTo('php')) - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php deleted file mode 100644 index f68032e..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php +++ /dev/null @@ -1,29 +0,0 @@ -assertDescription('ANYTHING', anything()); - } - - public function testCanOverrideDescription() - { - $description = 'description'; - $this->assertDescription($description, anything($description)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php deleted file mode 100644 index a3929b5..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php +++ /dev/null @@ -1,91 +0,0 @@ -assertMatches( - $itemMatcher, - array('a', 'b', 'c'), - "should match list that contains 'a'" - ); - } - - public function testDoesNotMatchCollectionThatDoesntContainAnElementMatchingTheGivenMatcher() - { - $matcher1 = hasItem(equalTo('a')); - $this->assertDoesNotMatch( - $matcher1, - array('b', 'c'), - "should not match list that doesn't contain 'a'" - ); - - $matcher2 = hasItem(equalTo('a')); - $this->assertDoesNotMatch( - $matcher2, - array(), - 'should not match the empty list' - ); - } - - public function testDoesNotMatchNull() - { - $this->assertDoesNotMatch( - hasItem(equalTo('a')), - null, - 'should not match null' - ); - } - - public function testHasAReadableDescription() - { - $this->assertDescription('a collection containing "a"', hasItem(equalTo('a'))); - } - - public function testMatchesAllItemsInCollection() - { - $matcher1 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); - $this->assertMatches( - $matcher1, - array('a', 'b', 'c'), - 'should match list containing all items' - ); - - $matcher2 = hasItems('a', 'b', 'c'); - $this->assertMatches( - $matcher2, - array('a', 'b', 'c'), - 'should match list containing all items (without matchers)' - ); - - $matcher3 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); - $this->assertMatches( - $matcher3, - array('c', 'b', 'a'), - 'should match list containing all items in any order' - ); - - $matcher4 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); - $this->assertMatches( - $matcher4, - array('e', 'c', 'b', 'a', 'd'), - 'should match list containing all items plus others' - ); - - $matcher5 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); - $this->assertDoesNotMatch( - $matcher5, - array('e', 'c', 'b', 'd'), // 'a' missing - 'should not match list unless it contains all items' - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php deleted file mode 100644 index 73e3ff0..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php +++ /dev/null @@ -1,102 +0,0 @@ -_arg = $arg; - } - - public function __toString() - { - return $this->_arg; - } -} - -class IsEqualTest extends \Hamcrest\AbstractMatcherTest -{ - - protected function createMatcher() - { - return \Hamcrest\Core\IsEqual::equalTo('irrelevant'); - } - - public function testComparesObjectsUsingEqualityOperator() - { - assertThat("hi", equalTo("hi")); - assertThat("bye", not(equalTo("hi"))); - - assertThat(1, equalTo(1)); - assertThat(1, not(equalTo(2))); - - assertThat("2", equalTo(2)); - } - - public function testCanCompareNullValues() - { - assertThat(null, equalTo(null)); - - assertThat(null, not(equalTo('hi'))); - assertThat('hi', not(equalTo(null))); - } - - public function testComparesTheElementsOfAnArray() - { - $s1 = array('a', 'b'); - $s2 = array('a', 'b'); - $s3 = array('c', 'd'); - $s4 = array('a', 'b', 'c', 'd'); - - assertThat($s1, equalTo($s1)); - assertThat($s2, equalTo($s1)); - assertThat($s3, not(equalTo($s1))); - assertThat($s4, not(equalTo($s1))); - } - - public function testComparesTheElementsOfAnArrayOfPrimitiveTypes() - { - $i1 = array(1, 2); - $i2 = array(1, 2); - $i3 = array(3, 4); - $i4 = array(1, 2, 3, 4); - - assertThat($i1, equalTo($i1)); - assertThat($i2, equalTo($i1)); - assertThat($i3, not(equalTo($i1))); - assertThat($i4, not(equalTo($i1))); - } - - public function testRecursivelyTestsElementsOfArrays() - { - $i1 = array(array(1, 2), array(3, 4)); - $i2 = array(array(1, 2), array(3, 4)); - $i3 = array(array(5, 6), array(7, 8)); - $i4 = array(array(1, 2, 3, 4), array(3, 4)); - - assertThat($i1, equalTo($i1)); - assertThat($i2, equalTo($i1)); - assertThat($i3, not(equalTo($i1))); - assertThat($i4, not(equalTo($i1))); - } - - public function testIncludesTheResultOfCallingToStringOnItsArgumentInTheDescription() - { - $argumentDescription = 'ARGUMENT DESCRIPTION'; - $argument = new \Hamcrest\Core\DummyToStringClass($argumentDescription); - $this->assertDescription('<' . $argumentDescription . '>', equalTo($argument)); - } - - public function testReturnsAnObviousDescriptionIfCreatedWithANestedMatcherByMistake() - { - $innerMatcher = equalTo('NestedMatcher'); - $this->assertDescription('<' . (string) $innerMatcher . '>', equalTo($innerMatcher)); - } - - public function testReturnsGoodDescriptionIfCreatedWithNullReference() - { - $this->assertDescription('null', equalTo(null)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php deleted file mode 100644 index 9cc2794..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php +++ /dev/null @@ -1,30 +0,0 @@ -assertDescription('"ARG"', identicalTo('ARG')); - } - - public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull() - { - $this->assertDescription('null', identicalTo(null)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php deleted file mode 100644 index 7a5f095..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php +++ /dev/null @@ -1,51 +0,0 @@ -_baseClassInstance = new \Hamcrest\Core\SampleBaseClass('good'); - $this->_subClassInstance = new \Hamcrest\Core\SampleSubClass('good'); - } - - protected function createMatcher() - { - return \Hamcrest\Core\IsInstanceOf::anInstanceOf('stdClass'); - } - - public function testEvaluatesToTrueIfArgumentIsInstanceOfASpecificClass() - { - assertThat($this->_baseClassInstance, anInstanceOf('Hamcrest\Core\SampleBaseClass')); - assertThat($this->_subClassInstance, anInstanceOf('Hamcrest\Core\SampleSubClass')); - assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); - assertThat(new \stdClass(), not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); - } - - public function testEvaluatesToFalseIfArgumentIsNotAnObject() - { - assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); - assertThat(false, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); - assertThat(5, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); - assertThat('foo', not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); - assertThat(array(1, 2, 3), not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); - } - - public function testHasAReadableDescription() - { - $this->assertDescription('an instance of stdClass', anInstanceOf('stdClass')); - } - - public function testDecribesActualClassInMismatchMessage() - { - $this->assertMismatchDescription( - '[Hamcrest\Core\SampleBaseClass] ', - anInstanceOf('Hamcrest\Core\SampleSubClass'), - $this->_baseClassInstance - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php deleted file mode 100644 index 09d4a65..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php +++ /dev/null @@ -1,31 +0,0 @@ -assertMatches(not(equalTo('A')), 'B', 'should match'); - $this->assertDoesNotMatch(not(equalTo('B')), 'B', 'should not match'); - } - - public function testProvidesConvenientShortcutForNotEqualTo() - { - $this->assertMatches(not('A'), 'B', 'should match'); - $this->assertMatches(not('B'), 'A', 'should match'); - $this->assertDoesNotMatch(not('A'), 'A', 'should not match'); - $this->assertDoesNotMatch(not('B'), 'B', 'should not match'); - } - - public function testUsesDescriptionOfNegatedMatcherWithPrefix() - { - $this->assertDescription('not a value greater than <2>', not(greaterThan(2))); - $this->assertDescription('not "A"', not('A')); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php deleted file mode 100644 index bfa4255..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php +++ /dev/null @@ -1,20 +0,0 @@ -assertDescription('sameInstance("ARG")', sameInstance('ARG')); - } - - public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull() - { - $this->assertDescription('sameInstance(null)', sameInstance(null)); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php deleted file mode 100644 index bbd848b..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php +++ /dev/null @@ -1,33 +0,0 @@ -assertMatches(is(equalTo(true)), true, 'should match'); - $this->assertMatches(is(equalTo(false)), false, 'should match'); - $this->assertDoesNotMatch(is(equalTo(true)), false, 'should not match'); - $this->assertDoesNotMatch(is(equalTo(false)), true, 'should not match'); - } - - public function testGeneratesIsPrefixInDescription() - { - $this->assertDescription('is ', is(equalTo(true))); - } - - public function testProvidesConvenientShortcutForIsEqualTo() - { - $this->assertMatches(is('A'), 'A', 'should match'); - $this->assertMatches(is('B'), 'B', 'should match'); - $this->assertDoesNotMatch(is('A'), 'B', 'should not match'); - $this->assertDoesNotMatch(is('B'), 'A', 'should not match'); - $this->assertDescription('is "A"', is('A')); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php deleted file mode 100644 index 3f48dea..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php +++ /dev/null @@ -1,45 +0,0 @@ -assertDescription('a double', typeOf('double')); - $this->assertDescription('an integer', typeOf('integer')); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', typeOf('boolean'), null); - $this->assertMismatchDescription('was an integer <5>', typeOf('float'), 5); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php deleted file mode 100644 index c953e7c..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php +++ /dev/null @@ -1,18 +0,0 @@ -_arg = $arg; - } - - public function __toString() - { - return $this->_arg; - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php deleted file mode 100644 index 822f1b6..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php +++ /dev/null @@ -1,6 +0,0 @@ -_instanceProperty); - } - - protected function createMatcher() - { - return \Hamcrest\Core\Set::set('property_name'); - } - - public function testEvaluatesToTrueIfArrayPropertyIsSet() - { - assertThat(array('foo' => 'bar'), set('foo')); - } - - public function testNegatedEvaluatesToFalseIfArrayPropertyIsSet() - { - assertThat(array('foo' => 'bar'), not(notSet('foo'))); - } - - public function testEvaluatesToTrueIfClassPropertyIsSet() - { - self::$_classProperty = 'bar'; - assertThat('Hamcrest\Core\SetTest', set('_classProperty')); - } - - public function testNegatedEvaluatesToFalseIfClassPropertyIsSet() - { - self::$_classProperty = 'bar'; - assertThat('Hamcrest\Core\SetTest', not(notSet('_classProperty'))); - } - - public function testEvaluatesToTrueIfObjectPropertyIsSet() - { - $this->_instanceProperty = 'bar'; - assertThat($this, set('_instanceProperty')); - } - - public function testNegatedEvaluatesToFalseIfObjectPropertyIsSet() - { - $this->_instanceProperty = 'bar'; - assertThat($this, not(notSet('_instanceProperty'))); - } - - public function testEvaluatesToFalseIfArrayPropertyIsNotSet() - { - assertThat(array('foo' => 'bar'), not(set('baz'))); - } - - public function testNegatedEvaluatesToTrueIfArrayPropertyIsNotSet() - { - assertThat(array('foo' => 'bar'), notSet('baz')); - } - - public function testEvaluatesToFalseIfClassPropertyIsNotSet() - { - assertThat('Hamcrest\Core\SetTest', not(set('_classProperty'))); - } - - public function testNegatedEvaluatesToTrueIfClassPropertyIsNotSet() - { - assertThat('Hamcrest\Core\SetTest', notSet('_classProperty')); - } - - public function testEvaluatesToFalseIfObjectPropertyIsNotSet() - { - assertThat($this, not(set('_instanceProperty'))); - } - - public function testNegatedEvaluatesToTrueIfObjectPropertyIsNotSet() - { - assertThat($this, notSet('_instanceProperty')); - } - - public function testHasAReadableDescription() - { - $this->assertDescription('set property foo', set('foo')); - $this->assertDescription('unset property bar', notSet('bar')); - } - - public function testDecribesPropertySettingInMismatchMessage() - { - $this->assertMismatchDescription( - 'was not set', - set('bar'), - array('foo' => 'bar') - ); - $this->assertMismatchDescription( - 'was "bar"', - notSet('foo'), - array('foo' => 'bar') - ); - self::$_classProperty = 'bar'; - $this->assertMismatchDescription( - 'was "bar"', - notSet('_classProperty'), - 'Hamcrest\Core\SetTest' - ); - $this->_instanceProperty = 'bar'; - $this->assertMismatchDescription( - 'was "bar"', - notSet('_instanceProperty'), - $this - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php deleted file mode 100644 index 7543294..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php +++ /dev/null @@ -1,73 +0,0 @@ -_result = $result; - } - public function getResult() - { - return $this->_result; - } -} - -/* Test-specific subclass only */ -class ResultMatcher extends \Hamcrest\FeatureMatcher -{ - public function __construct() - { - parent::__construct(self::TYPE_ANY, null, equalTo('bar'), 'Thingy with result', 'result'); - } - public function featureValueOf($actual) - { - if ($actual instanceof \Hamcrest\Thingy) { - return $actual->getResult(); - } - } -} - -class FeatureMatcherTest extends \Hamcrest\AbstractMatcherTest -{ - - private $_resultMatcher; - - public function setUp() - { - $this->_resultMatcher = $this->_resultMatcher(); - } - - protected function createMatcher() - { - return $this->_resultMatcher(); - } - - public function testMatchesPartOfAnObject() - { - $this->assertMatches($this->_resultMatcher, new \Hamcrest\Thingy('bar'), 'feature'); - $this->assertDescription('Thingy with result "bar"', $this->_resultMatcher); - } - - public function testMismatchesPartOfAnObject() - { - $this->assertMismatchDescription( - 'result was "foo"', - $this->_resultMatcher, - new \Hamcrest\Thingy('foo') - ); - } - - public function testDoesNotGenerateNoticesForNull() - { - $this->assertMismatchDescription('result was null', $this->_resultMatcher, null); - } - - // -- Creation Methods - - private function _resultMatcher() - { - return new \Hamcrest\ResultMatcher(); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php deleted file mode 100644 index 2183712..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php +++ /dev/null @@ -1,190 +0,0 @@ -getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat(null); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('', $ex->getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat(''); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('', $ex->getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat(0); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('', $ex->getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat(0.0); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('', $ex->getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat(array()); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('', $ex->getMessage()); - } - self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); - } - - public function testAssertThatWithIdentifierAndTrueArgPasses() - { - \Hamcrest\MatcherAssert::assertThat('identifier', true); - \Hamcrest\MatcherAssert::assertThat('identifier', 'non-empty'); - \Hamcrest\MatcherAssert::assertThat('identifier', 1); - \Hamcrest\MatcherAssert::assertThat('identifier', 3.14159); - \Hamcrest\MatcherAssert::assertThat('identifier', array(true)); - self::assertEquals(5, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); - } - - public function testAssertThatWithIdentifierAndFalseArgFails() - { - try { - \Hamcrest\MatcherAssert::assertThat('identifier', false); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('identifier', $ex->getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat('identifier', null); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('identifier', $ex->getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat('identifier', ''); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('identifier', $ex->getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat('identifier', 0); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('identifier', $ex->getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat('identifier', 0.0); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('identifier', $ex->getMessage()); - } - try { - \Hamcrest\MatcherAssert::assertThat('identifier', array()); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals('identifier', $ex->getMessage()); - } - self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); - } - - public function testAssertThatWithActualValueAndMatcherArgsThatMatchPasses() - { - \Hamcrest\MatcherAssert::assertThat(true, is(true)); - self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); - } - - public function testAssertThatWithActualValueAndMatcherArgsThatDontMatchFails() - { - $expected = 'expected'; - $actual = 'actual'; - - $expectedMessage = - 'Expected: "expected"' . PHP_EOL . - ' but: was "actual"'; - - try { - \Hamcrest\MatcherAssert::assertThat($actual, equalTo($expected)); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals($expectedMessage, $ex->getMessage()); - self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); - } - } - - public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatMatchPasses() - { - \Hamcrest\MatcherAssert::assertThat('identifier', true, is(true)); - self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); - } - - public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatDontMatchFails() - { - $expected = 'expected'; - $actual = 'actual'; - - $expectedMessage = - 'identifier' . PHP_EOL . - 'Expected: "expected"' . PHP_EOL . - ' but: was "actual"'; - - try { - \Hamcrest\MatcherAssert::assertThat('identifier', $actual, equalTo($expected)); - self::fail('expected assertion failure'); - } catch (\Hamcrest\AssertionError $ex) { - self::assertEquals($expectedMessage, $ex->getMessage()); - self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); - } - } - - public function testAssertThatWithNoArgsThrowsErrorAndDoesntIncrementCount() - { - try { - \Hamcrest\MatcherAssert::assertThat(); - self::fail('expected invalid argument exception'); - } catch (\InvalidArgumentException $ex) { - self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); - } - } - - public function testAssertThatWithFourArgsThrowsErrorAndDoesntIncrementCount() - { - try { - \Hamcrest\MatcherAssert::assertThat(1, 2, 3, 4); - self::fail('expected invalid argument exception'); - } catch (\InvalidArgumentException $ex) { - self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); - } - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php deleted file mode 100644 index 987d552..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php +++ /dev/null @@ -1,27 +0,0 @@ -assertTrue($p->matches(1.0)); - $this->assertTrue($p->matches(0.5)); - $this->assertTrue($p->matches(1.5)); - - $this->assertDoesNotMatch($p, 2.0, 'too large'); - $this->assertMismatchDescription('<2F> differed by <0.5F>', $p, 2.0); - $this->assertDoesNotMatch($p, 0.0, 'number too small'); - $this->assertMismatchDescription('<0F> differed by <0.5F>', $p, 0.0); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php deleted file mode 100644 index a4c94d3..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php +++ /dev/null @@ -1,41 +0,0 @@ -_text = $text; - } - - public function describeTo(\Hamcrest\Description $description) - { - $description->appendText($this->_text); - } -} - -class StringDescriptionTest extends \PhpUnit_Framework_TestCase -{ - - private $_description; - - public function setUp() - { - $this->_description = new \Hamcrest\StringDescription(); - } - - public function testAppendTextAppendsTextInformation() - { - $this->_description->appendText('foo')->appendText('bar'); - $this->assertEquals('foobar', (string) $this->_description); - } - - public function testAppendValueCanAppendTextTypes() - { - $this->_description->appendValue('foo'); - $this->assertEquals('"foo"', (string) $this->_description); - } - - public function testSpecialCharactersAreEscapedForStringTypes() - { - $this->_description->appendValue("foo\\bar\"zip\r\n"); - $this->assertEquals('"foo\\bar\\"zip\r\n"', (string) $this->_description); - } - - public function testIntegerValuesCanBeAppended() - { - $this->_description->appendValue(42); - $this->assertEquals('<42>', (string) $this->_description); - } - - public function testFloatValuesCanBeAppended() - { - $this->_description->appendValue(42.78); - $this->assertEquals('<42.78F>', (string) $this->_description); - } - - public function testNullValuesCanBeAppended() - { - $this->_description->appendValue(null); - $this->assertEquals('null', (string) $this->_description); - } - - public function testArraysCanBeAppended() - { - $this->_description->appendValue(array('foo', 42.78)); - $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); - } - - public function testObjectsCanBeAppended() - { - $this->_description->appendValue(new \stdClass()); - $this->assertEquals('', (string) $this->_description); - } - - public function testBooleanValuesCanBeAppended() - { - $this->_description->appendValue(false); - $this->assertEquals('', (string) $this->_description); - } - - public function testListsOfvaluesCanBeAppended() - { - $this->_description->appendValue(array('foo', 42.78)); - $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); - } - - public function testIterableOfvaluesCanBeAppended() - { - $items = new \ArrayObject(array('foo', 42.78)); - $this->_description->appendValue($items); - $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); - } - - public function testIteratorOfvaluesCanBeAppended() - { - $items = new \ArrayObject(array('foo', 42.78)); - $this->_description->appendValue($items->getIterator()); - $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); - } - - public function testListsOfvaluesCanBeAppendedManually() - { - $this->_description->appendValueList('@start@', '@sep@ ', '@end@', array('foo', 42.78)); - $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); - } - - public function testIterableOfvaluesCanBeAppendedManually() - { - $items = new \ArrayObject(array('foo', 42.78)); - $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items); - $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); - } - - public function testIteratorOfvaluesCanBeAppendedManually() - { - $items = new \ArrayObject(array('foo', 42.78)); - $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items->getIterator()); - $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); - } - - public function testSelfDescribingObjectsCanBeAppended() - { - $this->_description - ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('foo')) - ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('bar')) - ; - $this->assertEquals('foobar', (string) $this->_description); - } - - public function testSelfDescribingObjectsCanBeAppendedAsLists() - { - $this->_description->appendList('@start@', '@sep@ ', '@end@', array( - new \Hamcrest\SampleSelfDescriber('foo'), - new \Hamcrest\SampleSelfDescriber('bar') - )); - $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); - } - - public function testSelfDescribingObjectsCanBeAppendedAsIteratedLists() - { - $items = new \ArrayObject(array( - new \Hamcrest\SampleSelfDescriber('foo'), - new \Hamcrest\SampleSelfDescriber('bar') - )); - $this->_description->appendList('@start@', '@sep@ ', '@end@', $items); - $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); - } - - public function testSelfDescribingObjectsCanBeAppendedAsIterators() - { - $items = new \ArrayObject(array( - new \Hamcrest\SampleSelfDescriber('foo'), - new \Hamcrest\SampleSelfDescriber('bar') - )); - $this->_description->appendList('@start@', '@sep@ ', '@end@', $items->getIterator()); - $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php deleted file mode 100644 index 8d5c56b..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php +++ /dev/null @@ -1,86 +0,0 @@ -assertDoesNotMatch(emptyString(), null, 'null'); - } - - public function testEmptyDoesNotMatchZero() - { - $this->assertDoesNotMatch(emptyString(), 0, 'zero'); - } - - public function testEmptyDoesNotMatchFalse() - { - $this->assertDoesNotMatch(emptyString(), false, 'false'); - } - - public function testEmptyDoesNotMatchEmptyArray() - { - $this->assertDoesNotMatch(emptyString(), array(), 'empty array'); - } - - public function testEmptyMatchesEmptyString() - { - $this->assertMatches(emptyString(), '', 'empty string'); - } - - public function testEmptyDoesNotMatchNonEmptyString() - { - $this->assertDoesNotMatch(emptyString(), 'foo', 'non-empty string'); - } - - public function testEmptyHasAReadableDescription() - { - $this->assertDescription('an empty string', emptyString()); - } - - public function testEmptyOrNullMatchesNull() - { - $this->assertMatches(nullOrEmptyString(), null, 'null'); - } - - public function testEmptyOrNullMatchesEmptyString() - { - $this->assertMatches(nullOrEmptyString(), '', 'empty string'); - } - - public function testEmptyOrNullDoesNotMatchNonEmptyString() - { - $this->assertDoesNotMatch(nullOrEmptyString(), 'foo', 'non-empty string'); - } - - public function testEmptyOrNullHasAReadableDescription() - { - $this->assertDescription('(null or an empty string)', nullOrEmptyString()); - } - - public function testNonEmptyDoesNotMatchNull() - { - $this->assertDoesNotMatch(nonEmptyString(), null, 'null'); - } - - public function testNonEmptyDoesNotMatchEmptyString() - { - $this->assertDoesNotMatch(nonEmptyString(), '', 'empty string'); - } - - public function testNonEmptyMatchesNonEmptyString() - { - $this->assertMatches(nonEmptyString(), 'foo', 'non-empty string'); - } - - public function testNonEmptyHasAReadableDescription() - { - $this->assertDescription('a non-empty string', nonEmptyString()); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php deleted file mode 100644 index 0539fd5..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php +++ /dev/null @@ -1,40 +0,0 @@ -assertDescription( - 'equalToIgnoringCase("heLLo")', - equalToIgnoringCase('heLLo') - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php deleted file mode 100644 index 6c2304f..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php +++ /dev/null @@ -1,51 +0,0 @@ -_matcher = \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace( - "Hello World how\n are we? " - ); - } - - protected function createMatcher() - { - return $this->_matcher; - } - - public function testPassesIfWordsAreSameButWhitespaceDiffers() - { - assertThat('Hello World how are we?', $this->_matcher); - assertThat(" Hello \rWorld \t how are\nwe?", $this->_matcher); - } - - public function testFailsIfTextOtherThanWhitespaceDiffers() - { - assertThat('Hello PLANET how are we?', not($this->_matcher)); - assertThat('Hello World how are we', not($this->_matcher)); - } - - public function testFailsIfWhitespaceIsAddedOrRemovedInMidWord() - { - assertThat('HelloWorld how are we?', not($this->_matcher)); - assertThat('Hello Wo rld how are we?', not($this->_matcher)); - } - - public function testFailsIfMatchingAgainstNull() - { - assertThat(null, not($this->_matcher)); - } - - public function testHasAReadableDescription() - { - $this->assertDescription( - "equalToIgnoringWhiteSpace(\"Hello World how\\n are we? \")", - $this->_matcher - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php deleted file mode 100644 index 4891598..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php +++ /dev/null @@ -1,30 +0,0 @@ -assertDescription('a string matching "pattern"', matchesPattern('pattern')); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php deleted file mode 100644 index 3b5b08e..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php +++ /dev/null @@ -1,80 +0,0 @@ -_stringContains = \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase( - strtolower(self::EXCERPT) - ); - } - - protected function createMatcher() - { - return $this->_stringContains; - } - - public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring() - { - $this->assertTrue( - $this->_stringContains->matches(self::EXCERPT . 'END'), - 'should be true if excerpt at beginning' - ); - $this->assertTrue( - $this->_stringContains->matches('START' . self::EXCERPT), - 'should be true if excerpt at end' - ); - $this->assertTrue( - $this->_stringContains->matches('START' . self::EXCERPT . 'END'), - 'should be true if excerpt in middle' - ); - $this->assertTrue( - $this->_stringContains->matches(self::EXCERPT . self::EXCERPT), - 'should be true if excerpt is repeated' - ); - - $this->assertFalse( - $this->_stringContains->matches('Something else'), - 'should not be true if excerpt is not in string' - ); - $this->assertFalse( - $this->_stringContains->matches(substr(self::EXCERPT, 1)), - 'should not be true if part of excerpt is in string' - ); - } - - public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() - { - $this->assertTrue( - $this->_stringContains->matches(self::EXCERPT), - 'should be true if excerpt is entire string' - ); - } - - public function testEvaluatesToTrueIfArgumentContainsExactSubstring() - { - $this->assertTrue( - $this->_stringContains->matches(strtolower(self::EXCERPT)), - 'should be false if excerpt is entire string ignoring case' - ); - $this->assertTrue( - $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'), - 'should be false if excerpt is contained in string ignoring case' - ); - } - - public function testHasAReadableDescription() - { - $this->assertDescription( - 'a string containing in any case "' - . strtolower(self::EXCERPT) . '"', - $this->_stringContains - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php deleted file mode 100644 index 0be7062..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php +++ /dev/null @@ -1,42 +0,0 @@ -_m = \Hamcrest\Text\StringContainsInOrder::stringContainsInOrder(array('a', 'b', 'c')); - } - - protected function createMatcher() - { - return $this->_m; - } - - public function testMatchesOnlyIfStringContainsGivenSubstringsInTheSameOrder() - { - $this->assertMatches($this->_m, 'abc', 'substrings in order'); - $this->assertMatches($this->_m, '1a2b3c4', 'substrings separated'); - - $this->assertDoesNotMatch($this->_m, 'cab', 'substrings out of order'); - $this->assertDoesNotMatch($this->_m, 'xyz', 'no substrings in string'); - $this->assertDoesNotMatch($this->_m, 'ac', 'substring missing'); - $this->assertDoesNotMatch($this->_m, '', 'empty string'); - } - - public function testAcceptsVariableArguments() - { - $this->assertMatches(stringContainsInOrder('a', 'b', 'c'), 'abc', 'substrings as variable arguments'); - } - - public function testHasAReadableDescription() - { - $this->assertDescription( - 'a string containing "a", "b", "c" in order', - $this->_m - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php deleted file mode 100644 index 203fd91..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php +++ /dev/null @@ -1,86 +0,0 @@ -_stringContains = \Hamcrest\Text\StringContains::containsString(self::EXCERPT); - } - - protected function createMatcher() - { - return $this->_stringContains; - } - - public function testEvaluatesToTrueIfArgumentContainsSubstring() - { - $this->assertTrue( - $this->_stringContains->matches(self::EXCERPT . 'END'), - 'should be true if excerpt at beginning' - ); - $this->assertTrue( - $this->_stringContains->matches('START' . self::EXCERPT), - 'should be true if excerpt at end' - ); - $this->assertTrue( - $this->_stringContains->matches('START' . self::EXCERPT . 'END'), - 'should be true if excerpt in middle' - ); - $this->assertTrue( - $this->_stringContains->matches(self::EXCERPT . self::EXCERPT), - 'should be true if excerpt is repeated' - ); - - $this->assertFalse( - $this->_stringContains->matches('Something else'), - 'should not be true if excerpt is not in string' - ); - $this->assertFalse( - $this->_stringContains->matches(substr(self::EXCERPT, 1)), - 'should not be true if part of excerpt is in string' - ); - } - - public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() - { - $this->assertTrue( - $this->_stringContains->matches(self::EXCERPT), - 'should be true if excerpt is entire string' - ); - } - - public function testEvaluatesToFalseIfArgumentContainsSubstringIgnoringCase() - { - $this->assertFalse( - $this->_stringContains->matches(strtolower(self::EXCERPT)), - 'should be false if excerpt is entire string ignoring case' - ); - $this->assertFalse( - $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'), - 'should be false if excerpt is contained in string ignoring case' - ); - } - - public function testIgnoringCaseReturnsCorrectMatcher() - { - $this->assertTrue( - $this->_stringContains->ignoringCase()->matches('EXceRpT'), - 'should be true if excerpt is entire string ignoring case' - ); - } - - public function testHasAReadableDescription() - { - $this->assertDescription( - 'a string containing "' - . self::EXCERPT . '"', - $this->_stringContains - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php deleted file mode 100644 index fffa3c9..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php +++ /dev/null @@ -1,62 +0,0 @@ -_stringEndsWith = \Hamcrest\Text\StringEndsWith::endsWith(self::EXCERPT); - } - - protected function createMatcher() - { - return $this->_stringEndsWith; - } - - public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring() - { - $this->assertFalse( - $this->_stringEndsWith->matches(self::EXCERPT . 'END'), - 'should be false if excerpt at beginning' - ); - $this->assertTrue( - $this->_stringEndsWith->matches('START' . self::EXCERPT), - 'should be true if excerpt at end' - ); - $this->assertFalse( - $this->_stringEndsWith->matches('START' . self::EXCERPT . 'END'), - 'should be false if excerpt in middle' - ); - $this->assertTrue( - $this->_stringEndsWith->matches(self::EXCERPT . self::EXCERPT), - 'should be true if excerpt is at end and repeated' - ); - - $this->assertFalse( - $this->_stringEndsWith->matches('Something else'), - 'should be false if excerpt is not in string' - ); - $this->assertFalse( - $this->_stringEndsWith->matches(substr(self::EXCERPT, 0, strlen(self::EXCERPT) - 2)), - 'should be false if part of excerpt is at end of string' - ); - } - - public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() - { - $this->assertTrue( - $this->_stringEndsWith->matches(self::EXCERPT), - 'should be true if excerpt is entire string' - ); - } - - public function testHasAReadableDescription() - { - $this->assertDescription('a string ending with "EXCERPT"', $this->_stringEndsWith); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php deleted file mode 100644 index fc3761b..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php +++ /dev/null @@ -1,62 +0,0 @@ -_stringStartsWith = \Hamcrest\Text\StringStartsWith::startsWith(self::EXCERPT); - } - - protected function createMatcher() - { - return $this->_stringStartsWith; - } - - public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring() - { - $this->assertTrue( - $this->_stringStartsWith->matches(self::EXCERPT . 'END'), - 'should be true if excerpt at beginning' - ); - $this->assertFalse( - $this->_stringStartsWith->matches('START' . self::EXCERPT), - 'should be false if excerpt at end' - ); - $this->assertFalse( - $this->_stringStartsWith->matches('START' . self::EXCERPT . 'END'), - 'should be false if excerpt in middle' - ); - $this->assertTrue( - $this->_stringStartsWith->matches(self::EXCERPT . self::EXCERPT), - 'should be true if excerpt is at beginning and repeated' - ); - - $this->assertFalse( - $this->_stringStartsWith->matches('Something else'), - 'should be false if excerpt is not in string' - ); - $this->assertFalse( - $this->_stringStartsWith->matches(substr(self::EXCERPT, 1)), - 'should be false if part of excerpt is at start of string' - ); - } - - public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() - { - $this->assertTrue( - $this->_stringStartsWith->matches(self::EXCERPT), - 'should be true if excerpt is entire string' - ); - } - - public function testHasAReadableDescription() - { - $this->assertDescription('a string starting with "EXCERPT"', $this->_stringStartsWith); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php deleted file mode 100644 index d13c24d..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php +++ /dev/null @@ -1,35 +0,0 @@ -assertDescription('an array', arrayValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', arrayValue(), null); - $this->assertMismatchDescription('was a string "foo"', arrayValue(), 'foo'); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php deleted file mode 100644 index 24309fc..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php +++ /dev/null @@ -1,35 +0,0 @@ -assertDescription('a boolean', booleanValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', booleanValue(), null); - $this->assertMismatchDescription('was a string "foo"', booleanValue(), 'foo'); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php deleted file mode 100644 index 5098e21..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php +++ /dev/null @@ -1,103 +0,0 @@ -=')) { - $this->markTestSkipped('Closures require php 5.3'); - } - eval('assertThat(function () {}, callableValue());'); - } - - public function testEvaluatesToTrueIfArgumentImplementsInvoke() - { - if (!version_compare(PHP_VERSION, '5.3', '>=')) { - $this->markTestSkipped('Magic method __invoke() requires php 5.3'); - } - assertThat($this, callableValue()); - } - - public function testEvaluatesToFalseIfArgumentIsInvalidFunctionName() - { - if (function_exists('not_a_Hamcrest_function')) { - $this->markTestSkipped('Function "not_a_Hamcrest_function" must not exist'); - } - - assertThat('not_a_Hamcrest_function', not(callableValue())); - } - - public function testEvaluatesToFalseIfArgumentIsInvalidStaticMethodCallback() - { - assertThat( - array('Hamcrest\Type\IsCallableTest', 'noMethod'), - not(callableValue()) - ); - } - - public function testEvaluatesToFalseIfArgumentIsInvalidInstanceMethodCallback() - { - assertThat(array($this, 'noMethod'), not(callableValue())); - } - - public function testEvaluatesToFalseIfArgumentDoesntImplementInvoke() - { - assertThat(new \stdClass(), not(callableValue())); - } - - public function testEvaluatesToFalseIfArgumentDoesntMatchType() - { - assertThat(false, not(callableValue())); - assertThat(5.2, not(callableValue())); - } - - public function testHasAReadableDescription() - { - $this->assertDescription('a callable', callableValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription( - 'was a string "invalid-function"', - callableValue(), - 'invalid-function' - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php deleted file mode 100644 index 85c2a96..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php +++ /dev/null @@ -1,35 +0,0 @@ -assertDescription('a double', doubleValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', doubleValue(), null); - $this->assertMismatchDescription('was a string "foo"', doubleValue(), 'foo'); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php deleted file mode 100644 index ce5a51a..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php +++ /dev/null @@ -1,36 +0,0 @@ -assertDescription('an integer', integerValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', integerValue(), null); - $this->assertMismatchDescription('was a string "foo"', integerValue(), 'foo'); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php deleted file mode 100644 index 1fd83ef..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php +++ /dev/null @@ -1,53 +0,0 @@ -assertDescription('a number', numericValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', numericValue(), null); - $this->assertMismatchDescription('was a string "foo"', numericValue(), 'foo'); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php deleted file mode 100644 index a3b617c..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php +++ /dev/null @@ -1,34 +0,0 @@ -assertDescription('an object', objectValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', objectValue(), null); - $this->assertMismatchDescription('was a string "foo"', objectValue(), 'foo'); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php deleted file mode 100644 index d6ea534..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php +++ /dev/null @@ -1,34 +0,0 @@ -assertDescription('a resource', resourceValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', resourceValue(), null); - $this->assertMismatchDescription('was a string "foo"', resourceValue(), 'foo'); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php deleted file mode 100644 index 72a188d..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php +++ /dev/null @@ -1,39 +0,0 @@ -assertDescription('a scalar', scalarValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', scalarValue(), null); - $this->assertMismatchDescription('was an array ["foo"]', scalarValue(), array('foo')); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php deleted file mode 100644 index 557d591..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php +++ /dev/null @@ -1,35 +0,0 @@ -assertDescription('a string', stringValue()); - } - - public function testDecribesActualTypeInMismatchMessage() - { - $this->assertMismatchDescription('was null', stringValue(), null); - $this->assertMismatchDescription('was a double <5.2F>', stringValue(), 5.2); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php deleted file mode 100644 index 0c2cd04..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php +++ /dev/null @@ -1,80 +0,0 @@ -assertSame($matcher, $newMatcher); - } - - public function testWrapValueWithIsEqualWrapsPrimitive() - { - $matcher = \Hamcrest\Util::wrapValueWithIsEqual('foo'); - $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matcher); - $this->assertTrue($matcher->matches('foo')); - } - - public function testCheckAllAreMatchersAcceptsMatchers() - { - \Hamcrest\Util::checkAllAreMatchers(array( - new \Hamcrest\Text\MatchesPattern('/fo+/'), - new \Hamcrest\Core\IsEqual('foo'), - )); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testCheckAllAreMatchersFailsForPrimitive() - { - \Hamcrest\Util::checkAllAreMatchers(array( - new \Hamcrest\Text\MatchesPattern('/fo+/'), - 'foo', - )); - } - - private function callAndAssertCreateMatcherArray($items) - { - $matchers = \Hamcrest\Util::createMatcherArray($items); - $this->assertInternalType('array', $matchers); - $this->assertSameSize($items, $matchers); - foreach ($matchers as $matcher) { - $this->assertInstanceOf('\Hamcrest\Matcher', $matcher); - } - - return $matchers; - } - - public function testCreateMatcherArrayLeavesMatchersUntouched() - { - $matcher = new \Hamcrest\Text\MatchesPattern('/fo+/'); - $items = array($matcher); - $matchers = $this->callAndAssertCreateMatcherArray($items); - $this->assertSame($matcher, $matchers[0]); - } - - public function testCreateMatcherArrayWrapsPrimitiveWithIsEqualMatcher() - { - $matchers = $this->callAndAssertCreateMatcherArray(array('foo')); - $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]); - $this->assertTrue($matchers[0]->matches('foo')); - } - - public function testCreateMatcherArrayDoesntModifyOriginalArray() - { - $items = array('foo'); - $this->callAndAssertCreateMatcherArray($items); - $this->assertSame('foo', $items[0]); - } - - public function testCreateMatcherArrayUnwrapsSingleArrayElement() - { - $matchers = $this->callAndAssertCreateMatcherArray(array(array('foo'))); - $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]); - $this->assertTrue($matchers[0]->matches('foo')); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php deleted file mode 100644 index 6774887..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php +++ /dev/null @@ -1,198 +0,0 @@ - - - - alice - Alice Frankel - admin - - - bob - Bob Frankel - user - - - charlie - Charlie Chan - user - - -XML; - self::$doc = new \DOMDocument(); - self::$doc->loadXML(self::$xml); - - self::$html = << - - Home Page - - -

Heading

-

Some text

- - -HTML; - } - - protected function createMatcher() - { - return \Hamcrest\Xml\HasXPath::hasXPath('/users/user'); - } - - public function testMatchesWhenXPathIsFound() - { - assertThat('one match', self::$doc, hasXPath('user[id = "bob"]')); - assertThat('two matches', self::$doc, hasXPath('user[role = "user"]')); - } - - public function testDoesNotMatchWhenXPathIsNotFound() - { - assertThat( - 'no match', - self::$doc, - not(hasXPath('user[contains(id, "frank")]')) - ); - } - - public function testMatchesWhenExpressionWithoutMatcherEvaluatesToTrue() - { - assertThat( - 'one match', - self::$doc, - hasXPath('count(user[id = "bob"])') - ); - } - - public function testDoesNotMatchWhenExpressionWithoutMatcherEvaluatesToFalse() - { - assertThat( - 'no matches', - self::$doc, - not(hasXPath('count(user[id = "frank"])')) - ); - } - - public function testMatchesWhenExpressionIsEqual() - { - assertThat( - 'one match', - self::$doc, - hasXPath('count(user[id = "bob"])', 1) - ); - assertThat( - 'two matches', - self::$doc, - hasXPath('count(user[role = "user"])', 2) - ); - } - - public function testDoesNotMatchWhenExpressionIsNotEqual() - { - assertThat( - 'no match', - self::$doc, - not(hasXPath('count(user[id = "frank"])', 2)) - ); - assertThat( - 'one match', - self::$doc, - not(hasXPath('count(user[role = "admin"])', 2)) - ); - } - - public function testMatchesWhenContentMatches() - { - assertThat( - 'one match', - self::$doc, - hasXPath('user/name', containsString('ice')) - ); - assertThat( - 'two matches', - self::$doc, - hasXPath('user/role', equalTo('user')) - ); - } - - public function testDoesNotMatchWhenContentDoesNotMatch() - { - assertThat( - 'no match', - self::$doc, - not(hasXPath('user/name', containsString('Bobby'))) - ); - assertThat( - 'no matches', - self::$doc, - not(hasXPath('user/role', equalTo('owner'))) - ); - } - - public function testProvidesConvenientShortcutForHasXPathEqualTo() - { - assertThat('matches', self::$doc, hasXPath('count(user)', 3)); - assertThat('matches', self::$doc, hasXPath('user[2]/id', 'bob')); - } - - public function testProvidesConvenientShortcutForHasXPathCountEqualTo() - { - assertThat('matches', self::$doc, hasXPath('user[id = "charlie"]', 1)); - } - - public function testMatchesAcceptsXmlString() - { - assertThat('accepts XML string', self::$xml, hasXPath('user')); - } - - public function testMatchesAcceptsHtmlString() - { - assertThat('accepts HTML string', self::$html, hasXPath('body/h1', 'Heading')); - } - - public function testHasAReadableDescription() - { - $this->assertDescription( - 'XML or HTML document with XPath "/users/user"', - hasXPath('/users/user') - ); - $this->assertDescription( - 'XML or HTML document with XPath "count(/users/user)" <2>', - hasXPath('/users/user', 2) - ); - $this->assertDescription( - 'XML or HTML document with XPath "/users/user/name"' - . ' a string starting with "Alice"', - hasXPath('/users/user/name', startsWith('Alice')) - ); - } - - public function testHasAReadableMismatchDescription() - { - $this->assertMismatchDescription( - 'XPath returned no results', - hasXPath('/users/name'), - self::$doc - ); - $this->assertMismatchDescription( - 'XPath expression result was <3F>', - hasXPath('/users/user', 2), - self::$doc - ); - $this->assertMismatchDescription( - 'XPath returned ["alice", "bob", "charlie"]', - hasXPath('/users/user/id', 'Frank'), - self::$doc - ); - } -} diff --git a/vendor/hamcrest/hamcrest-php/tests/bootstrap.php b/vendor/hamcrest/hamcrest-php/tests/bootstrap.php deleted file mode 100644 index bc4958d..0000000 --- a/vendor/hamcrest/hamcrest-php/tests/bootstrap.php +++ /dev/null @@ -1,11 +0,0 @@ - - - - . - - - - - - ../hamcrest - - - diff --git a/vendor/mockery/mockery b/vendor/mockery/mockery deleted file mode 160000 index 7886b29..0000000 --- a/vendor/mockery/mockery +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7886b297ed4a9a0b29461c9efee366c9b1a0484c From c2bb58fbd9c596522dabe500065aaa04a5d0ced8 Mon Sep 17 00:00:00 2001 From: metaclassing <1027733+metaclassing@users.noreply.github.com> Date: Fri, 18 May 2018 11:57:47 -0500 Subject: [PATCH 4/5] Delete composer.lock --- composer.lock | 136 -------------------------------------------------- 1 file changed, 136 deletions(-) delete mode 100644 composer.lock diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 13b73c0..0000000 --- a/composer.lock +++ /dev/null @@ -1,136 +0,0 @@ -{ - "_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": "0b56668dbf486a399bdf1b739c157100", - "content-hash": "18ae8f1ff0d3238cb784b3de5ba7273a", - "packages": [], - "packages-dev": [ - { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "hamcrest" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "time": "2016-01-20 08:20:44" - }, - { - "name": "mockery/mockery", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "7886b297ed4a9a0b29461c9efee366c9b1a0484c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/7886b297ed4a9a0b29461c9efee366c9b1a0484c", - "reference": "7886b297ed4a9a0b29461c9efee366c9b1a0484c", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "~2.0", - "lib-pcre": ">=7.0", - "php": ">=5.6.0" - }, - "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework", - "homepage": "https://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "time": "2018-01-22 09:54:57" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "mockery/mockery": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.3.2" - }, - "platform-dev": [] -} From 5936596530a3104544aff85426f81787b35ec1c8 Mon Sep 17 00:00:00 2001 From: metaclassing Date: Fri, 18 May 2018 11:58:30 -0500 Subject: [PATCH 5/5] ignored this turd --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4fbcdad..e3ac13b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ library/Vmwarephp/.wsdl_class_map.cache library/Vmwarephp/.clone_ticket.cache /nbproject/private/ vendor +composer.lock