$node = Node::
load($nid);
$this->
assertNotNull($node, 'The node was loaded successfully.'
);
$this->
assertFileExists(File::
load($node->field_image->target_id
)->
getFileUri());
} } /**
* Tests file submission for an anonymous visitor with a missing node title.
*/
public function testAnonymousNodeWithFileWithoutTitle() { $this->
drupalLogout();
$this->
doTestNodeWithFileWithoutTitle();
} /**
* Tests file submission for an authenticated user with a missing node title.
*/
public function testAuthenticatedNodeWithFileWithoutTitle() { $admin_user =
$this->
drupalCreateUser([ 'bypass node access',
'access content overview',
'administer nodes',
]);