File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,4 +103,26 @@ public function testExecute()
103103
104104 $ this ->assertRegexp ('/ADR created successfully/ ' , $ tester ->getDisplay ());
105105 }
106+
107+ public function testExecuteWithAutoDiscovery ()
108+ {
109+ $ originalValue = $ GLOBALS ['_composer_autoload_path ' ] ?? '' ;
110+ $ GLOBALS ['_composer_autoload_path ' ] = __DIR__ . '/../data/vendor/autoload.php ' ;
111+
112+ try {
113+ (new Application ())->add ($ this ->command );
114+
115+ $ tester = new CommandTester ($ this ->command );
116+
117+ $ tester ->execute ([
118+ 'command ' => $ this ->command ->getName (),
119+ 'title ' => 'Foo ' ,
120+ ]);
121+
122+ $ this ->assertRegexp ('/ADR created successfully/ ' , $ tester ->getDisplay ());
123+
124+ } finally {
125+ $ GLOBALS ['_composer_autoload_path ' ] = $ originalValue ;
126+ }
127+ }
106128}
Original file line number Diff line number Diff line change 11directory : tests/data/docs/arch
22template :
3- decision-record : . /skeleton.md
3+ decision-record : tests/data /skeleton.md
You can’t perform that action at this time.
0 commit comments