/** * method getSymbol * when calledWithAProperCurrencyButJustSymbolFalse * should returnFullCurrencySymbol * @dataProvider getLocaleCurrencyAndExpectedFullSymbol */ public function test_getSymbol_calledWithAProperCurrencyButJustSymbolFalse_returnFullCurrencySymbol($locale, $currency, $expected) { $sut = new MoneyFormatter(); $actual = $sut->getSymbol($locale, new Money(300005, new Currency($currency)), false); $this->assertEquals($expected, $actual, 'Test failed for locale ' . $locale . ' and currency ' . $currency); }
/** * method getSymbolPosition * when called * should returnSymbolPositionWithZeroOrOneValues * @dataProvider getSymbolPositionFromLocale */ public function test_getSymbolPosition_called_returnPositionSymbolWithZeroOrOneValues($locale, $currency, $expected) { $sut = new MoneyFormatter($locale); $actual = $sut->getSymbolPosition(new Currency($currency)); self::assertEquals($expected, $actual); }