Fixing AJAX data deserialization in the MainControllerTest.

This commit is contained in:
Alexey Skobkin 2019-04-03 19:34:01 +03:00
parent 60dcc5e955
commit 7fcdcbf728

View file

@ -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');