public function RestIncidentStorageTest::testAddIncident in Radioactivity 4.0.x
Same name and namespace in other branches
- 8.3 tests/src/Unit/RestIncidentStorageTest.php \Drupal\Tests\radioactivity\Unit\RestIncidentStorageTest::testAddIncident()
@covers ::addIncident
File
- tests/
src/ Unit/ RestIncidentStorageTest.php, line 48
Class
- RestIncidentStorageTest
- @coversDefaultClass \Drupal\radioactivity\RestIncidentStorage @group radioactivity
Namespace
Drupal\Tests\radioactivity\UnitCode
public function testAddIncident() {
$incident = $this
->getMockBuilder(IncidentInterface::class)
->disableOriginalConstructor()
->getMock();
$this
->expectException("Exception");
$this
->expectExceptionMessage("The Radioactivity rest endpoint expects incidents to be added somewhere else.");
$this->sut
->addIncident($incident);
}