Skip to content

Commit

Permalink
Merge branch 'main' of github.com:stfndamjanovic/php-circuit-breaker
Browse files Browse the repository at this point in the history
  • Loading branch information
stfndamjanovic committed Jan 11, 2024
2 parents 4eacce6 + 03cd510 commit 383795e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/CircuitBreakerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function test_if_it_will_transit_back_to_open_state_after_first_fail()

public function test_if_listener_is_called()
{
$object = new class extends CircuitBreakerListener {
$object = new class () extends CircuitBreakerListener {
public int $successCount = 0;
public int $failCount = 0;

Expand Down Expand Up @@ -211,7 +211,7 @@ public function onFail($exception): void

public function test_if_it_can_skip_some_exception()
{
$testException = new class extends \Exception {};
$testException = new class () extends \Exception {};

$factory = CircuitBreakerFactory::make()
->skipFailure(function (\Exception $exception) use ($testException) {
Expand All @@ -235,7 +235,7 @@ public function test_if_it_can_fail_even_without_exception()
});

try {
$factory->call(fn() => new \stdClass());
$factory->call(fn () => new \stdClass());
} catch (\Exception) {

}
Expand Down

0 comments on commit 383795e

Please sign in to comment.