You are here

public function CreateEdgeRoleCommandTest::testCreateEdgeRoleForceParam in Apigee Edge 8

Calls to Drush command should pass through to CLI service.

File

tests/src/Unit/Command/CreateEdgeRoleCommandTest.php, line 144

Class

CreateEdgeRoleCommandTest
Test ApigeeEdgeCommands class.

Namespace

Drupal\Tests\apigee_edge\Unit\Command

Code

public function testCreateEdgeRoleForceParam() {
  $this->input
    ->getArgument(Argument::is('org'))
    ->willReturn('myorg');
  $this->input
    ->getArgument(Argument::is('email'))
    ->willReturn('email@example.com');
  $this->input
    ->getOption(Argument::is('password'))
    ->willReturn('secret');
  $this->input
    ->getOption(Argument::is('base-url'))
    ->willReturn('http://base-url');
  $this->input
    ->getOption(Argument::is('role-name'))
    ->willReturn('custom_drupal_role');
  $this->input
    ->getOption(Argument::is('force'))
    ->willReturn('true');
  $this->createEdgeRoleCommand
    ->execute($this->input
    ->reveal(), $this->output
    ->reveal());
  $this->cliService
    ->createEdgeRoleForDrupal(Argument::type(DrupalStyle::class), Argument::type('string'), Argument::type('string'), Argument::type('string'), Argument::type('string'), Argument::type('string'), Argument::type('string'), Argument::type('bool'))
    ->shouldHaveBeenCalledTimes(1);
}