/**
* Tests that a nested key on a previously saved document gets updated properly.
*/
public function testExistingNestedKeyOverwrite() {
$doc = new Document(array('model' => $this->_model));
$doc->{'this.that'} = 'value1';
$this->assertEqual(array('this' => array('that' => 'value1')), $doc->data());
$result = Exporter::get('create', $doc->export());
$this->assertEqual(array('create' => array('this' => array('that' => 'value1'))), $result);
$doc->sync();
$doc->{'this.that'} = 'value2';
$this->assertEqual(array('this' => array('that' => 'value2')), $doc->data());
$result = Exporter::get('update', $doc->export());
$this->assertEqual(array('update' => array('this.that' => 'value2')), $result);
}