You are here

public function ApigeeEdgeCommandsTest::testCreateEdgeEdgeRoleWithoutForceParam in Apigee Edge 8

Test calling when role exists but force flag not given, should error.

File

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

Class

ApigeeEdgeCommandsTest
Test ApigeeEdgeCommands class.

Namespace

Drupal\Tests\apigee_edge\Unit\Commands

Code

public function testCreateEdgeEdgeRoleWithoutForceParam() {
  $drush_options = [
    'password' => 'opensesame',
    'base-url' => 'http://api.apigee.com/v1',
    'role-name' => 'portalRole',
    'force' => FALSE,
  ];
  $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'), FALSE)
    ->shouldHaveBeenCalledTimes(1);
}