You are here

protected function ImportExportTestBase::getFixtureExpectations in Acquia Content Hub 8.2

Returns fixture expectations.

Parameters

int $delta: Delta.

Return value

mixed Expectations array.

Throws

\Exception

1 call to ImportExportTestBase::getFixtureExpectations()
ImportExportTestBase::importFixture in tests/src/Kernel/ImportExportTestBase.php
Import fixture.

File

tests/src/Kernel/ImportExportTestBase.php, line 117

Class

ImportExportTestBase
Base for testing exports and imports.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

protected function getFixtureExpectations(int $delta) {
  if (!empty($this->fixtures[$delta])) {
    $version_directory = $this
      ->getDrupalVersion();
    $path_to_fixture = sprintf("%s/tests/fixtures/import/{$version_directory}/%s", drupal_get_path('module', 'acquia_contenthub'), $this->fixtures[$delta]['expectations']);
    return include $path_to_fixture;

    //@codingStandardsIgnoreLine
  }
  throw new \Exception(sprintf("Missing expectations for delta %d in class %s", $delta, __CLASS__));
}