@@ -72,11 +72,14 @@ public function testOutputsApiVersion(): void
7272 $ commandTester = new CommandTester ($ this ->command );
7373 $ commandTester ->execute ([]);
7474
75- $ expected = json_encode ([
76- 'version ' => Application::VERSION ,
77- 'commands ' => [],
78- 'features ' => [],
79- ]);
75+ $ expected = json_encode (
76+ [
77+ 'version ' => Application::VERSION ,
78+ 'commands ' => [],
79+ 'features ' => [],
80+ ],
81+ JSON_THROW_ON_ERROR
82+ );
8083
8184 $ this ->assertSame ($ expected , $ commandTester ->getDisplay ());
8285 $ this ->assertSame (0 , $ commandTester ->getStatusCode ());
@@ -100,11 +103,14 @@ public function testOutputsPluginCommands(): void
100103 $ commandTester = new CommandTester ($ this ->command );
101104 $ commandTester ->execute ([]);
102105
103- $ expected = json_encode ([
104- 'version ' => Application::VERSION ,
105- 'commands ' => ['foo:bar ' ],
106- 'features ' => [],
107- ]);
106+ $ expected = json_encode (
107+ [
108+ 'version ' => Application::VERSION ,
109+ 'commands ' => ['foo:bar ' ],
110+ 'features ' => [],
111+ ],
112+ JSON_THROW_ON_ERROR
113+ );
108114
109115 $ this ->assertSame ($ expected , $ commandTester ->getDisplay ());
110116 $ this ->assertSame (0 , $ commandTester ->getStatusCode ());
@@ -138,16 +144,19 @@ public function testOutputsPluginFeatures(): void
138144 $ commandTester = new CommandTester ($ this ->command );
139145 $ commandTester ->execute ([]);
140146
141- $ expected = json_encode ([
142- 'version ' => Application::VERSION ,
143- 'commands ' => [],
144- 'features ' => [
145- 'foo/bar-bundle ' => [
146- 'foo ' => 'bar ' ,
147- 'bar ' => 'baz ' ,
147+ $ expected = json_encode (
148+ [
149+ 'version ' => Application::VERSION ,
150+ 'commands ' => [],
151+ 'features ' => [
152+ 'foo/bar-bundle ' => [
153+ 'foo ' => 'bar ' ,
154+ 'bar ' => 'baz ' ,
155+ ],
148156 ],
149157 ],
150- ]);
158+ JSON_THROW_ON_ERROR
159+ );
151160
152161 $ this ->assertSame ($ expected , $ commandTester ->getDisplay ());
153162 $ this ->assertSame (0 , $ commandTester ->getStatusCode ());
0 commit comments