update drupal
This commit is contained in:
@@ -64,7 +64,6 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase {
|
||||
$this->verifyPageCache($url, 'HIT', $expected_tags);
|
||||
|
||||
// Verify that after modifying the menu, there is a cache miss.
|
||||
$this->pass('Test modification of menu.', 'Debug');
|
||||
$menu->set('label', 'Awesome llama');
|
||||
$menu->save();
|
||||
$this->verifyPageCache($url, 'MISS');
|
||||
@@ -74,14 +73,12 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase {
|
||||
|
||||
// Verify that after modifying the menu link weight, there is a cache miss.
|
||||
$menu_link_manager->updateDefinition('test_page_test.test_page', ['weight' => -10]);
|
||||
$this->pass('Test modification of menu link.', 'Debug');
|
||||
$this->verifyPageCache($url, 'MISS');
|
||||
|
||||
// Verify a cache hit.
|
||||
$this->verifyPageCache($url, 'HIT');
|
||||
|
||||
// Verify that after adding a menu link, there is a cache miss.
|
||||
$this->pass('Test addition of menu link.', 'Debug');
|
||||
$menu_link_2 = MenuLinkContent::create([
|
||||
'id' => '',
|
||||
'parent' => '',
|
||||
@@ -99,7 +96,6 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase {
|
||||
$this->verifyPageCache($url, 'HIT');
|
||||
|
||||
// Verify that after resetting the first menu link, there is a cache miss.
|
||||
$this->pass('Test reset of menu link.', 'Debug');
|
||||
$this->assertTrue($menu_link->isResettable(), 'First link can be reset');
|
||||
$menu_link = $menu_link_manager->resetLink($menu_link->getPluginId());
|
||||
$this->verifyPageCache($url, 'MISS');
|
||||
@@ -108,7 +104,6 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase {
|
||||
$this->verifyPageCache($url, 'HIT', $expected_tags);
|
||||
|
||||
// Verify that after deleting the menu, there is a cache miss.
|
||||
$this->pass('Test deletion of menu.', 'Debug');
|
||||
$menu->delete();
|
||||
$this->verifyPageCache($url, 'MISS');
|
||||
|
||||
|
||||
@@ -78,12 +78,12 @@ class MenuUiNodeTest extends BrowserTestBase {
|
||||
// Verify that the menu link title has the correct maxlength.
|
||||
$title_max_length = \Drupal::service('entity_field.manager')->getBaseFieldDefinitions('menu_link_content')['title']->getSetting('max_length');
|
||||
$this->drupalGet('node/add/page');
|
||||
$this->assertPattern('/<input .* id="edit-menu-title" .* maxlength="' . $title_max_length . '" .* \/>/', 'Menu link title field has correct maxlength in node add form.');
|
||||
$this->assertPattern('/<input .* id="edit-menu-title" .* maxlength="' . $title_max_length . '" .* \/>/');
|
||||
|
||||
// Verify that the menu link description has the correct maxlength.
|
||||
$description_max_length = \Drupal::service('entity_field.manager')->getBaseFieldDefinitions('menu_link_content')['description']->getSetting('max_length');
|
||||
$this->drupalGet('node/add/page');
|
||||
$this->assertPattern('/<input .* id="edit-menu-description" .* maxlength="' . $description_max_length . '" .* \/>/', 'Menu link description field has correct maxlength in node add form.');
|
||||
$this->assertPattern('/<input .* id="edit-menu-description" .* maxlength="' . $description_max_length . '" .* \/>/');
|
||||
|
||||
// Disable the default main menu, so that no menus are enabled.
|
||||
$edit = [
|
||||
@@ -193,8 +193,12 @@ class MenuUiNodeTest extends BrowserTestBase {
|
||||
|
||||
$this->drupalGet('node/' . $node->id() . '/edit');
|
||||
$this->assertFieldById('edit-menu-weight', 17, 'Menu weight correct in edit form');
|
||||
$this->assertPattern('/<input .* id="edit-menu-title" .* maxlength="' . $title_max_length . '" .* \/>/', 'Menu link title field has correct maxlength in node edit form.');
|
||||
$this->assertPattern('/<input .* id="edit-menu-description" .* maxlength="' . $description_max_length . '" .* \/>/', 'Menu link description field has correct maxlength in node add form.');
|
||||
// Verify that the menu link title field has correct maxlength in node edit
|
||||
// form.
|
||||
$this->assertPattern('/<input .* id="edit-menu-title" .* maxlength="' . $title_max_length . '" .* \/>/');
|
||||
// Verify that the menu link description field has correct maxlength in
|
||||
// node add form.
|
||||
$this->assertPattern('/<input .* id="edit-menu-description" .* maxlength="' . $description_max_length . '" .* \/>/');
|
||||
|
||||
// Disable the menu link, then edit the node--the link should stay disabled.
|
||||
$link_id = menu_ui_get_menu_link_defaults($node)['entity_id'];
|
||||
|
||||
Reference in New Issue
Block a user