3 namespace Drupal\Tests\migrate_drupal_ui\Functional;
5 use Drupal\Tests\BrowserTestBase;
8 * Tests that only user 1 can access the migrate UI.
10 * @group migrate_drupal_ui
12 class MigrateAccessTest extends BrowserTestBase {
19 public static $modules = ['migrate_drupal_ui'];
22 * Tests that only user 1 can access the migrate UI.
24 public function testAccess() {
25 $this->drupalLogin($this->rootUser);
26 $this->drupalGet('upgrade');
27 $this->assertResponse(200);
28 $this->assertText(t('Upgrade'));
30 $user = $this->createUser(['administer software updates']);
31 $this->drupalLogin($user);
32 $this->drupalGet('upgrade');
33 $this->assertResponse(403);
34 $this->assertNoText(t('Upgrade'));