listAllProfiles() public method

public listAllProfiles ( )
 public function testEncryptedAndUnencryptedFile()
 {
     if (!class_exists('\\Vault\\Vault')) {
         $this->markTestSkipped('aoepeople/vault must be installed to run this test');
     }
     putenv("VAULT_MAC_KEY=" . self::VAULT_MAC_KEY);
     putenv("VAULT_ENCRYPTION_KEY=" . self::VAULT_ENCRYPTION_KEY);
     chdir(FIXTURE_ROOT . 'ProfileManager/fixture_encrpyted_mix');
     $this->assertEquals(['test1', 'test2', 'test3', 'test1-personal', 'test2-personal'], $this->profileManager->listAllProfiles());
 }
Esempio n. 2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $profileManager = new Manager();
     $rows = [];
     foreach ($profileManager->listAllProfiles() as $profileName) {
         $rows[] = [$profileName];
     }
     $table = new \Symfony\Component\Console\Helper\Table($output);
     $table->setHeaders(array('Profile Name'))->setRows($rows);
     $table->render();
 }
Esempio n. 3
0
 protected function interact(InputInterface $input, OutputInterface $output)
 {
     $profile = $input->getArgument('profile');
     if (empty($profile)) {
         $profileManager = new Manager();
         $helper = $this->getHelper('question');
         $question = new ChoiceQuestion('Please select the profile you want to use', $profileManager->listAllProfiles());
         $question->setErrorMessage('Profile %s is invalid.');
         $profile = $helper->ask($input, $output, $question);
         $output->writeln('Selected Profile: ' . $profile);
         $input->setArgument('profile', $profile);
     }
 }