public function test_break_width_imperial() { $this->setExpectedException("Exception", "Could not create an imperial width for this gauge"); $Gauge = new Gauge(); $Gauge->name = "Test"; $Gauge->width_metric = "sdfsadg"; $Gauge->commit(); }
/** * Set the locomotive gauge * @since Version 3.9.1 * @param \Railpage\Locos\Gauge $Gauge * @return \Railpage\Locos\Locomotive */ public function setGauge(Gauge $Gauge) { $this->gauge_id = $Gauge->id; $this->gauge = $Gauge->getArray(); $this->gauge_formatted = (string) $Gauge; return $this; }
public function testAddGauge() { $Gauge = new Gauge(); $Gauge->name = "Broad"; $Gauge->width_metric = "1600"; $Gauge->commit(); $this->assertFalse(!filter_var($Gauge->id, FILTER_VALIDATE_INT)); return $Gauge->id; }