コード例 #1
0
    /**
     * @dataProvider currencyProvider
     */
    public function testSettersProvideDefaults($locale, $currencyCode, $showDecimals, $number, $expected)
    {
        $this->helper
             ->setLocale($locale)
             ->setShouldShowDecimals($showDecimals)
             ->setCurrencyCode($currencyCode);

        $this->assertMbStringEquals($expected, $this->helper->__invoke($number));
    }
コード例 #2
0
ファイル: Moeda.php プロジェクト: adaoex/zf2-base
 /**
  * Retorna número no formato brasileiro (locale: pt_BR, currency: BRL)
  * 
  * @param number $number 
  * @return string no formato brasileiro (locale: pt_BR, currency: BRL)
  */
 function formataBr($number)
 {
     return parent::__invoke($number, 'BRL', null, 'pt_BR', null);
 }