$GLOBALS['entity_crud_hook_test'
] =
[];
$file = File::
load($file->
id());
$this->
assertHookMessageOrder([ 'entity_crud_hook_test_entity_load called for type file',
'entity_crud_hook_test_file_load called',
]);
$GLOBALS['entity_crud_hook_test'
] =
[];
$file->
setFilename('new.entity_crud_hook_test.file'
);
$file->
save();
$this->
assertHookMessageOrder([ 'entity_crud_hook_test_file_presave called',
'entity_crud_hook_test_entity_presave called for type file',
'entity_crud_hook_test_file_update called',
'entity_crud_hook_test_entity_update called for type file',
]);
$GLOBALS['entity_crud_hook_test'
] =
[];
$file->
delete();