You are here

protected function ApiProductAccessTest::checkProductVisibility in Apigee Edge 8

Validates visible and hidden API products on a page.

Parameters

array $visible: Array of API product visibilities that should be on the page.

array $hidden: Array of API product visibilities that should not be on the page.

1 call to ApiProductAccessTest::checkProductVisibility()
ApiProductAccessTest::developerAppEditFormTest in tests/src/FunctionalJavascript/ApiProductAccessTest.php
Test for developer app/edit form.

File

tests/src/FunctionalJavascript/ApiProductAccessTest.php, line 502

Class

ApiProductAccessTest
Validates built-in access control on API products.

Namespace

Drupal\Tests\apigee_edge\FunctionalJavascript

Code

protected function checkProductVisibility(array $visible = [], array $hidden = []) {
  foreach ($visible as $visibility) {
    $this
      ->assertSession()
      ->pageTextContains($this->apiProducts[$visibility]
      ->label());
  }
  foreach ($hidden as $visibility) {
    $this
      ->assertSession()
      ->pageTextNotContains($this->apiProducts[$visibility]
      ->label());
  }
}