update
This commit is contained in:
@@ -51,7 +51,11 @@ class EarlyDateTest extends TaxonomyTestBase {
|
||||
])
|
||||
->save();
|
||||
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'administer nodes', 'bypass node access']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'administer nodes',
|
||||
'bypass node access',
|
||||
]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,12 @@ class RssTest extends TaxonomyTestBase {
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access', 'administer content types', 'administer node display']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'bypass node access',
|
||||
'administer content types',
|
||||
'administer node display',
|
||||
]));
|
||||
$this->vocabulary = $this->createVocabulary();
|
||||
$this->fieldName = 'taxonomy_' . $this->vocabulary->id();
|
||||
|
||||
|
||||
@@ -80,7 +80,11 @@ class TaxonomyImageTest extends TaxonomyTestBase {
|
||||
}
|
||||
|
||||
public function testTaxonomyImageAccess() {
|
||||
$user = $this->drupalCreateUser(['administer site configuration', 'administer taxonomy', 'access user profiles']);
|
||||
$user = $this->drupalCreateUser([
|
||||
'administer site configuration',
|
||||
'administer taxonomy',
|
||||
'access user profiles',
|
||||
]);
|
||||
$this->drupalLogin($user);
|
||||
|
||||
// Create a term and upload the image.
|
||||
|
||||
@@ -30,7 +30,10 @@ class TaxonomyTermIndentationTest extends TaxonomyTestBase {
|
||||
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'bypass node access',
|
||||
]));
|
||||
$this->vocabulary = $this->createVocabulary();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,10 @@ class TaxonomyTermPagerTest extends TaxonomyTestBase {
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'bypass node access',
|
||||
]));
|
||||
$this->vocabulary = $this->createVocabulary();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,10 @@ class TermIndexTest extends TaxonomyTestBase {
|
||||
parent::setUp();
|
||||
|
||||
// Create an administrative user.
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'bypass node access',
|
||||
]));
|
||||
|
||||
// Create a vocabulary and add two term reference fields to article nodes.
|
||||
$this->vocabulary = $this->createVocabulary();
|
||||
|
||||
@@ -51,7 +51,10 @@ class TermTest extends TaxonomyTestBase {
|
||||
$this->drupalPlaceBlock('local_tasks_block');
|
||||
$this->drupalPlaceBlock('page_title_block');
|
||||
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'bypass node access',
|
||||
]));
|
||||
$this->vocabulary = $this->createVocabulary();
|
||||
|
||||
$field_name = 'taxonomy_' . $this->vocabulary->id();
|
||||
@@ -355,7 +358,7 @@ class TermTest extends TaxonomyTestBase {
|
||||
// Check that the term is still present at admin UI after edit.
|
||||
$this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/overview');
|
||||
$this->assertText($edit['name[0][value]'], 'The randomly generated term name is present.');
|
||||
$this->assertLink(t('Edit'));
|
||||
$this->assertSession()->linkExists(t('Edit'));
|
||||
|
||||
// Check the term link can be clicked through to the term page.
|
||||
$this->clickLink($edit['name[0][value]']);
|
||||
@@ -601,7 +604,7 @@ class TermTest extends TaxonomyTestBase {
|
||||
$this->assertCount(2, $breadcrumbs, 'The breadcrumbs are present on the page.');
|
||||
$this->assertIdentical($breadcrumbs[0]->getText(), 'Home', 'First breadcrumb text is Home');
|
||||
$this->assertIdentical($breadcrumbs[1]->getText(), $term->label(), 'Second breadcrumb text is term name on term edit page.');
|
||||
$this->assertEscaped($breadcrumbs[1]->getText(), 'breadcrumbs displayed and escaped.');
|
||||
$this->assertEscaped($breadcrumbs[1]->getText());
|
||||
|
||||
// Check the breadcrumb on the term delete page.
|
||||
$this->drupalGet('taxonomy/term/' . $term->id() . '/delete');
|
||||
@@ -609,7 +612,7 @@ class TermTest extends TaxonomyTestBase {
|
||||
$this->assertCount(2, $breadcrumbs, 'The breadcrumbs are present on the page.');
|
||||
$this->assertIdentical($breadcrumbs[0]->getText(), 'Home', 'First breadcrumb text is Home');
|
||||
$this->assertIdentical($breadcrumbs[1]->getText(), $term->label(), 'Second breadcrumb text is term name on term delete page.');
|
||||
$this->assertEscaped($breadcrumbs[1]->getText(), 'breadcrumbs displayed and escaped.');
|
||||
$this->assertEscaped($breadcrumbs[1]->getText());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,10 @@ class ThemeTest extends TaxonomyTestBase {
|
||||
|
||||
// Create and log in as a user who has permission to add and edit taxonomy
|
||||
// terms and view the administrative theme.
|
||||
$admin_user = $this->drupalCreateUser(['administer taxonomy', 'view the administration theme']);
|
||||
$admin_user = $this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'view the administration theme',
|
||||
]);
|
||||
$this->drupalLogin($admin_user);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@ class TokenReplaceTest extends TaxonomyTestBase {
|
||||
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'bypass node access',
|
||||
]));
|
||||
$this->vocabulary = $this->createVocabulary();
|
||||
$this->fieldName = 'taxonomy_' . $this->vocabulary->id();
|
||||
|
||||
|
||||
@@ -57,7 +57,10 @@ class TaxonomyIndexTidUiTest extends UITestBase {
|
||||
protected function setUp($import_test_views = TRUE) {
|
||||
parent::setUp($import_test_views);
|
||||
|
||||
$this->adminUser = $this->drupalCreateUser(['administer taxonomy', 'administer views']);
|
||||
$this->adminUser = $this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'administer views',
|
||||
]);
|
||||
$this->drupalLogin($this->adminUser);
|
||||
|
||||
Vocabulary::create([
|
||||
|
||||
@@ -49,7 +49,10 @@ class TaxonomyTermViewTest extends TaxonomyTestBase {
|
||||
parent::setUp($import_test_views);
|
||||
|
||||
// Create an administrative user.
|
||||
$this->adminUser = $this->drupalCreateUser(['administer taxonomy', 'bypass node access']);
|
||||
$this->adminUser = $this->drupalCreateUser([
|
||||
'administer taxonomy',
|
||||
'bypass node access',
|
||||
]);
|
||||
$this->drupalLogin($this->adminUser);
|
||||
|
||||
// Create a vocabulary and add two term reference fields to article nodes.
|
||||
|
||||
Reference in New Issue
Block a user