Skip to content

Commit 89fcfbd

Browse files
committed
Moving around some reset logic
1 parent 0b7665b commit 89fcfbd

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/ApiClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,14 @@ public function reset(): ApiClient
7979
{
8080
$this->internalRequest = new InternalRequest($this->baseUrl, 'GET');
8181
$this->request = null;
82-
$this->response = null;
82+
$this->response = null;
83+
84+
$this->profiler = false;
85+
86+
$this->hasPerformedRequest = false;
87+
$this->kernel->shutdown();
88+
$this->kernel->boot();
89+
8390
return $this;
8491
}
8592

src/Listener/ApiClientListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ public function __construct(ApiClient $apiClient)
3333
public static function getSubscribedEvents(): array
3434
{
3535
return [
36-
ScenarioTested::BEFORE => ['resetApiClient', 10],
37-
ExampleTested::BEFORE => ['resetApiClient', 10],
36+
ScenarioTested::AFTER => ['resetApiClient', 10],
37+
ExampleTested::AFTER => ['resetApiClient', 10],
3838
];
3939
}
4040

4141
public function resetApiClient()
4242
{
4343
$this->apiClient->reset();
4444
}
45-
}
45+
}

0 commit comments

Comments
 (0)