You are here

public function RestProcessorTest::testGetMultiData in Radioactivity 8.3

Same name and namespace in other branches
  1. 4.0.x 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\Unit

Code

public function testGetMultiData() {
  $data = '[{"fn":"field_ra","et":"node","id":"66","e":10,"h":"12345678"}]';
  $this->sut
    ->processData($data);
  $data = '[{"fn":"field_ra","et":"node","id":"66","e":10,"h":"87654321"}]';
  $this->sut
    ->processData($data);
  $response = $this->sut
    ->getData();
  $this
    ->assertEquals('[[{"fn":"field_ra","et":"node","id":"66","e":10,"h":"12345678"}],' . PHP_EOL . '[{"fn":"field_ra","et":"node","id":"66","e":10,"h":"87654321"}]]', $response);
}