function testRender2() { $paint = new Elite_Vafpaint_Model_Paint('123', 'Artic Ice Blue', self::COLOR); $html = $paint->render(); $html = explode("\n", $html); $this->assertEquals("<br />Artic Ice Blue (123)", $html[1]); }
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); }