@@ -48,10 +48,10 @@ public function testInOrder(FixerInterface $firstFixer, FixerInterface $secondFi
4848 Tokens::clearCache ();
4949 $ tokens = Tokens::fromCode ($ input );
5050
51- $ firstFixer ->fix ($ this ->createMock (\SplFileInfo::class ), $ tokens );
51+ $ firstFixer ->fix ($ this ->createSplFileInfoDouble ( ), $ tokens );
5252 $ tokens ->clearEmptyTokens ();
5353
54- $ secondFixer ->fix ($ this ->createMock (\SplFileInfo::class ), $ tokens );
54+ $ secondFixer ->fix ($ this ->createSplFileInfoDouble ( ), $ tokens );
5555 $ tokens ->clearEmptyTokens ();
5656
5757 self ::assertSame ($ expected , $ tokens ->generateCode ());
@@ -68,10 +68,10 @@ public function testInRevertedOrder(FixerInterface $firstFixer, FixerInterface $
6868 Tokens::clearCache ();
6969 $ tokens = Tokens::fromCode ($ input );
7070
71- $ secondFixer ->fix ($ this ->createMock (\SplFileInfo::class ), $ tokens );
71+ $ secondFixer ->fix ($ this ->createSplFileInfoDouble ( ), $ tokens );
7272 $ tokens ->clearEmptyTokens ();
7373
74- $ firstFixer ->fix ($ this ->createMock (\SplFileInfo::class ), $ tokens );
74+ $ firstFixer ->fix ($ this ->createSplFileInfoDouble ( ), $ tokens );
7575 $ tokens ->clearEmptyTokens ();
7676
7777 self ::assertNotSame ($ expected , $ tokens ->generateCode ());
@@ -130,4 +130,9 @@ private static function getFixer(string $name, array $config): FixerInterface
130130
131131 throw new \Exception (\sprintf ('Fixer "%s" not found in config: "%s". ' , $ name , \json_encode ($ config )));
132132 }
133+
134+ private function createSplFileInfoDouble (): \SplFileInfo
135+ {
136+ return new class ('' ) extends \SplFileInfo {};
137+ }
133138}
0 commit comments