@@ -39,7 +39,7 @@ public static function setUpBeforeClass(): void
3939
4040 ob_start ();
4141 phpinfo (\INFO_GENERAL );
42- self ::$ sigchild = false !== strpos (ob_get_clean (), '--enable-sigchild ' );
42+ self ::$ sigchild = str_contains (ob_get_clean (), '--enable-sigchild ' );
4343 }
4444
4545 protected function tearDown (): void
@@ -114,7 +114,7 @@ public function testStopWithTimeoutIsActuallyWorking()
114114 $ p = $ this ->getProcess ([self ::$ phpBin , __DIR__ .'/NonStopableProcess.php ' , 30 ]);
115115 $ p ->start ();
116116
117- while ($ p ->isRunning () && false === strpos ($ p ->getOutput (), 'received ' )) {
117+ while ($ p ->isRunning () && ! str_contains ($ p ->getOutput (), 'received ' )) {
118118 usleep (1000 );
119119 }
120120
@@ -143,7 +143,7 @@ public function testWaitUntilSpecificOutput()
143143
144144 $ completeOutput = '' ;
145145 $ result = $ p ->waitUntil (function ($ type , $ output ) use (&$ completeOutput ) {
146- return false !== strpos ($ completeOutput .= $ output , 'One more ' );
146+ return str_contains ($ completeOutput .= $ output , 'One more ' );
147147 });
148148 $ this ->assertTrue ($ result );
149149 $ this ->assertLessThan (20 , microtime (true ) - $ start );
@@ -409,7 +409,7 @@ public function testIncrementalOutput($getOutput, $getIncrementalOutput, $uri)
409409 $ p ->start ();
410410
411411 foreach (['foo ' , 'bar ' ] as $ s ) {
412- while (false === strpos ($ p ->$ getOutput (), $ s )) {
412+ while (! str_contains ($ p ->$ getOutput (), $ s )) {
413413 usleep (1000 );
414414 }
415415
@@ -842,7 +842,7 @@ public function testIdleTimeoutNotExceededWhenOutputIsSent()
842842 $ process ->setTimeout (1 );
843843 $ process ->start ();
844844
845- while (false === strpos ($ process ->getOutput (), 'foo ' )) {
845+ while (! str_contains ($ process ->getOutput (), 'foo ' )) {
846846 usleep (1000 );
847847 }
848848
@@ -907,7 +907,7 @@ public function testSignal()
907907 $ process = $ this ->getProcess ([self ::$ phpBin , __DIR__ .'/SignalListener.php ' ]);
908908 $ process ->start ();
909909
910- while (false === strpos ($ process ->getOutput (), 'Caught ' )) {
910+ while (! str_contains ($ process ->getOutput (), 'Caught ' )) {
911911 usleep (1000 );
912912 }
913913 $ process ->signal (\SIGUSR1 );
0 commit comments