You are here

public function ExchangeRateTest::setUp in Currency 8.3

Overrides UnitTestCase::setUp

File

tests/src/Unit/ExchangeRateTest.php, line 26

Class

ExchangeRateTest
@coversDefaultClass \Drupal\currency\ExchangeRate

Namespace

Drupal\Tests\currency\Unit

Code

public function setUp() : void {
  $exchange_rate_provider_id = $this
    ->randomMachineName();
  $timestamp = mt_rand();
  $source_currency_code = $this
    ->randomMachineName(3);
  $destination_currency_code = $this
    ->randomMachineName(3);
  $rate = mt_rand();
  $this->sut = new ExchangeRate($exchange_rate_provider_id, $timestamp, $source_currency_code, $destination_currency_code, $rate);
}