Today Imbo\BehatApiExtension\Context\Initializer\ApiClientAwareInitializer injects the same instance of the Guzzle HTTP Client into contexts implementing the Imbo\BehatApiExtension\Context\ApiClientAwareContext interface.
when it initializes the context. We might not want the same instance all over the place since we can end up changing the handler stack in one test, and this will be carried over to other tests as well.
The initializer is only constructed once, and holds an instance of the client, so this can easily be fixed by injecting a clone of the client for all contexts that implement the said interface.
Today
Imbo\BehatApiExtension\Context\Initializer\ApiClientAwareInitializer
injects the same instance of the Guzzle HTTP Client into contexts implementing theImbo\BehatApiExtension\Context\ApiClientAwareContext
interface. when it initializes the context. We might not want the same instance all over the place since we can end up changing the handler stack in one test, and this will be carried over to other tests as well.The initializer is only constructed once, and holds an instance of the client, so this can easily be fixed by injecting a clone of the client for all contexts that implement the said interface.