public function testUpdate() { $Type = new Type(1); $Type->name = "Test Type Updated"; $updated_name = $Type->name; $Type->commit(); // Reload the operator $Type = new Type(1); $this->assertEquals($updated_name, $Type->name); }
public function test_break_validate() { $this->setExpectedException("Exception", "Cannot validate changes to this loco type: name cannot be empty"); $Type = new Type(); $Type->commit(); }
/** * @depends testAddLocoClass */ public function testGetClassByType($class_id) { $Class = LocosFactory::CreateLocoClass($class_id); $Type = new Type($Class->type_id); foreach ($Type->getClasses() as $row) { $this->assertEquals($row['type']['id'], $Type->id); } }