public function DeveloperAppUITest::testAppCrudSingleProductAdd in Apigee Edge 8
Creates an app with no products and then adds one.
File
- tests/
src/ Functional/ DeveloperAppUITest.php, line 359
Class
- DeveloperAppUITest
- Developer app UI tests.
Namespace
Drupal\Tests\apigee_edge\FunctionalCode
public function testAppCrudSingleProductAdd() {
$this
->submitAdminForm([
'multiple_products' => FALSE,
]);
$this->products[] = $this
->createProduct();
$this
->assertAppCrud(function (array $data) : array {
$data['api_products'] = $this->products[1]
->getName();
return $data;
}, function () {
$this
->assertSession()
->pageTextContains($this->products[1]
->label());
}, function (array $data, string $credential_id) : array {
$data["credential[{$credential_id}][api_products]"] = $this->products[0]
->getName();
return $data;
}, function () {
$this
->assertSession()
->pageTextContains($this->products[0]
->label());
});
}