function testCode()
 {
     $paint = new Elite_Vafpaint_Model_Paint(self::CODE, '', '');
     $this->assertEquals(self::CODE, $paint->getCode());
 }
Exemplo n.º 2
0
 function addPaintCode(VF_Vehicle $vehicle, Elite_Vafpaint_Model_Paint $paint)
 {
     $schema = VF_Singleton::getInstance()->schema();
     $sql = sprintf("\n            REPLACE INTO\n                `elite_mapping_paint`\n            ( `mapping_id`, `code`, `name`, `color` )\n                VALUES\n            ( %d, %s, %s, %s )\n            ", (int) $vehicle->getId(), $this->getReadAdapter()->quote($paint->getCode()), $this->getReadAdapter()->quote($paint->getName()), $this->getReadAdapter()->quote($paint->getColor()));
     $this->query($sql);
 }