Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3 from loveOSS/improved-events
Browse files Browse the repository at this point in the history
Improved events
  • Loading branch information
Mickaël Andrieu authored May 11, 2019
2 parents e5c315f + ff18a69 commit 1285af0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/SymfonyCircuitBreaker.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private function dispatch($eventName, $service, array $parameters): object

return $this->eventDispatcher
->dispatch(
$eventName,
'resiliency.' . strtolower($eventName),
$event
)
;
Expand Down
2 changes: 1 addition & 1 deletion tests/CircuitBreakerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract class CircuitBreakerTestCase extends TestCase
*
* @return GuzzleClient
*/
protected function getTestClient() : GuzzleClient
protected function getTestClient(): GuzzleClient
{
$mock = new MockHandler([
new RequestException('Service unavailable', new Request('GET', 'test')),
Expand Down
8 changes: 4 additions & 4 deletions tests/SymfonyCircuitBreakerEventsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ function () {
$invocations = $this->spy->getInvocations();
$this->assertCount(4, $invocations);

$this->assertSame('INITIATING', $invocations[0]->getParameters()[0]);
$this->assertSame('TRIAL', $invocations[1]->getParameters()[0]);
$this->assertSame('TRIAL', $invocations[2]->getParameters()[0]);
$this->assertSame('OPENING', $invocations[3]->getParameters()[0]);
$this->assertSame('resiliency.initiating', $invocations[0]->getParameters()[0]);
$this->assertSame('resiliency.trial', $invocations[1]->getParameters()[0]);
$this->assertSame('resiliency.trial', $invocations[2]->getParameters()[0]);
$this->assertSame('resiliency.opening', $invocations[3]->getParameters()[0]);
}

private function createCircuitBreaker(): SymfonyCircuitBreaker
Expand Down

0 comments on commit 1285af0

Please sign in to comment.