You are here

protected function SwaggerUiFieldFormatterTest::setUp in Swagger UI Field Formatter 8.3

Overrides BrowserTestBase::setUp

File

tests/src/FunctionalJavascript/SwaggerUiFieldFormatterTest.php, line 42

Class

SwaggerUiFieldFormatterTest
Tests file and link field formatters.

Namespace

Drupal\Tests\swagger_ui_formatter\FunctionalJavascript

Code

protected function setUp() : void {
  parent::setUp();
  $this->fileSystem = $this->container
    ->get('file_system');
  $module_path = drupal_get_path('module', 'swagger_ui_formatter');

  // Copy fixtures to the public filesystem so they could be access from the
  // browser.
  $this->fileSystem
    ->copy(DRUPAL_ROOT . '/' . $module_path . '/tests/fixtures/openapi20/petstore-expanded.yaml', PublicStream::basePath());
  $this->fileSystem
    ->copy(DRUPAL_ROOT . '/' . $module_path . '/tests/fixtures/openapi30/uspto.yaml', PublicStream::basePath());
}