public static function Framework_Constraint_JsonMatchesTest::evaluateDataprovider in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php \Framework_Constraint_JsonMatchesTest::evaluateDataprovider()
File
- vendor/
phpunit/ phpunit/ tests/ Framework/ Constraint/ JsonMatchesTest.php, line 39
Class
- Framework_Constraint_JsonMatchesTest
- @since File available since Release 3.7.0
Code
public static function evaluateDataprovider() {
return array(
'valid JSON' => array(
true,
json_encode(array(
'Mascott' => 'Tux',
)),
json_encode(array(
'Mascott' => 'Tux',
)),
),
'error syntax' => array(
false,
'{"Mascott"::}',
json_encode(array(
'Mascott' => 'Tux',
)),
),
'error UTF-8' => array(
false,
json_encode('\\xB1\\x31'),
json_encode(array(
'Mascott' => 'Tux',
)),
),
'invalid JSON in class instantiation' => array(
false,
json_encode(array(
'Mascott' => 'Tux',
)),
'{"Mascott"::}',
),
);
}