Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up coverage for MysqlImport::runIt() file checker #4378

Open
paul-m opened this issue Jan 8, 2025 · 0 comments
Open

Follow-up coverage for MysqlImport::runIt() file checker #4378

paul-m opened this issue Jan 8, 2025 · 0 comments

Comments

@paul-m
Copy link
Contributor

paul-m commented Jan 8, 2025

This is a follow-up to #4359 where we discovered that MysqlImport::runIt() checks for the existence of a file, and this behavior wasn't covered by a test.

This gives us two things to do:

  1. Generate test coverage for:
    // Attempt to resolve resource file name from file path.
    if (($file_path = \Drupal::service('file_system')->realpath($this->resource->getFilePath(TRUE))) === FALSE) {
      return $this->setResultError(sprintf(
        'Unable to resolve file name "%s" for resource with identifier "%s".',
        $this->resource->getFilePath(TRUE),
        $this->resource->getUniqueIdentifier())
      );
    }
  1. Determine why MysqlImport performs this check on the file, but ImportJob does not. If needed, turn this file check into a separate method on ImportJob and then both subclasses can use it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant