You are here

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

@covers ::processData

File

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

Class

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

Namespace

Drupal\Tests\radioactivity\Unit

Code

public function testProcessFaultyData() {
  $data = '[{"fn":"field_ra","et":"node","id":"66","e":10}]';
  $response = $this->sut
    ->processData($data);
  $this
    ->assertEquals('{"status":"error","message":"Invalid json."}', $response);
}