This commit is contained in:
2020-07-13 17:09:59 +02:00
parent 03559a7b76
commit 3a082e23cc
492 changed files with 4129 additions and 982 deletions
@@ -35,7 +35,9 @@ class ConfigDependencyWebTest extends BrowserTestBase {
* @see \Drupal\Core\Config\Entity\ConfigDependencyDeleteFormTrait
*/
public function testConfigDependencyDeleteFormTrait() {
$this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
$this->drupalLogin($this->drupalCreateUser([
'administer site configuration',
]));
/** @var \Drupal\Core\Config\Entity\ConfigEntityStorage $storage */
$storage = $this->container->get('entity_type.manager')->getStorage('config_test');
@@ -25,7 +25,9 @@ class ConfigEntityFormOverrideTest extends BrowserTestBase {
* Tests that overrides do not affect forms or listing screens.
*/
public function testFormsWithOverrides() {
$this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
$this->drupalLogin($this->drupalCreateUser([
'administer site configuration',
]));
$original_label = 'Default';
$overridden_label = 'Overridden label';
@@ -41,7 +41,10 @@ class ConfigEntityListMultilingualTest extends BrowserTestBase {
*/
public function testListUI() {
// Log in as an administrative user to access the full menu trail.
$this->drupalLogin($this->drupalCreateUser(['access administration pages', 'administer site configuration']));
$this->drupalLogin($this->drupalCreateUser([
'access administration pages',
'administer site configuration',
]));
// Get the list page.
$this->drupalGet('admin/structure/config_test');
@@ -156,7 +156,10 @@ class ConfigEntityListTest extends BrowserTestBase {
*/
public function testListUI() {
// Log in as an administrative user to access the full menu trail.
$this->drupalLogin($this->drupalCreateUser(['access administration pages', 'administer site configuration']));
$this->drupalLogin($this->drupalCreateUser([
'access administration pages',
'administer site configuration',
]));
// Get the list callback page.
$this->drupalGet('admin/structure/config_test');
@@ -190,7 +193,7 @@ class ConfigEntityListTest extends BrowserTestBase {
$this->assertNotEmpty($elements[2]->find('xpath', '//ul'), 'Operations list found.');
// Add a new entity using the operations link.
$this->assertLink('Add test configuration');
$this->assertSession()->linkExists('Add test configuration');
$this->clickLink('Add test configuration');
$this->assertSession()->statusCodeEquals(200);
$edit = [
@@ -254,7 +257,9 @@ class ConfigEntityListTest extends BrowserTestBase {
* Test paging.
*/
public function testPager() {
$this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
$this->drupalLogin($this->drupalCreateUser([
'administer site configuration',
]));
$storage = \Drupal::service('entity_type.manager')->getListBuilder('config_test')->getStorage();
@@ -27,7 +27,9 @@ class ConfigEntityStatusUITest extends BrowserTestBase {
* Tests status operations.
*/
public function testCRUD() {
$this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
$this->drupalLogin($this->drupalCreateUser([
'administer site configuration',
]));
$id = strtolower($this->randomMachineName());
$edit = [
@@ -236,7 +236,9 @@ class ConfigEntityTest extends BrowserTestBase {
* Tests CRUD operations through the UI.
*/
public function testCRUDUI() {
$this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
$this->drupalLogin($this->drupalCreateUser([
'administer site configuration',
]));
$id = strtolower($this->randomMachineName());
$label1 = $this->randomMachineName();
@@ -21,7 +21,10 @@ class ConfigFormOverrideTest extends BrowserTestBase {
* Tests that overrides do not affect forms.
*/
public function testFormsWithOverrides() {
$this->drupalLogin($this->drupalCreateUser(['access administration pages', 'administer site configuration']));
$this->drupalLogin($this->drupalCreateUser([
'access administration pages',
'administer site configuration',
]));
$overridden_name = 'Site name global conf override';
@@ -34,7 +34,11 @@ class ConfigInstallWebTest extends BrowserTestBase {
protected function setUp() {
parent::setUp();
$this->adminUser = $this->drupalCreateUser(['administer modules', 'administer themes', 'administer site configuration']);
$this->adminUser = $this->drupalCreateUser([
'administer modules',
'administer themes',
'administer site configuration',
]);
// Ensure the global variable being asserted by this test does not exist;
// a previous test executed in this request/process might have set it.
@@ -40,7 +40,10 @@ class ConfigLanguageOverrideWebTest extends BrowserTestBase {
* Tests translating the site name.
*/
public function testSiteNameTranslation() {
$adminUser = $this->drupalCreateUser(['administer site configuration', 'administer languages']);
$adminUser = $this->drupalCreateUser([
'administer site configuration',
'administer languages',
]);
$this->drupalLogin($adminUser);
// Add a custom language.
@@ -25,7 +25,9 @@ class ConfigEntityTest extends WebDriverTestBase {
* Tests ajax operations through the UI on 'Add' page.
*/
public function testAjaxOnAddPage() {
$this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
$this->drupalLogin($this->drupalCreateUser([
'administer site configuration',
]));
$page = $this->getSession()->getPage();
$assert_session = $this->assertSession();