File tree Expand file tree Collapse file tree
tests/Composer/Capability Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,4 +104,30 @@ public function getCommandsWillReturnComposerProxyCommandsForRegisteredSymfonyCo
104104 self ::assertInstanceOf (ProxyCommand::class, $ command );
105105 self ::assertSame ('agents ' , $ command ->getName ());
106106 }
107+
108+ /**
109+ * @return void
110+ */
111+ #[Test]
112+ public function getCommandsWillIgnoreAliasEntriesFromApplicationAllRegistry (): void
113+ {
114+ $ symfonyCommand = new FixtureWithoutAsCommand ('reports:tests ' );
115+ $ symfonyCommand ->setAliases (['tests ' ]);
116+ $ symfonyCommand ->setDescription ('Runs PHPUnit tests. ' );
117+ $ symfonyCommand ->setHelp ('' );
118+ $ symfonyCommand ->setHidden (false );
119+
120+ $ this ->devTools ->all ()
121+ ->willReturn ([
122+ 'reports:tests ' => $ symfonyCommand ,
123+ 'tests ' => $ symfonyCommand ,
124+ ])
125+ ->shouldBeCalledOnce ();
126+
127+ $ commands = $ this ->commandProvider ->getCommands ();
128+
129+ self ::assertCount (1 , $ commands );
130+ self ::assertInstanceOf (ProxyCommand::class, $ commands [0 ]);
131+ self ::assertSame ('reports:tests ' , $ commands [0 ]->getName ());
132+ }
107133}
You can’t perform that action at this time.
0 commit comments