- $this->assertEqual($this->t('Protection disabled'), (string) $requirements['configuration_files']['description']['#context']['configuration_error_list']['#items'][0], 'Description is properly set.');
+ $this->assertEquals('Protection disabled', (string) $requirements['configuration_files']['value']);
+ $description = strip_tags(\Drupal::service('renderer')->renderPlain($requirements['configuration_files']['description']));
+ $this->assertContains('settings.php is not protected from modifications and poses a security risk.', $description);
+ $this->assertContains('services.yml is not protected from modifications and poses a security risk.', $description);