namespace Drupal\Tests\views_ui\Functional;
-use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Render\FormattableMarkup;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\views\Tests\ViewTestData;
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
- 'default' => 0
+ 'default' => 0,
];
return $schema;
'relationship' => [
'id' => 'standard',
'base' => 'users_field_data',
- 'base field' => 'uid'
- ]
+ 'base field' => 'uid',
+ ],
];
// Create a dummy field with no help text.
'field_name' => 'field_test',
'entity_type' => 'node',
'bundle' => 'page',
- 'label' => 'The giraffe" label'
+ 'label' => 'The giraffe" label',
])->save();
FieldConfig::create([
'field_name' => 'field_test',
'entity_type' => 'node',
'bundle' => 'article',
- 'label' => 'The <em>giraffe"</em> label <script>alert("the return of the xss")</script>'
+ 'label' => 'The <em>giraffe"</em> label <script>alert("the return of the xss")</script>',
])->save();
$this->drupalGet('admin/structure/views/nojs/add-handler/content/default/field');
$href = "admin/structure/views/nojs/handler/test_view_broken/default/$type/id_broken";
$result = $this->xpath('//a[contains(@href, :href)]', [':href' => $href]);
- $this->assertEqual(count($result), 1, SafeMarkup::format('Handler (%type) edit link found.', ['%type' => $type]));
+ $this->assertEqual(count($result), 1, new FormattableMarkup('Handler (%type) edit link found.', ['%type' => $type]));
$text = 'Broken/missing handler';
];
foreach ($original_configuration as $key => $value) {
- $this->assertText(SafeMarkup::format('@key: @value', ['@key' => $key, '@value' => $value]));
+ $this->assertText(new FormattableMarkup('@key: @value', ['@key' => $key, '@value' => $value]));
}
}
}