public function RestIncidentStorageTest::testGetInvalidIncident in Radioactivity 8.3
Same name and namespace in other branches
- 4.0.x tests/src/Unit/RestIncidentStorageTest.php \Drupal\Tests\radioactivity\Unit\RestIncidentStorageTest::testGetInvalidIncident()
@covers ::getIncidents
File
- tests/
src/ Unit/ RestIncidentStorageTest.php, line 77
Class
- RestIncidentStorageTest
- @coversDefaultClass \Drupal\radioactivity\RestIncidentStorage @group radioactivity
Namespace
Drupal\Tests\radioactivity\UnitCode
public function testGetInvalidIncident() {
$incidentData = Json::decode('[[{"fn":"field_name","et":"entity_type","id":"99","e":10,"h":"invalid-hash"}]]');
$this->sut
->expects($this
->once())
->method('getIncidentsFromStorage')
->will($this
->returnValue($incidentData));
$result = $this->sut
->getIncidents();
$this
->assertCount(0, $result);
}