assertIsString($actual); $this->assertStringStartsWith('var Messages = {', $actual); $this->assertStringEndsWith('};', $actual); $json = substr($actual, strlen('var Messages = '), -1); $array = json_decode($json, true); $this->assertIsArray($array); $this->assertArrayHasKey('strConfirm', $array); $this->assertEquals(__('Confirm'), $array['strConfirm']); } }