Skip to content
Snippets Groups Projects

Resolve #2025089 "Api ext"

Open Andrey Postnikov requested to merge issue/drupal-2025089:2025089-api-ext into 10.1.x
Files
35
@@ -4,6 +4,7 @@
use Drupal\Core\Cache\Cache;
use Drupal\Tests\BrowserTestBase;
use Drupal\user\Entity\Role;
use Drupal\user\RoleInterface;
/**
@@ -268,7 +269,7 @@ public function testBookExport() {
// Now grant anonymous users permission to view the printer-friendly
// version and verify that node access restrictions still prevent them from
// seeing it.
user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, ['access printer-friendly version']);
Role::load(RoleInterface::ANONYMOUS_ID)->grantPermission('access printer-friendly version')->save();
$this->drupalGet('book/export/html/' . $this->book->id());
$this->assertSession()->statusCodeEquals(403);
}
Loading