You are here

public function IncidentTest::testGetters 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::testGetters()

@covers ::getFieldName @covers ::getEntityTypeId @covers ::getEntityId @covers ::getEnergy

File

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

Class

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

Namespace

Drupal\Tests\radioactivity\Unit

Code

public function testGetters() {
  $incident = new Incident('field_name', 'entity_type', '99', 5.5, '1234567890');
  $this
    ->assertEquals($incident
    ->getFieldName(), 'field_name');
  $this
    ->assertEquals($incident
    ->getEntityTypeId(), 'entity_type');
  $this
    ->assertEquals($incident
    ->getEntityId(), '99');
  $this
    ->assertEquals($incident
    ->getEnergy(), 5.5);
}