public function SevenSecondaryLocalTasksConvertedIntoBlockUpdateTest::testUpdateHookN in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Update/SevenSecondaryLocalTasksConvertedIntoBlockUpdateTest.php \Drupal\system\Tests\Update\SevenSecondaryLocalTasksConvertedIntoBlockUpdateTest::testUpdateHookN()
Tests that local actions/tasks are being converted into blocks.
File
- core/
modules/ system/ src/ Tests/ Update/ SevenSecondaryLocalTasksConvertedIntoBlockUpdateTest.php, line 42 - Contains \Drupal\system\Tests\Update\SevenSecondaryLocalTasksConvertedIntoBlockUpdateTest.
Class
- SevenSecondaryLocalTasksConvertedIntoBlockUpdateTest
- Tests the upgrade path for converting seven secondary local tasks into a block.
Namespace
Drupal\system\Tests\UpdateCode
public function testUpdateHookN() {
$this
->runUpdates();
/** @var \Drupal\block\BlockInterface $block_storage */
$block_storage = \Drupal::entityManager()
->getStorage('block');
// Disable maintenance mode.
// @todo Can be removed once maintenance mode is automatically turned off
// after updates in https://www.drupal.org/node/2435135.
\Drupal::state()
->set('system.maintenance_mode', FALSE);
// We finished updating so we can login the user now.
$this
->drupalLogin($this->rootUser);
// Local actions are visible on the content listing page.
$this
->drupalGet('admin/structure/block');
$action_link = $this
->cssSelect('#secondary-tabs-title');
$this
->assertTrue($action_link);
}