You are here

public function IncidentTest::testValidHash in Radioactivity 4.0.x

Same name and namespace in other branches
  1. 8.3 tests/src/Unit/IncidentTest.php \Drupal\Tests\radioactivity\Unit\IncidentTest::testValidHash()

@covers ::isValid

File

tests/src/Unit/IncidentTest.php, line 75

Class

IncidentTest
@coversDefaultClass \Drupal\radioactivity\Incident @group radioactivity

Namespace

Drupal\Tests\radioactivity\Unit

Code

public function testValidHash() {
  $incident = new Incident('field_name', 'entity_type', '99', '0', '10', '1234567890');
  $this
    ->assertFalse($incident
    ->isValid());
  $incident = new Incident('field_name', 'entity_type', '99', '0', '10', '4bd2afb1d12a72f3a2fdb01b8fdaf128b8c09efa');
  $this
    ->assertTrue($incident
    ->isValid());
}