Issue #3358586 by godotislate, kala4ek, jaswinsingh, benjifisher, creact,...
Issue #3358586 by godotislate, kala4ek, jaswinsingh, benjifisher, creact, catch, simohell, alexpott, alfthecat, aaronbauman, rupertj, poker10: RuntimeException: Adding non-existent permissions to a role is not allowed
thrownew\RuntimeException('Adding non-existent permissions to a role is not allowed. The incorrect permissions are "'.implode('", "',$invalid_permissions).'".');
\Drupal::logger('user')->error('Non-existent permission(s) assigned to role "@label" (@id) were removed. Invalid permission(s): @permissions.',[
$this->assertSame('does not exist',$log_message[2]['@permissions']);
// A multiple permissions that do not exist.
// Multiple permissions that do not exist.
$this->expectException(\RuntimeException::class);
$this->expectExceptionMessage('Adding non-existent permissions to a role is not allowed. The incorrect permissions are "does not exist, also does not exist".');