protected function SmartdocRoutingTest::setUp in Apigee API Catalog 8
Overrides KernelTestBase::setUp
File
- tests/src/ Kernel/ SmartdocRoutingTest.php, line 61 
Class
- SmartdocRoutingTest
- Tests smartdoc routing compatibility.
Namespace
Drupal\Tests\apigee_api_catalog\KernelCode
protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('apidoc');
  $this->apidoc = ApiDoc::create([
    'name' => 'API 1',
    'description' => 'Test API 1',
    'spec' => NULL,
    'api_product' => NULL,
  ]);
  $this->apidoc
    ->save();
  // Prepare to create a user.
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  // Rendering an apidoc requires the default filter formats be installed.
  $this
    ->installConfig([
    'filter',
  ]);
  $user = $this
    ->createUser([
    'view published apidoc entities',
  ]);
  $this
    ->setCurrentUser($user);
}