/** * Adds general order sections to the fields displayed * See view_transaction() * @param array $sections Sections already being displayed * @param APP_Order $order Order being processed * @return array $sections with added sections */ public function display_order($sections, $order) { $sections['General Information'] = array('ID' => $order->get_id()); $sections['Money & Currency'] = array('Currency' => APP_Currencies::get_name($order->get_currency()) . ' (' . $order->get_currency() . ')', 'Total' => APP_Currencies::get_price($order->get_total(), $order->get_currency())); return $sections; }
public function test_price() { $price = APP_Currencies::get_price(5, 'USD'); $this->assertEquals('$5', $price); }