You are here

public function CounterTest::testIncrementInvalidValue in Purge 8.3

@covers ::increment @dataProvider providerTestIncrementInvalidValue()

File

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

Class

CounterTest
@coversDefaultClass \Drupal\purge\Counter\Counter

Namespace

Drupal\Tests\purge\Unit\Counter

Code

public function testIncrementInvalidValue($value) : void {
  $counter = new Counter(10);
  $this
    ->expectException(BadBehaviorException::class);
  $this
    ->expectExceptionMessage('Given $amount is zero or negative.');
  $counter
    ->increment($value);
}