public function testAddType() { $Type = new Type(); $Type->name = self::TYPE; $Type->commit(); $this->assertFalse(!filter_var($Type->id, FILTER_VALIDATE_INT)); return $Type->id; }
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(); }