public function DomainAccessEntityCrudTest::testNodeUpdateWithUninstalledDomainAccessFields in Domain Access 8
Tests node update with uninstalled domain access fields.
File
- domain_access/
tests/ src/ Kernel/ DomainAccessEntityCrudTest.php, line 113
Class
- DomainAccessEntityCrudTest
- Tests creation of nodes and users before and after deleting required fields.
Namespace
Drupal\Tests\domain_access\KernelCode
public function testNodeUpdateWithUninstalledDomainAccessFields() {
$node = $this
->drupalCreateNode();
$node
->save();
self::assertNotEmpty($node
->id());
$this
->deleteDomainAccessFields('node', 'page');
$reloaded_node = $this->entityTypeManager
->getStorage('node')
->load($node
->id());
$new_title = $this
->randomMachineName(8);
$reloaded_node
->setTitle($new_title);
$reloaded_node
->save();
self::assertSame($new_title, $reloaded_node
->getTitle());
}