public function RestProcessorTest::testGetMultiData in Radioactivity 4.0.x
Same name and namespace in other branches
- 8.3 tests/src/Unit/RestProcessorTest.php \Drupal\Tests\radioactivity\Unit\RestProcessorTest::testGetMultiData()
@covers ::getData
File
- tests/
src/ Unit/ RestProcessorTest.php, line 67
Class
- RestProcessorTest
- @coversDefaultClass \Drupal\radioactivity\RestProcessor @group radioactivity
Namespace
Drupal\Tests\radioactivity\UnitCode
public function testGetMultiData() {
$data = '[{"fn":"field_ra","et":"node","id":"66","ti":0,"e":10,"h":"12345678"}]';
$this->sut
->processData($data);
$data = '[{"fn":"field_ra","et":"node","id":"66","ti":0,"e":10,"h":"87654321"}]';
$this->sut
->processData($data);
$response = $this->sut
->getData();
$this
->assertEquals('[[{"fn":"field_ra","et":"node","id":"66","ti":0,"e":10,"h":"12345678"}],' . PHP_EOL . '[{"fn":"field_ra","et":"node","id":"66","ti":0,"e":10,"h":"87654321"}]]', $response);
}