You are here

public function MinisiteTestBase::getTestFilesStubValid in Mini site 8

Get valid test files stub.

6 calls to MinisiteTestBase::getTestFilesStubValid()
MinisiteTest::testMinisiteInstance in tests/src/Functional/MinisiteTest.php
Test working with Minisite class instance.
MinisiteTestBase::getTestArchiveValid in tests/src/Functional/MinisiteTestBase.php
Shorthand to get a valid archive file.
UploadBrowseAliasPathautoTest::testUploadAndBrowsingAlias in tests/src/Functional/UploadBrowseAliasPathautoTest.php
Tests ZIP file upload and browsing minisite pages with Pathauto alias.
UploadBrowseAliasTest::testUploadAndBrowsingAlias in tests/src/Functional/UploadBrowseAliasTest.php
Tests ZIP file upload and browsing minisite pages with alias.
UploadBrowseTest::testUploadAndBrowsing in tests/src/Functional/UploadBrowseTest.php
Tests ZIP file upload and browsing minisite pages.

... See full list

File

tests/src/Functional/MinisiteTestBase.php, line 292

Class

MinisiteTestBase
Provides methods specifically for testing Minisite module's field handling.

Namespace

Drupal\Tests\minisite\Functional

Code

public function getTestFilesStubValid() {
  return [
    'parent' . DIRECTORY_SEPARATOR . 'index.html' => $this
      ->fixtureHtmlPage('Index page', $this
      ->fixtureLink('Go to Page 1', 'page1.html')),
    'parent' . DIRECTORY_SEPARATOR . 'page1.html' => $this
      ->fixtureHtmlPage('Page 1', $this
      ->fixtureLink('Go to Page 2', 'page2.html')),
    'parent' . DIRECTORY_SEPARATOR . 'page2.html' => $this
      ->fixtureHtmlPage('Page 2'),
    'parent' . DIRECTORY_SEPARATOR . 'image.jpg' => file_get_contents($this
      ->getFixtureFileDir() . DIRECTORY_SEPARATOR . 'example.jpeg'),
  ];
}