You are here

private function SwaggerUiLibraryDiscoveryTest::setUpLibraryDirectoryTest in Swagger UI Field Formatter 8.3

Setup method for SwaggerUiLibraryDiscovery::libraryDirectory() tests.

3 calls to SwaggerUiLibraryDiscoveryTest::setUpLibraryDirectoryTest()
SwaggerUiLibraryDiscoveryTest::testWithInvalidLibraryDirectory in tests/src/Unit/SwaggerUiLibraryDiscoveryTest.php
Tests with invalid library directory.
SwaggerUiLibraryDiscoveryTest::testWithMissingRequiredLibraryFile in tests/src/Unit/SwaggerUiLibraryDiscoveryTest.php
Tests with missing required library file.
SwaggerUiLibraryDiscoveryTest::testWithValidLibraryDirectoryColdCache in tests/src/Unit/SwaggerUiLibraryDiscoveryTest.php
Tests valid library directory with cold cache.

File

tests/src/Unit/SwaggerUiLibraryDiscoveryTest.php, line 252

Class

SwaggerUiLibraryDiscoveryTest
Tests the Swagger UI library discovery service.

Namespace

Drupal\Tests\swagger_ui_formatter\Unit

Code

private function setUpLibraryDirectoryTest() : void {
  $this->cache
    ->method('get')
    ->willReturn(NULL);
  $this->themeHandler
    ->method('getDefault')
    ->willReturn('bartik');
  $default_theme = new ActiveTheme([
    'name' => 'bartik',
  ]);
  $this->themeInitialization
    ->method('getActiveThemeByName')
    ->with($this->themeHandler
    ->getDefault())
    ->willReturn($default_theme);
  $this->themeInitialization
    ->method('loadActiveTheme')
    ->with($default_theme)
    ->willReturn(NULL);
}