You are here

protected function DeveloperAppUITestTrait::submitAdminForm in Apigee Edge 8

Submits the create app admin form.

Parameters

array $changes: Settings to save.

8 calls to DeveloperAppUITestTrait::submitAdminForm()
DeveloperAppUITest::testAppCrudMultipleProductsAdd in tests/src/Functional/DeveloperAppUITest.php
Creates an app with no products and then adds multiple ones.
DeveloperAppUITest::testAppCrudMultiplePruductsRemove in tests/src/Functional/DeveloperAppUITest.php
Creates an app with multiple products and then removes them.
DeveloperAppUITest::testAppCrudSingleProductAdd in tests/src/Functional/DeveloperAppUITest.php
Creates an app with no products and then adds one.
DeveloperAppUITest::testAppCrudSingleProductChange in tests/src/Functional/DeveloperAppUITest.php
Creates an app with a single product and then removes the product.
DeveloperAppUITest::testAppDefaultProduct in tests/src/Functional/DeveloperAppUITest.php
Creates an app with the default product.

... See full list

File

tests/src/Functional/DeveloperAppUITestTrait.php, line 89

Class

DeveloperAppUITestTrait
Contains re-usable components for developer app UI tests.

Namespace

Drupal\Tests\apigee_edge\Functional

Code

protected function submitAdminForm(array $changes = []) {
  $url = Url::fromRoute('apigee_edge.settings.general_app');
  $this
    ->drupalGet($url);
  $data = $changes + [
    'display_as_select' => FALSE,
    'user_select' => TRUE,
    'multiple_products' => TRUE,
  ];
  $multiple_products = $data['multiple_products'];
  unset($data['multiple_products']);
  $this
    ->config('apigee_edge.common_app_settings')
    ->set('multiple_products', $multiple_products)
    ->save();
  $this
    ->drupalPostForm($url, $data, 'Save configuration');
}