public function testLocalLoadsTheComposerJsonContents(): void
{ $plugins =
(new PluginFinder(new PackageProvider()))->
findPlugins( __DIR__ . '/_fixture/LocallyInstalledPlugins',
__DIR__ . '/_fixture/ComposerProject',
new ExceptionCollection(),
new NullIO() );
static::
assertCount(2,
$plugins);
static::
assertSame($plugins['Swag\Test'
]->
getBaseClass(), 'Swag\Test'
);
} /*
* Referring to __DIR__ . '/_fixture/', you can see that we have the same plugin installed locally (residing inside
* the directory for locally installed plugins) and via composer (residing in the vendor directory and being
* registered in the installed.json). The Pluginfinder should always consider plugin definitions found via composer
* over those found in the local directory.
*/
public function testConsidersComposerInstalledPluginsOverLocalInstalledPlugins(): void
{ $plugins =
(new PluginFinder(new PackageProvider()))->
findPlugins(