SupportedCurrencyTest.php in Payment 8.2
File
tests/src/Unit/Plugin/Payment/Method/SupportedCurrencyTest.php
View source
<?php
namespace Drupal\Tests\payment\Unit\Plugin\Payment\Method;
use Drupal\payment\Plugin\Payment\Method\SupportedCurrency;
use Drupal\Tests\UnitTestCase;
class SupportedCurrencyTest extends UnitTestCase {
protected $currencyCode;
protected $minimumAmount;
protected $maximumAmount;
protected $sut;
public function setUp() : void {
$this->currencyCode = $this
->randomMachineName();
$this->maximumAmount = mt_rand();
$this->minimumAmount = mt_rand();
$this->sut = new SupportedCurrency($this->currencyCode, $this->minimumAmount, $this->maximumAmount);
}
function testGetCurrencyCode() {
$this
->assertSame($this->currencyCode, $this->sut
->getCurrencyCode());
}
function testGetMinimumAmount() {
$this
->assertSame($this->minimumAmount, $this->sut
->getMinimumAmount());
}
function testGetMaximumAmount() {
$this
->assertSame($this->maximumAmount, $this->sut
->getMaximumAmount());
}
}