You are here

public function CounterTest::testGetInteger in Purge 8.3

@covers ::getInteger

@dataProvider providerTestGetInteger()

File

tests/src/Unit/Counter/CounterTest.php, line 78

Class

CounterTest
@coversDefaultClass \Drupal\purge\Counter\Counter

Namespace

Drupal\Tests\purge\Unit\Counter

Code

public function testGetInteger($value) : void {
  $counter = new Counter($value);
  $this
    ->assertEquals((int) $value, $counter
    ->getInteger());
  $this
    ->assertFalse(is_float($counter
    ->getInteger()));
  $this
    ->assertTrue(is_int($counter
    ->getInteger()));
}