/** * Returns profit margin in a percentage * * @return string */ public function getProfitMarginPercentage() { return FormatUtils::formatPercentage($this->getProfitMargin()); }
public function testFormatPercentage() { $percent = 0.4; $percent = FormatUtils::formatPercentage($percent); $this->assertEquals($percent, "40.00%"); }