You are here

public static function PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/Assert.php \PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString()

Asserts that two given JSON encoded objects or arrays are equal.

Parameters

string $expectedJson:

string $actualJson:

string $message:

2 calls to PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString()
Framework_AssertTest::testAssertJsonStringEqualsJsonString in vendor/phpunit/phpunit/tests/Framework/AssertTest.php
@covers PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString
Framework_AssertTest::testAssertJsonStringEqualsJsonStringErrorRaised in vendor/phpunit/phpunit/tests/Framework/AssertTest.php
@dataProvider validInvalidJsonDataprovider @covers PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString

File

vendor/phpunit/phpunit/src/Framework/Assert.php, line 2209

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

public static function assertJsonStringEqualsJsonString($expectedJson, $actualJson, $message = '') {
  self::assertJson($expectedJson, $message);
  self::assertJson($actualJson, $message);
  $expected = json_decode($expectedJson);
  $actual = json_decode($actualJson);
  self::assertEquals($expected, $actual, $message);
}