Any of you smart people ever mocked Composer in a test? If so, how did you do you do it?

https://github.com/composer/composer/discussions/12755

@seldaek

@emd mock what exactly?

@seldaek I need to mock enough so this code (in a Composer hook) returns an array.

This class adds namespaces: https://github.com/edalzell/laravel-features/blob/d1725103a0fc261af974bd2ad48d219c03832569/src/Composer/FeatureNamespaces.php#L9

@emd i think I'd just create a composer instance, and package instance, call basic setters on them so the code runs.. Shouldn't require too much setup as constructors args are light.
@seldaek ok thanks for your advice, appreciate it.