diff --git a/core/modules/filter/src/Tests/FilterAdminTest.php b/core/modules/filter/src/Tests/FilterAdminTest.php index edda2cb..760994b 100644 --- a/core/modules/filter/src/Tests/FilterAdminTest.php +++ b/core/modules/filter/src/Tests/FilterAdminTest.php @@ -21,7 +21,7 @@ class FilterAdminTest extends WebTestBase { /** * {@inheritdoc} */ - public static $modules = ['filter', 'node']; + public static $modules = array('filter', 'node'); /** * An user with administration permissions. @@ -43,7 +43,7 @@ class FilterAdminTest extends WebTestBase { protected function setUp() { parent::setUp(); - $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']); + $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page')); // Set up the filter formats used by this test. $basic_html_format = entity_create('filter_format', array( @@ -85,24 +85,24 @@ protected function setUp() { ), )); $restricted_html_format->save(); - $full_html_format = entity_create('filter_format', [ + $full_html_format = entity_create('filter_format', array( 'format' => 'full_html', 'name' => 'Full HTML', 'weight' => 1, - 'filters' => [], - ]); + 'filters' => array(), + )); $full_html_format->save(); - $this->adminUser = $this->drupalCreateUser([ + $this->adminUser = $this->drupalCreateUser(array( 'administer filters', $basic_html_format->getPermissionName(), $restricted_html_format->getPermissionName(), $full_html_format->getPermissionName(), - ]); + )); - $this->webUser = $this->drupalCreateUser(['create page content', 'edit own page content']); - user_role_grant_permissions('authenticated', [$basic_html_format->getPermissionName()]); - user_role_grant_permissions('anonymous', [$restricted_html_format->getPermissionName()]); + $this->webUser = $this->drupalCreateUser(array('create page content', 'edit own page content')); + user_role_grant_permissions('authenticated', array($basic_html_format->getPermissionName())); + user_role_grant_permissions('anonymous', array($restricted_html_format->getPermissionName())); $this->drupalLogin($this->adminUser); } diff --git a/core/modules/filter/src/Tests/FilterFormatAccessTest.php b/core/modules/filter/src/Tests/FilterFormatAccessTest.php index 0b07ba6..f04a754 100644 --- a/core/modules/filter/src/Tests/FilterFormatAccessTest.php +++ b/core/modules/filter/src/Tests/FilterFormatAccessTest.php @@ -24,7 +24,7 @@ class FilterFormatAccessTest extends WebTestBase { * * @var array */ - public static $modules = ['filter', 'node']; + public static $modules = array('filter', 'node'); /** * A user with administrative permissions. @@ -71,7 +71,7 @@ class FilterFormatAccessTest extends WebTestBase { protected function setUp() { parent::setUp(); - $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']); + $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page')); // Create a user who can administer text formats, but does not have // specific permission to use any of them. @@ -86,10 +86,10 @@ protected function setUp() { $this->drupalLogin($this->filterAdminUser); $formats = array(); for ($i = 0; $i < 3; $i++) { - $edit = [ + $edit = array( 'format' => Unicode::strtolower($this->randomMachineName()), 'name' => $this->randomMachineName(), - ]; + ); $this->drupalPostForm('admin/config/content/formats/add', $edit, t('Save configuration')); $this->resetFilterCaches(); $formats[] = entity_load('filter_format', $edit['format']); @@ -98,22 +98,22 @@ protected function setUp() { $this->drupalLogout(); // Create a regular user with access to two of the formats. - $this->webUser = $this->drupalCreateUser([ + $this->webUser = $this->drupalCreateUser(array( 'create page content', 'edit any page content', $this->allowedFormat->getPermissionName(), $this->secondAllowedFormat->getPermissionName(), - ]); + )); // Create an administrative user who has access to use all three formats. - $this->adminUser = $this->drupalCreateUser([ + $this->adminUser = $this->drupalCreateUser(array( 'administer filters', 'create page content', 'edit any page content', $this->allowedFormat->getPermissionName(), $this->secondAllowedFormat->getPermissionName(), $this->disallowedFormat->getPermissionName(), - ]); + )); } /** diff --git a/core/modules/filter/src/Tests/FilterHtmlImageSecureTest.php b/core/modules/filter/src/Tests/FilterHtmlImageSecureTest.php index ca25860..6febe30 100644 --- a/core/modules/filter/src/Tests/FilterHtmlImageSecureTest.php +++ b/core/modules/filter/src/Tests/FilterHtmlImageSecureTest.php @@ -22,7 +22,7 @@ class FilterHtmlImageSecureTest extends WebTestBase { * * @var array */ - public static $modules = ['filter', 'node', 'comment']; + public static $modules = array('filter', 'node', 'comment'); /** * An authenticated user. @@ -56,17 +56,17 @@ protected function setUp() { $filtered_html_format->save(); // Setup users. - $this->webUser = $this->drupalCreateUser([ + $this->webUser = $this->drupalCreateUser(array( 'access content', 'access comments', 'post comments', 'skip comment approval', $filtered_html_format->getPermissionName(), - ]); + )); $this->drupalLogin($this->webUser); // Setup a node to comment and test on. - $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']); + $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page')); // Add a comment field. $this->container->get('comment.manager')->addDefaultField('node', 'page'); $this->node = $this->drupalCreateNode(); diff --git a/core/modules/filter/src/Tests/FilterSecurityTest.php b/core/modules/filter/src/Tests/FilterSecurityTest.php index 18b6b05..402dadb 100644 --- a/core/modules/filter/src/Tests/FilterSecurityTest.php +++ b/core/modules/filter/src/Tests/FilterSecurityTest.php @@ -24,7 +24,7 @@ class FilterSecurityTest extends WebTestBase { * * @var array */ - public static $modules = ['node', 'filter_test']; + public static $modules = array('node', 'filter_test'); /** * A user with administrative permissions. @@ -44,7 +44,7 @@ protected function setUp() { $filtered_html_permission = $filtered_html_format->getPermissionName(); user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array($filtered_html_permission)); - $this->adminUser = $this->drupalCreateUser(['administer modules', 'administer filters', 'administer site configuration']); + $this->adminUser = $this->drupalCreateUser(array('administer modules', 'administer filters', 'administer site configuration')); $this->drupalLogin($this->adminUser); }