public function testViewsHandlerRelationshipFileToNode(): void
{ $file1 = File::
create([ 'filename' => 'image-test.jpg',
'uri' => "public://image-test.jpg",
'filemime' => 'image/jpeg',
'created' => 1,
'changed' => 1,
'status' => FileInterface::STATUS_PERMANENT,
]);
$file1->
enforceIsNew();
file_put_contents($file1->
getFileUri(),
file_get_contents('core/tests/fixtures/files/image-1.png'
));
$file1->
save();
$file2 = File::
create([ 'filename' => 'image-test-2.jpg',
'uri' => "public://image-test-2.jpg",
'filemime' => 'image/jpeg',
'created' => 1,
'changed' => 1,
'status' => FileInterface::STATUS_PERMANENT,
]);
$file2->
enforceIsNew();