protected function ApiDocsJsonApi::setUp in Apigee API Catalog 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/ApiDocsJsonApi.php \Drupal\Tests\apigee_api_catalog\Functional\ApiDocsJsonApi::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ ApiDocsJsonApi.php, line 65
Class
- ApiDocsJsonApi
- Tests listing API Docs using JSON:API.
Namespace
Drupal\Tests\apigee_api_catalog\FunctionalCode
protected function setUp() {
parent::setUp();
// Create published apidoc.
$apidoc_published = ApiDoc::create([
'name' => 'Published',
'description' => 'Published API',
'spec' => NULL,
'status' => 1,
]);
$apidoc_published
->save();
$this->apidocPublished = $apidoc_published;
// Create unpublished apidoc.
$apidoc_unpublished = ApiDoc::create([
'name' => 'Unpublished',
'description' => 'Unpublished API',
'spec' => NULL,
'status' => 0,
]);
$apidoc_unpublished
->save();
$this->apidocUnpublished = $apidoc_unpublished;
}