@@ -20,33 +20,33 @@ class ChainTest extends TestCase
2020 /** @test */
2121 public function it_is_an_exception_transformer (): void
2222 {
23- $ transformer = new Chain ();
23+ $ transformer = new Chain ([] );
2424 $ this ->assertInstanceOf (ExceptionTransformerInterface::class, $ transformer );
2525 }
2626
2727 /** @test */
2828 public function it_accepts_any_exception (): void
2929 {
30- $ transformer = new Chain ();
30+ $ transformer = new Chain ([] );
3131 $ this ->assertTrue ($ transformer ->accepts (new \Exception ()));
3232 }
3333
3434 /** @test */
3535 public function it_transforms_with_first_acceptable_transformer (): void
3636 {
37- $ transformer = new Chain (
37+ $ transformer = new Chain ([
3838 $ this ->mockTransformer (false ),
3939 $ this ->mockTransformer (true , $ apiProblem1 = $ this ->prophesize (ApiProblemInterface::class)->reveal ()),
40- $ this ->mockTransformer (true , $ apiProblem2 = $ this ->prophesize (ApiProblemInterface::class)->reveal ())
41- );
40+ $ this ->mockTransformer (true , $ apiProblem2 = $ this ->prophesize (ApiProblemInterface::class)->reveal ()),
41+ ] );
4242
4343 $ this ->assertEquals ($ apiProblem1 , $ transformer ->transform (new \Exception ()));
4444 }
4545
4646 /** @test */
4747 public function it_transforms_to_basic_exception_problem_when_no_transformer_matches (): void
4848 {
49- $ transformer = new Chain ($ this ->mockTransformer (false ));
49+ $ transformer = new Chain ([ $ this ->mockTransformer (false )] );
5050
5151 $ this ->assertInstanceOf (ExceptionApiProblem::class, $ transformer ->transform (new \Exception ()));
5252 }
0 commit comments