/**
  * @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);
 }
Example #2
0
 public function setPrecision($precision)
 {
     $this->formatter = clone $this->factory->getFormatter();
     $this->formatter->setPrecision($precision);
     return $this;
 }
Example #3
0
 public function testGetSupportedScales()
 {
     $this->assertInstanceOf('Temperature\\Scales\\SuppoertedScalesCollection', $this->factory->getSupportedScales());
 }