We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbbf0e7 commit a90634aCopy full SHA for a90634a
1 file changed
tests/Command/WorkspaceCountCommandTest.php
@@ -83,4 +83,25 @@ public function testExecute()
83
84
$this->assertRegexp('/2/', $tester->getDisplay());
85
}
86
+
87
+ public function testExecuteWithAutoDiscovery()
88
+ {
89
+ $originalValue = $GLOBALS['_composer_autoload_path'] ?? '';
90
+ $GLOBALS['_composer_autoload_path'] = __DIR__ . '/../data/vendor/autoload.php';
91
92
+ try {
93
+ $input = [
94
+ 'command' => $this->command->getName(),
95
+ ];
96
97
+ (new Application())->add($this->command);
98
99
+ $tester = new CommandTester($this->command);
100
+ $tester->execute($input);
101
102
+ $this->assertRegexp('/2/', $tester->getDisplay());
103
+ } finally {
104
+ $GLOBALS['_composer_autoload_path'] = $originalValue;
105
+ }
106
107
0 commit comments