pf = new PostFixtures(); } function providerTestParseJSON() { return array( array(false, false), array('', false), array('{]', false), array('{}', array()), array('[]', array()), array('["test", "test2"]', array('test', 'test2')), array('{"one": "test", "two": "test2"}', array('test', 'test2')) ); } /** * @dataProvider providerTestParseJSON */ function testParseJSON($input, $expected_output) { $this->assertEquals($expected_output, $this->pf->parse_json($input)); } }