diff --git a/README.md b/README.md index fd20ac78..266e2527 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ # PHP Matcher -Library created for testing all kinds of JSON/XML/TXT/Scalar values against patterns. +Library created for testing all kinds of JSON/XML/TXT/Scalar values against patterns. ```php PHPMatcher::match($value = '{"foo": "bar"}', $pattern = '{"foo": "@string@"}'); ``` -It was built to simplify API's functional testing. +It was built to simplify API's functional testing. * [![Build Status](https://travis-ci.org/coduo/php-matcher.svg)](https://travis-ci.org/coduo/php-matcher) - master (3.2.*) * [![Build Status](https://travis-ci.org/coduo/php-matcher.svg?branch=3.1)](https://travis-ci.org/coduo/php-matcher) - 3.1.* [Readme for master (3.2) version](https://github.com/coduo/php-matcher/tree/master/README.md) -[Readme for 3.1 version](https://github.com/coduo/php-matcher/tree/3.1/README.md) +[Readme for 3.1 version](https://github.com/coduo/php-matcher/tree/3.1/README.md) ## Installation @@ -32,7 +32,7 @@ composer require --dev "coduo/php-matcher" use Coduo\PHPMatcher\PHPMatcher; -if (!PHPMatcher::match("lorem ipsum dolor", "@string@", $error)) { +if (!PHPMatcher::match("lorem ipsum dolor", "@string@", $error)) { echo $error; // in case of error message is set on $error variable via reference } @@ -198,7 +198,7 @@ $matcher->match(array("bar"), "@wildcard@"); $matcher->match(new \stdClass, "@wildcard@"); ``` -### Expression matching +### Expression matching ```php createMatcher(); $matcher->match('9f4db639-0e87-4367-9beb-d64e3f42ae18', '@uuid@'); ``` -### Array matching +### Array matching ```php match( ), '@boolean@', '@double@' - ) + ) ); ``` -### Json matching +### Json matching ```php getMock(Foo::class); +$mock = $this->createMock(Foo::class); $mock->method('bar') ->with($this->matchesPattern('@string@')) ->willReturn('foo'); @@ -450,4 +451,3 @@ This library is distributed under the MIT license. Please see the LICENSE file. This lib was inspired by [JSON Expressions gem](https://github.com/chancancode/json_expressions) && [Behat RestExtension ](https://github.com/jakzal/RestExtension) -