public function testViewsHandlerRelationshipUserFileData(): void
{ $file = File::
create([ 'fid' => 2,
'uid' => 2,
'filename' => 'image-test.jpg',
'uri' => "public://image-test.jpg",
'filemime' => 'image/jpeg',
'created' => 1,
'changed' => 1,
]);
$file->
enforceIsNew()->
setPermanent();
file_put_contents($file->
getFileUri(),
file_get_contents('core/tests/fixtures/files/image-1.png'
));
$file->
save();
$account =
$this->
createUser();
$account->user_file->target_id = 2;
$account->
save();
$view = Views::
getView('test_file_user_file_data'
);
// Tests \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies().
$expected =
[ 'module' =>
[