Skip to content

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

@paul-m

Description

@paul-m

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions