$instance = $menu_link_manager->createInstance($instance->getPluginId()); $this->assertEquals($edit['weight'], $instance->getWeight(), 'Saving an existing link updates the weight.'); $this->resetMenuLink($instance, $old_weight); }
/**
* Adds a custom menu using CRUD functions.
*/ publicfunctionaddCustomMenuCRUD(){ // Add a new custom menu.
$menu_name = strtolower($this->randomMachineName(MenuStorage::MAX_ID_LENGTH)); $label = $this->randomMachineName(16);