namespace Drupal\Tests\views_ui\Functional;
-use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Render\FormattableMarkup;
use Drupal\views\Entity\View;
use Drupal\views\Views;
*/
public function testReorderDisplay() {
$view = [
- 'block[create]' => TRUE
+ 'block[create]' => TRUE,
];
$view = $this->randomView($view);
// Put the block display in front of the page display.
$edit = [
'displays[page_1][weight]' => 2,
- 'displays[block_1][weight]' => 1
+ 'displays[block_1][weight]' => 1,
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->drupalPostForm(NULL, [], t('Save'));
// Assert that the expected text is found in each area category.
foreach ($areas as $type) {
$element = $this->xpath('//div[contains(@class, :class)]/div', [':class' => $type]);
- $this->assertEqual($element[0]->getHtml(), SafeMarkup::format('The selected display type does not use @type plugins', ['@type' => $type]));
+ $this->assertEqual($element[0]->getHtml(), new FormattableMarkup('The selected display type does not use @type plugins', ['@type' => $type]));
}
}
$view = $this->randomView();
$id = $view['id'];
- // The view should initially have the enabled class on it's form wrapper.
+ // The view should initially have the enabled class on its form wrapper.
$this->drupalGet('admin/structure/views/view/' . $id);
$elements = $this->xpath('//div[contains(@class, :edit) and contains(@class, :status)]', [':edit' => 'views-edit-view', ':status' => 'enabled']);
$this->assertTrue($elements, 'The enabled class was found on the form wrapper');