Skip to content

eugene-dounar/phpspec-json-matcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON matcher for phpspec

PhpSpec matcher 'shouldReturnJson'.

Usage

class SomeSpec extends ObjectBehavior
{
    it_should_return_json()
    {
        $this->getJson()->shouldReturnJson('
            {
                "items": ['a', 'b', 'c']
            }
        ');
    }
}

Run phpspec with -v flag to see the difference between actual and expected JSON strings

Installation

Enable the extension in phpspec.yml

extensions:
  - EDounar\PhpSpec\JsonMatcher\Extension       

About

PhpSpec matcher 'shouldReturnJson'

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages