public function UserUpdateOrderPermissionsTest::testPermissionsOrder in Drupal 8
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'));
}