You are here

public function RestProcessorTest::testGetData 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::testGetData()

@covers ::getData

File

tests/src/Unit/RestProcessorTest.php, line 56

Class

RestProcessorTest
@coversDefaultClass \Drupal\radioactivity\RestProcessor @group radioactivity

Namespace

Drupal\Tests\radioactivity\Unit

Code

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