You are here

public function SwaggerUiLibraryDiscoveryTest::testLibraryDirectoryWithWarmCache in Swagger UI Field Formatter 8.3

Tests library directory with warm cache.

File

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

Class

SwaggerUiLibraryDiscoveryTest
Tests the Swagger UI library discovery service.

Namespace

Drupal\Tests\swagger_ui_formatter\Unit

Code

public function testLibraryDirectoryWithWarmCache() : void {
  $this->cache
    ->method('get')
    ->willReturn((object) [
    'data' => self::DEFAULT_LIBRARY_DIR,
  ]);
  $this->themeHandler
    ->expects($this
    ->never())
    ->method('getDefault');
  self::assertEquals(self::DEFAULT_LIBRARY_DIR, $this->swaggerUiLibraryDiscovery
    ->libraryDirectory());
}