diff --git a/tests/src/Functional/JsonApiFunctionalToJsonTest.php b/tests/src/Functional/JsonApiFunctionalToJsonTest.php index 651059e..d65d71c 100644 --- a/tests/src/Functional/JsonApiFunctionalToJsonTest.php +++ b/tests/src/Functional/JsonApiFunctionalToJsonTest.php @@ -29,15 +29,16 @@ class JsonApiFunctionalToJsonTest extends BrowserTestBase { public function testService() { $node = $this->createNode(); - $string = \Drupal::service('jsonapi.resource.to_json', ['resource' => $node])->raw(); - $this->verbose(print_r($string, TRUE)); - $this->assertFalse(empty($string)); + $raw = \Drupal::service('jsonapi.resource.to_json', ['resource' => $node])->raw(); + $this->verbose(print_r($raw, TRUE)); + $this->assertFalse(empty($raw)); $json = \Drupal::service('jsonapi.resource.to_json', ['resource' => $node])->json(); $this->verbose(print_r($json, TRUE)); $this->assertFalse(empty($json)); - $this->assertSame(Json::decode($string), $json); + $this->assertEquals(Json::decode($raw), $json); + $this->assertNotEquals($raw, $json); } }