public function Framework_Constraint_JsonMatchesTest::testToString

@covers PHPUnit_Framework_Constraint_JsonMatches::toString

File

drupal/core/vendor/phpunit/phpunit/Tests/Framework/Constraint/JsonMatchesTest.php, line 71

Class

Framework_Constraint_JsonMatchesTest
@package PHPUnit @author Bastian Feder <php@bastian-feder.de> @copyright 2011 Bastian Feder <php@bastian-feder.de> @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause @link …

Code

public function testToString() {
  $jsonValue = json_encode(array(
    'Mascott' => 'Tux',
  ));
  $constraint = new PHPUnit_Framework_Constraint_JsonMatches($jsonValue);
  $this
    ->assertEquals('matches JSON string "' . $jsonValue . '"', $constraint
    ->toString());
}