public function testWithArraySchema()
{
$model = $this->_model;
$model::schema(array('_id' => array('type' => 'id'), 'list' => array('type' => 'string', 'array' => true), 'obj.foo' => array('type' => 'string'), 'obj.bar' => array('type' => 'string')));
$doc = new Document(compact('model'));
$doc->list[] = array('foo' => '!!', 'bar' => '??');
$data = array('list' => array(array('foo' => '!!', 'bar' => '??')));
$this->assertEqual($data, $doc->data());
$result = Exporter::get('create', $doc->export());
$this->assertEqual($data, $result['create']);
$result = Exporter::get('update', $doc->export());
$this->assertEqual($data, $result['update']);
$doc = new Document(compact('model'));
$doc->list = array();
$doc->list[] = array('foo' => '!!', 'bar' => '??');
$data = array('list' => array(array('foo' => '!!', 'bar' => '??')));
$this->assertEqual($data, $doc->data());
$result = Exporter::get('create', $doc->export());
$this->assertEqual($result['create'], $data);
$result = Exporter::get('update', $doc->export());
$this->assertEqual($result['update'], $data);
}