You are here

public function ApigeeEdgeCommandsTest::testCreateEdgeEdgeRoleWithForceParam in Apigee Edge 8

Test calling with force function when role already exists.

File

tests/src/Unit/Commands/ApigeeEdgeCommandsTest.php, line 155

Class

ApigeeEdgeCommandsTest
Test ApigeeEdgeCommands class.

Namespace

Drupal\Tests\apigee_edge\Unit\Commands

Code

public function testCreateEdgeEdgeRoleWithForceParam() {
  $drush_options = [
    'password' => 'opensesame',
    'base-url' => 'http://api.apigee.com/v1',
    'role-name' => 'portalRole',
    'force' => TRUE,
  ];
  $this->apigeeEdgeCommands
    ->createEdgeRole('orgA', 'emailA', $drush_options);
  $this->cliService
    ->createEdgeRoleForDrupal(Argument::type(DrushStyle::class), Argument::type('string'), Argument::type('string'), Argument::type('string'), Argument::type('string'), Argument::type('string'), Argument::type('string'), TRUE)
    ->shouldHaveBeenCalledTimes(1);
}