currencyService = new CurrencyService; } public function test_get_currency_symbol_for_currency_eur(): void { // Arrange $money = Money::of(1, Currency::of('EUR')); // Act $symbol = $this->currencyService->getCurrencySymbolForMoney($money); // Assert $this->assertSame('€', $symbol); } public function test_get_currency_symbol_for_currency_usd(): void { // Arrange $money = Money::of(1, Currency::of('USD')); // Act $symbol = $this->currencyService->getCurrencySymbolForMoney($money); // Assert $this->assertSame('$', $symbol); } public function test_get_currency_symbol_for_currency_gbp(): void { // Arrange $money = Money::of(1, Currency::of('GBP')); // Act $symbol = $this->currencyService->getCurrencySymbolForMoney($money); // Assert $this->assertSame('£', $symbol); } public function test_get_currency_symbol_for_currency_cad(): void { // Arrange $money = Money::of(1, Currency::of('CAD')); // Act $symbol = $this->currencyService->getCurrencySymbolForMoney($money); // Assert $this->assertSame('$', $symbol); } public function test_get_currency_symbol_for_currency_cop(): void { // Arrange $money = Money::of(1, Currency::of('COP')); // Act $symbol = $this->currencyService->getCurrencySymbolForMoney($money); // Assert $this->assertSame('$', $symbol); } public function test_get_currency_symbol_for_currency_without_known_symbol(): void { // Arrange $currency = 'XXX'; // Act $symbol = $this->currencyService->getCurrencySymbol($currency); // Assert $this->assertSame('XXX', $symbol); } public function test_get_random_currency_code(): void { // Act $currencyCode = $this->currencyService->getRandomCurrencyCode(); // Assert $this->assertNotEmpty($currencyCode); $this->assertIsString($currencyCode); $this->assertNotNull(Currency::of($currencyCode)); } }