/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage The parameter "value" must be a numeric, but it is of type string. */ public function testFormatWithInvalidValue() { $this->formatter->formatShort('test', (new ProductUnit())->setCode('item')); }
/** * @param float|integer $value * @param ProductUnit $unit * @return string */ public function formatShort($value, ProductUnit $unit) { return $this->formatter->formatShort($value, $unit); }