You are here

public function ApigeeEdgeCommandsTest::testCreateEdgeRole in Apigee Edge 8

Calls to Drush command should pass through to CLI service.

File

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

Class

ApigeeEdgeCommandsTest
Test ApigeeEdgeCommands class.

Namespace

Drupal\Tests\apigee_edge\Unit\Commands

Code

public function testCreateEdgeRole() {
  $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'), Argument::type('bool'))
    ->shouldHaveBeenCalledTimes(1);
}