public static function Framework_Constraint_JsonMatches_ErrorMessageProviderTest::determineJsonErrorDataprovider

File

drupal/core/vendor/phpunit/phpunit/Tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php, line 82

Class

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

Code

public static function determineJsonErrorDataprovider() {
  return array(
    'JSON_ERROR_NONE' => array(
      NULL,
      'json_error_none',
      '',
    ),
    'JSON_ERROR_DEPTH' => array(
      'Maximum stack depth exceeded',
      JSON_ERROR_DEPTH,
      '',
    ),
    'prefixed JSON_ERROR_DEPTH' => array(
      'TUX: Maximum stack depth exceeded',
      JSON_ERROR_DEPTH,
      'TUX: ',
    ),
    'JSON_ERROR_STATE_MISMatch' => array(
      'Underflow or the modes mismatch',
      JSON_ERROR_STATE_MISMATCH,
      '',
    ),
    'JSON_ERROR_CTRL_CHAR' => array(
      'Unexpected control character found',
      JSON_ERROR_CTRL_CHAR,
      '',
    ),
    'JSON_ERROR_SYNTAX' => array(
      'Syntax error, malformed JSON',
      JSON_ERROR_SYNTAX,
      '',
    ),
    'JSON_ERROR_UTF8`' => array(
      'Malformed UTF-8 characters, possibly incorrectly encoded',
      JSON_ERROR_UTF8,
      '',
    ),
    'Invalid error indicator' => array(
      'Unknown error',
      55,
      '',
    ),
  );
}