@@ -1544,9 +1544,7 @@ public function testEnvCaseInsensitiveOnWindows()
1544
1544
public function testMultipleCallsToProcGetStatus ()
1545
1545
{
1546
1546
$ process = $ this ->getProcess ('echo foo ' );
1547
- $ process ->start (function () use ($ process ) {
1548
- $ process ->isRunning ();
1549
- });
1547
+ $ process ->start (static fn () => $ process ->isRunning ());
1550
1548
while ($ process ->isRunning ()) {
1551
1549
usleep (1000 );
1552
1550
}
@@ -1556,39 +1554,33 @@ public function testMultipleCallsToProcGetStatus()
1556
1554
public function testFailingProcessWithMultipleCallsToProcGetStatus ()
1557
1555
{
1558
1556
$ process = $ this ->getProcess ('exit 123 ' );
1559
- $ process ->start (function () use ($ process ) {
1560
- $ process ->isRunning ();
1561
- });
1557
+ $ process ->start (static fn () => $ process ->isRunning ());
1562
1558
while ($ process ->isRunning ()) {
1563
1559
usleep (1000 );
1564
1560
}
1565
1561
$ this ->assertSame (123 , $ process ->getExitCode ());
1566
1562
}
1567
1563
1568
1564
/**
1569
- * @group time-sensitive
1565
+ * @group slow
1570
1566
*/
1571
1567
public function testLongRunningProcessWithMultipleCallsToProcGetStatus ()
1572
1568
{
1573
1569
$ process = $ this ->getProcess ('sleep 1; echo "done" ' );
1574
- $ process ->start (function () use ($ process ) {
1575
- $ process ->isRunning ();
1576
- });
1570
+ $ process ->start (static fn () => $ process ->isRunning ());
1577
1571
while ($ process ->isRunning ()) {
1578
1572
usleep (1000 );
1579
1573
}
1580
1574
$ this ->assertSame (0 , $ process ->getExitCode ());
1581
1575
}
1582
1576
1583
1577
/**
1584
- * @group time-sensitive
1578
+ * @group slow
1585
1579
*/
1586
1580
public function testLongRunningProcessWithMultipleCallsToProcGetStatusError ()
1587
1581
{
1588
1582
$ process = $ this ->getProcess ('sleep 1; echo "failure"; exit 123 ' );
1589
- $ process ->start (function () use ($ process ) {
1590
- $ process ->isRunning ();
1591
- });
1583
+ $ process ->start (static fn () => $ process ->isRunning ());
1592
1584
while ($ process ->isRunning ()) {
1593
1585
usleep (1000 );
1594
1586
}
0 commit comments