*/
trait DiceHttpMockHandlerTrait
{
+ use FixtureTestTrait;
+
/**
* Handler for mocking requests anywhere for testing purpose
*
protected function setupHttpMockHandler(): void
{
- if (!empty($this->httpRequestHandler) && $this->httpRequestHandler instanceof HandlerStack) {
- return;
- }
+ $this->setUpFixtures();
$this->httpRequestHandler = HandlerStack::create();
DI::init($newDice);
}
- protected function tearDown(): void
+ protected function tearDownHandler(): void
{
- \Mockery::close();
-
- parent::tearDown();
+ $this->tearDownFixtures();
}
}