getBody(); $this->assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); $this->assertStringStartsWith('window.Messages = {', $actual); $this->assertStringEndsWith('};', $actual); $json = substr($actual, strlen('window.Messages = '), -1); $array = json_decode($json, true); $this->assertIsArray($array); $this->assertArrayHasKey('strDoYouReally', $array); $this->assertEquals('Do you really want to execute "%s"?', $array['strDoYouReally']); } }