/** * Tests the jsonSerialize method. * * Note, this is not completely backward compatible. Previous this would just return the class name. * * @return void * * @covers JData::jsonSerialize * @since 12.3 */ public function testJsonSerialize() { $this->assertEquals('{}', json_encode($this->_instance->jsonSerialize()), 'Empty object.'); $this->_instance->bind(array('title' => 'Simple Object')); $this->assertEquals('{"title":"Simple Object"}', json_encode($this->_instance->jsonSerialize()), 'Simple object.'); }