/** * Tests Varien_Object->toJson() */ public function testToJson() { $this->_object->setData(array('key1' => 'value1', 'key2' => 'value2')); $this->assertEquals('{"key1":"value1","key2":"value2"}', $this->_object->toJson()); $this->assertEquals('{"key1":"value1"}', $this->_object->toJson(array('key1'))); $this->assertEquals('{"key1":"value1","key":null}', $this->_object->__toJson(array('key1', 'key'))); }