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
15 class SevenSecondaryLocalTasksConvertedIntoBlockUpdateTest extends UpdatePathTestBase {
20 public function setDatabaseDumpFiles() {
21 $this->databaseDumpFiles = [
22 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
23 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php',
30 protected function setUp() {
32 /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */
33 $theme_handler = \Drupal::service('theme_handler');
34 $theme_handler->refreshInfo();
38 * Tests that local actions/tasks are being converted into blocks.
40 public function testUpdateHookN() {
43 /** @var \Drupal\block\BlockInterface $block_storage */
44 $block_storage = \Drupal::entityManager()->getStorage('block');
46 // Disable maintenance mode.
47 // @todo Can be removed once maintenance mode is automatically turned off
48 // after updates in https://www.drupal.org/node/2435135.
49 \Drupal::state()->set('system.maintenance_mode', FALSE);
51 // We finished updating so we can log in the user now.
52 $this->drupalLogin($this->rootUser);
54 // Local actions are visible on the content listing page.
55 $this->drupalGet('admin/structure/block');
56 $action_link = $this->cssSelect('#secondary-tabs-title');
57 $this->assertTrue($action_link);