You are here

public function CounterTest::testSetNegative in Purge 8.3

@covers ::disableSet

File

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

Class

CounterTest
@coversDefaultClass \Drupal\purge\Counter\Counter

Namespace

Drupal\Tests\purge\Unit\Counter

Code

public function testSetNegative() : void {
  $counter = new Counter();
  $this
    ->expectException(BadBehaviorException::class);
  $this
    ->expectExceptionMessage('Given $value can only be zero or positive.');
  $counter
    ->set(-1.0E-6);
}