From 7fcdcbf72863c6a8548629408b1a2c7a225f953d Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Wed, 3 Apr 2019 19:34:01 +0300 Subject: [PATCH] Fixing AJAX data deserialization in the MainControllerTest. --- .../PointToolsBundle/Controller/MainControllerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Skobkin/PointToolsBundle/Controller/MainControllerTest.php b/tests/Skobkin/PointToolsBundle/Controller/MainControllerTest.php index 3790392..e7f2f9d 100644 --- a/tests/Skobkin/PointToolsBundle/Controller/MainControllerTest.php +++ b/tests/Skobkin/PointToolsBundle/Controller/MainControllerTest.php @@ -92,7 +92,7 @@ class MainControllerTest extends WebTestCase */ public function testAjaxUserAutoCompleteHasOptions(string $json): array { - $data = json_decode($json); + $data = json_decode($json, true); $this->assertNotNull($data, 'JSON data successfully decoded and not empty'); $this->assertTrue(is_array($data), 'JSON data is array'); @@ -129,7 +129,7 @@ class MainControllerTest extends WebTestCase */ public function testAjaxUserAutoCompleteHasOptionsForUnnamedUser(string $json): array { - $data = json_decode($json); + $data = json_decode($json, true); $this->assertNotNull($data, 'JSON data successfully decoded and not empty'); $this->assertTrue(is_array($data), 'JSON data is array');