You are here

public function RestIncidentStorageTest::testGetMultipleIncidents in Radioactivity 4.0.x

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

@covers ::getIncidents

File

tests/src/Unit/RestIncidentStorageTest.php, line 91

Class

RestIncidentStorageTest
@coversDefaultClass \Drupal\radioactivity\RestIncidentStorage @group radioactivity

Namespace

Drupal\Tests\radioactivity\Unit

Code

public function testGetMultipleIncidents() {
  $this->sut
    ->expects($this
    ->once())
    ->method('getIncidentsFromStorage')
    ->will($this
    ->returnValue($this
    ->getMultipleIncidentData()));
  $result = $this->sut
    ->getIncidents();
  $this
    ->assertCount(4, $result);
  $this
    ->assertInstanceOf(IncidentInterface::class, $result[0]);
}