You are here

function CurrencyTest::testGetDecimals in Currency 8.3

@covers ::getDecimals

File

tests/src/Unit/Entity/CurrencyTest.php, line 155

Class

CurrencyTest
@coversDefaultClass \Drupal\currency\Entity\Currency

Namespace

Drupal\Tests\currency\Unit\Entity

Code

function testGetDecimals() {
  foreach ([
    1,
    2,
    3,
  ] as $decimals) {
    $this->sut
      ->setSubunits(pow(10, $decimals));
    $this
      ->assertSame($decimals, $this->sut
      ->getDecimals());
  }
}