function UserUpdateOrderPermissionsTest::testPermissionsOrder
Tests that permissions are ordered by machine name.
File
-
core/
modules/ user/ tests/ src/ Functional/ Update/ UserUpdateOrderPermissionsTest.php, line 27
Class
- UserUpdateOrderPermissionsTest
- Tests user permissions sort upgrade path.
Namespace
Drupal\Tests\user\Functional\UpdateCode
public function testPermissionsOrder() {
$authenticated = \Drupal::config('user.role.authenticated');
$permissions = $authenticated->get('permissions');
sort($permissions);
$this->assertNotSame($permissions, $authenticated->get('permissions'));
$this->runUpdates();
$authenticated = \Drupal::config('user.role.authenticated');
$this->assertSame($permissions, $authenticated->get('permissions'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.