Skip to content

Instantly share code, notes, and snippets.

@SammyK
Created April 14, 2015 03:45
Show Gist options
  • Save SammyK/69bbcf231327554eec0e to your computer and use it in GitHub Desktop.
Save SammyK/69bbcf231327554eec0e to your computer and use it in GitHub Desktop.
The test we wrote for Chicago PHP. The file was located at `ext/json/tests/errors_null.phpt`
--TEST--
Checks for return types on error
--SKIPIF--
<?php
if (!extension_loaded('json')) die('skip: json extension not available');
?>
--FILE--
<?php
var_dump(json_last_error('foo'));
?>
--EXPECTF--
Warning: json_last_error() expects exactly 0 parameters, 1 given in %s on line %d
NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment