public function test_creation() { $x = new Save(); $x->characterId = $this->id; $y = new Ability(); $allSaves = $x->get_all_saves($this->dbObj); foreach ($allSaves as $k => $v) { $data = array('character_id' => $this->id, 'save_id' => $v['save_id'], 'base_mod' => 1, 'magic_mod' => 2, 'misc_mod' => 3, 'temp_mod' => 4); $res = $x->create($this->dbObj, $data); $this->assertTrue(is_numeric($res)); } $storedData = $x->load($this->dbObj); foreach ($storedData as $k => $v) { $this->assertEquals($v, $storedData[$k], "Mismatched values for '" . $k . "'... expected (" . $v . "), got (" . $storedData[$k] . ")"); } }