public function IncidentTest::testJson in Radioactivity 4.0.x
Same name and namespace in other branches
- 8.3 tests/src/Unit/IncidentTest.php \Drupal\Tests\radioactivity\Unit\IncidentTest::testJson()
@covers ::toJson
File
- tests/
src/ Unit/ IncidentTest.php, line 66
Class
- IncidentTest
- @coversDefaultClass \Drupal\radioactivity\Incident @group radioactivity
Namespace
Drupal\Tests\radioactivity\UnitCode
public function testJson() {
$incident = new Incident('field_name', 'entity_type', '99', '0', '10', '1234567890');
$this
->assertEquals($incident
->toJson(), '{"fn":"field_name","et":"entity_type","id":"99","ti":"0","e":"10","h":"4bd2afb1d12a72f3a2fdb01b8fdaf128b8c09efa"}');
}