/** * test getSign */ public function testGetSign() { $locale = new Locale\Locale('ar_EG'); $currency = new Currency\Currency('ar_EG'); $this->assertSame('ج.م.', $currency->getSymbol('EGP', 'ar_EG')); $this->assertSame('€', $currency->getSymbol('EUR', 'de_AT')); $this->assertSame('ج.م.', $currency->getSymbol('ar_EG')); $this->assertSame('€', $currency->getSymbol('de_AT')); $this->assertSame('ج.م.', $currency->getSymbol()); try { $currency->getSymbol('EGP', 'de_XX'); $this->fail("exception expected"); } catch (Currency\Exception\InvalidArgumentException $e) { // success } }