/** * @dataProvider testFormatMethodDataProvider */ public function testFormatMethod($showSymbol, $value, $symbol, $precision, $expected) { $factory = new DefaultFactory(); $factory->getFormatter()->setPrecision($precision); $factory->getFormatter()->setShowSymbolMode($showSymbol); $scale = $factory->build($value, $symbol); $this->assertEquals($expected, (string) $scale); }
public function setPrecision($precision) { $this->formatter = clone $this->factory->getFormatter(); $this->formatter->setPrecision($precision); return $this; }
public function testGetSupportedScales() { $this->assertInstanceOf('Temperature\\Scales\\SuppoertedScalesCollection', $this->factory->getSupportedScales()); }