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