/**
* @backupGlobals enabled
*/
public function testExecute() { $vault =
$this->
createMock(AbstractVault::
class);
$vault->
method('list'
)->
willReturn(['A' => 'a', 'B' => 'b', 'C' => null, 'D' => null, 'E' => null
]);
$_ENV =
['A' => '', 'B' => 'A', 'C' => '', 'D' => false, 'E' => null
];
$localVault =
new DotenvVault('/not/a/path'
);
$command =
new SecretsListCommand($vault,
$localVault);
$tester =
new CommandTester($command);
$this->
assertSame(0,
$tester->
execute([]));
$expectedOutput = <<<EOTXT
// Use "%%env(<name>)%%" to reference a secret in a config file.
// To reveal the secrets run %s secrets:list --reveal
-------- -------- -------------
Secret Value Local Value
-------- -------- -------------
A "a"
B "b" ******
C ******
D ****** ******
E ******
-------- -------- -------------
// Local values override secret values.
// Use secrets:set --local to define them.