Ejemplo n.º 1
0
 public function testAddType()
 {
     $Type = new Type();
     $Type->name = self::TYPE;
     $Type->commit();
     $this->assertFalse(!filter_var($Type->id, FILTER_VALIDATE_INT));
     return $Type->id;
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 public function test_break_validate()
 {
     $this->setExpectedException("Exception", "Cannot validate changes to this loco type: name cannot be empty");
     $Type = new Type();
     $Type->commit();
 }