public function testPromptsForListOfSpecificResourcesIfOptionIsSelected()
{
$allResources = Resource::getAllResources();
sort($allResources);
$this->adapter->expects($this->once())->method('addAccessRule')->with('foo', $this->callback(function ($rule) use($allResources) {
return $rule['users'] === '*' && $rule['resources'][0] === $allResources[0] && $rule['resources'][1] === $allResources[5];
}));
$this->adapter->expects($this->once())->method('addKeyPair')->with('foo', 'bar');
$helper = $this->command->getHelper('question');
$helper->setInputStream($this->getInputStream(['3', '0,5', '*', 'n']));
$commandTester = new CommandTester($this->command);
$commandTester->execute(['publicKey' => 'foo', 'privateKey' => 'bar']);
}