diff --git a/classes/PostFixtures.inc b/classes/PostFixtures.inc index b3d9bbc..4f980d5 100644 --- a/classes/PostFixtures.inc +++ b/classes/PostFixtures.inc @@ -1 +1,12 @@ pf = new PostFixtures(); + } + + function providerTestParseJSON() { + return array( + array(false, false), + array('', false), + array('{]', false), + array('{}', array()), + array('[]', array()) + ); + } + + /** + * @dataProvider providerTestParseJSON + */ + function testParseJSON($input, $expected_output) { + $this->assertEquals($expected_output, $this->pf->parse_json($input)); + } +}