You are here

public function CounterTest::testDecrementInvalidValue in Purge 8.3

@covers ::decrement @dataProvider providerTestDecrementInvalidValue()

File

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

Class

CounterTest
@coversDefaultClass \Drupal\purge\Counter\Counter

Namespace

Drupal\Tests\purge\Unit\Counter

Code

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