public function testsave() { $aor_Report = new AOR_Report(); //populate value for aor_fields related/child object $_POST['aor_fields_field'][] = 'last_name'; $_POST['aor_fields_name'][] = 'test'; $_POST['aor_fields_module_path'][] = 'contacts'; $_POST['aor_fields_display'][] = '1'; $_POST['aor_fields_link'][] = '1'; $_POST['aor_fields_label'][] = 'test_label'; $_POST['aor_fields_field_function'][] = 'count'; $_POST['aor_fields_total'][] = 'total'; $_POST['aor_fields_group_by'][] = '1'; $_POST['aor_fields_group_order'][] = 'desc'; $_POST['aor_fields_group_display'][] = '1'; //populate values for aor_chart related/child object $_POST['aor_chart_id'] = array('test' => ''); $_POST['aor_chart_title'] = array('test' => 'test'); $_POST['aor_chart_type'] = array('test' => 'bar'); $_POST['aor_chart_x_field'] = array('test' => '1'); $_POST['aor_chart_y_field'] = array('test' => '2'); //populate aor_Report object values $aor_Report->name = 'test'; $aor_Report->description = 'test text'; $aor_Report->save(); //test for record ID to verify that record is saved $this->assertTrue(isset($aor_Report->id)); $this->assertEquals(36, strlen($aor_Report->id)); //mark the record as deleted for cleanup $aor_Report->mark_deleted($aor_Report->id); unset($aor_Report); }