public function CreateEdgeRoleCommandTest::testInteractWithPasswordParam in Apigee Edge 8
Test validateCreateEdgeRole function does not prompt for password.
When password option is set, do not prompt for password.
File
- tests/
src/ Unit/ Command/ CreateEdgeRoleCommandTest.php, line 171
Class
- CreateEdgeRoleCommandTest
- Test ApigeeEdgeCommands class.
Namespace
Drupal\Tests\apigee_edge\Unit\CommandCode
public function testInteractWithPasswordParam() {
$this->input
->getArgument(Argument::type('string'))
->willReturn('XXX');
$this->input
->getOption('password')
->willReturn('secret');
$this->input
->getOption(Argument::type('string'))
->willReturn('XXX');
$this->input
->isInteractive()
->willReturn(FALSE);
$this->createEdgeRoleCommand
->interact($this->input
->reveal(), $this->output
->reveal());
// Interact should not change password since it was passed in.
$this->input
->getOption('password')
->shouldHaveBeenCalled();
$this->input
->setOption('password')
->shouldNotHaveBeenCalled();
}