Source of file CurrencyTest.php
Size: 1,745 Bytes - Last Modified: 2021-12-24T06:51:34+00:00
/var/www/docs.ssmods.com/process/src/tests/Currency/CurrencyTest.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 | <?php namespace Heystack\Ecommerce\Currency; use Heystack\Core\Identifier\Identifier; /** * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-04-25 at 16:57:46. */ class CurrencyTest extends \PHPUnit_Framework_TestCase { /** * @var Currency */ protected $currency; /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { $this->currency = new Currency('NZD', 1, true); } /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ protected function tearDown() { $this->currency = null; } /** * @covers Heystack\Ecommerce\Currency\Currency::__construct * @covers Heystack\Ecommerce\Currency\Currency::getIdentifier */ public function testGetIdentifier() { $identifier = $this->currency->getIdentifier(); $this->assertTrue($identifier instanceof Identifier); $this->assertEquals('NZD', $identifier->getFull()); } /** * @covers Heystack\Ecommerce\Currency\Currency::getCurrencyCode */ public function testGetCurrencyCode() { $this->assertEquals('NZD', $this->currency->getCurrencyCode()); } /** * @covers Heystack\Ecommerce\Currency\Currency::isDefaultCurrency */ public function testIsDefaultCurrency() { $this->assertTrue($this->currency->isDefaultCurrency()); } /** * @covers Heystack\Ecommerce\Currency\Currency::getValue */ public function testGetValue() { $this->assertEquals(1, $this->currency->getValue()); } } |