You are here

public function IncidentTest::testValidHash in Radioactivity 8.3

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

@covers ::isValid

File

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

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', 5.5, '1234567890');
  $this
    ->assertFalse($incident
    ->isValid());
  $incident = new Incident('field_name', 'entity_type', '99', 5.5, '5aa2ff01ac75da55751051a55021092768d079c5');
  $this
    ->assertTrue($incident
    ->isValid());
}