Skip to content

Commit 3c730f3

Browse files
committed
Updating eventSubscriber to use fileInterface.
1 parent e378ccf commit 3c730f3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/modules/graphql_file_validate/graphql_file_validate.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ type: module
22
name: GraphQL File Validate Test
33
description: Tests file validate on uploads.
44
package: Testing
5-
hidden: TRUE
5+
hidden: TRUE

tests/modules/graphql_file_validate/graphql_file_validate.module

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use Drupal\file\FileInterface;
1010
/**
1111
* Test to validate file exists.
1212
*/
13-
function graphql_file_validate(FileInterface $file): void {
13+
function graphql_file_validate_test_file(FileInterface $file): void {
1414
if (!file_exists($file->getFileUri())) {
1515
throw new \Exception('File does not exist during validation: ' . $file->getFileUri());
1616
}

tests/modules/graphql_file_validate/src/EventSubscriber/GraphqlFileValidationTestSubscriber.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GraphqlFileValidationTestSubscriber implements EventSubscriberInterface {
1919
* The event.
2020
*/
2121
public function onFileValidation(FileValidationEvent $event): void {
22-
graphql_file_validate('validate', [$event->file->id()]);
22+
graphql_file_validate_test_file($event->file);
2323
}
2424

2525
/**

0 commit comments

Comments
 (0)