// When the published node is also unpublished, the image should also
// become inaccessible to anonymous users.
- $published_node->setPublished(FALSE)->save();
+ $published_node->setUnpublished()->save();
$this->drupalGet($published_node->toUrl());
$this->assertSession()->statusCodeEquals(403);
// Disallow anonymous users to view the entity, which then should also
// disallow them to view the image.
- $published_node->setPublished(TRUE)->save();
+ $published_node->setPublished()->save();
Role::load(RoleInterface::ANONYMOUS_ID)
->revokePermission('access content')
->save();