@@ -52,11 +52,12 @@ public function testOnPostInstallAlreadyContainsInjection(): void
5252 $ matcher = static ::exactly (2 );
5353 $ this ->stream ->expects ($ matcher )
5454 ->method ('info ' )->willReturnCallback (function (...$ parameters ) use ($ matcher ) {
55+ static ::assertIsString ($ parameters [0 ]);
5556 if ($ matcher ->numberOfInvocations () === 1 ) {
56- $ this -> assertSame ( static ::stringContains ('read ' ) , $ parameters [0 ]);
57+ static ::assertStringContainsString ('read ' , $ parameters [0 ]);
5758 }
5859 if ($ matcher ->numberOfInvocations () === 2 ) {
59- $ this -> assertSame ( static ::stringContains ('is already modified ' ) , $ parameters [0 ]);
60+ static ::assertStringContainsString ('is already modified ' , $ parameters [0 ]);
6061 }
6162 });
6263
@@ -75,8 +76,9 @@ public function testOnPostInstallShouldErrorWhenMessageCountCantBeFound(): void
7576 $ this ->stream ->expects ($ matcher )
7677 ->method ('error ' )
7778 ->willReturnCallback (function (...$ parameters ) use ($ matcher ) {
79+ static ::assertIsString ($ parameters [0 ]);
7880 if ($ matcher ->numberOfInvocations () === 1 ) {
79- $ this -> assertSame ( static ::stringContains ('unable to find `$messageCount++;` ' ) , $ parameters [0 ]);
81+ static ::assertStringContainsString ('unable to find `$messageCount++;` ' , $ parameters [0 ]);
8082 }
8183 });
8284
@@ -93,11 +95,12 @@ public function testOnPostInstallShouldInjectCode(): void
9395 $ matcher = static ::exactly (2 );
9496 $ this ->stream ->expects ($ matcher )
9597 ->method ('info ' )->willReturnCallback (function (...$ parameters ) use ($ matcher ) {
98+ static ::assertIsString ($ parameters [0 ]);
9699 if ($ matcher ->numberOfInvocations () === 1 ) {
97- $ this -> assertSame ( static ::stringContains ('read ' ) , $ parameters [0 ]);
100+ static ::assertStringContainsString ('read ' , $ parameters [0 ]);
98101 }
99102 if ($ matcher ->numberOfInvocations () === 2 ) {
100- $ this -> assertSame ( static ::stringContains ('saved to: ' ) , $ parameters [0 ]);
103+ static ::assertStringContainsString ('saved to: ' , $ parameters [0 ]);
101104 }
102105 });
103106
0 commit comments