1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-19 11:31:36 +02:00

Fix: isJSON now returns false for empty strings

This commit is contained in:
Daniel St. Jules
2015-09-09 21:24:11 -07:00
parent c5f370c46d
commit 4673754054
3 changed files with 17 additions and 3 deletions

View File

@@ -2066,7 +2066,13 @@ class StringyTestCase extends PHPUnit_Framework_TestCase
public function isJsonProvider()
{
return array(
array(true, ''),
array(false, ''),
array(false, ' '),
array(true, 'null'),
array(true, 'true'),
array(true, 'false'),
array(true, '[]'),
array(true, '{}'),
array(true, '123'),
array(true, '{"foo": "bar"}'),
array(false, '{"foo":"bar",}'),