3 namespace Drupal\Tests\system\Functional\Update;
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
8 * Tests the upgrade path for converting seven secondary local tasks into a block.
10 * @see https://www.drupal.org/node/2569529
14 class SevenSecondaryLocalTasksConvertedIntoBlockUpdateTest extends UpdatePathTestBase {
19 public function setDatabaseDumpFiles() {
20 $this->databaseDumpFiles = [
21 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
22 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php',
29 protected function setUp() {
31 /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */
32 $theme_handler = \Drupal::service('theme_handler');
33 $theme_handler->refreshInfo();
37 * Tests that local actions/tasks are being converted into blocks.
39 public function testUpdateHookN() {
42 /** @var \Drupal\block\BlockInterface $block_storage */
43 $block_storage = \Drupal::entityManager()->getStorage('block');
45 // Disable maintenance mode.
46 // @todo Can be removed once maintenance mode is automatically turned off
47 // after updates in https://www.drupal.org/node/2435135.
48 \Drupal::state()->set('system.maintenance_mode', FALSE);
50 // We finished updating so we can log in the user now.
51 $this->drupalLogin($this->rootUser);
53 // Local actions are visible on the content listing page.
54 $this->drupalGet('admin/structure/block');
55 $action_link = $this->cssSelect('#secondary-tabs-title');
56 $this->assertTrue($action_link);