2017 © Pedro Peláez
 

library phpspec-json-matcher

PhpSpec matcher 'shouldReturnJson'

image

edounar/phpspec-json-matcher

PhpSpec matcher 'shouldReturnJson'

  • Saturday, January 31, 2015
  • by eugene.dounar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

JSON matcher for phpspec

PhpSpec matcher 'shouldReturnJson'., (*1)

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, (*2)

Installation

Enable the extension in phpspec.yml, (*3)

extensions:
  - EDounar\PhpSpec\JsonMatcher\Extension       

The Versions

31/01 2015

dev-master

9999999-dev https://github.com/edounar/phpspec-json-matcher

PhpSpec matcher 'shouldReturnJson'

  Sources   Download

MIT

The Requires

 

by Eugene Dounar

json phpspec

31/01 2015

1.0.0

1.0.0.0 https://github.com/edounar/phpspec-json-matcher

PhpSpec matcher 'shouldReturnJson'

  Sources   Download

MIT

The Requires

 

by Eugene Dounar

json phpspec