@@ -20,14 +20,14 @@ final class ProcessTesterAssertRanTest extends FrameworkIntegrationTestCase
2020 #[TestWith(['echo "hello" ' ])]
2121 public function test_expectation_succeeds_when_command_is_ran (string $ pattern ): void
2222 {
23- $ this ->process ->mockProcess ('echo * ' , "hello \n" );
23+ $ this ->process ->mock ('echo * ' , "hello \n" );
2424 $ this ->executor ->run ('echo "hello" ' );
2525 $ this ->process ->assertCommandRan ($ pattern );
2626 }
2727
2828 public function test_expectation_succeeds_when_command_is_ran_and_callback_returns_true (): void
2929 {
30- $ this ->process ->mockProcess ('echo * ' , "hello \n" );
30+ $ this ->process ->mock ('echo * ' , "hello \n" );
3131 $ this ->executor ->run ('echo "hello" ' );
3232 $ this ->process ->assertCommandRan ('echo * ' , function (ProcessResult $ result ) {
3333 return $ result ->output === "hello \n" ;
@@ -39,7 +39,7 @@ public function test_expectation_fails_when_specified_command_is_not_ran(): void
3939 $ this ->expectException (ExpectationFailedException::class);
4040 $ this ->expectExceptionMessage ('Expected process with command "not-ran" to be executed, but it was not. ' );
4141
42- $ this ->process ->mockProcess ('echo * ' , "hello \n" );
42+ $ this ->process ->mock ('echo * ' , "hello \n" );
4343 $ this ->executor ->run ('echo "hello" ' );
4444 $ this ->process ->assertCommandRan ('not-ran ' );
4545 }
@@ -49,7 +49,7 @@ public function test_expectation_fails_when_command_is_ran_and_callback_returns_
4949 $ this ->expectException (ExpectationFailedException::class);
5050 $ this ->expectExceptionMessage ('Callback for command "echo "hello"" returned false. ' );
5151
52- $ this ->process ->mockProcess ('echo * ' , "hello \n" );
52+ $ this ->process ->mock ('echo * ' , "hello \n" );
5353 $ this ->executor ->run ('echo "hello" ' );
5454 $ this ->process ->assertCommandRan ('echo * ' , function (ProcessResult $ result ) {
5555 return $ result ->output !== "hello \n" ;
@@ -58,14 +58,14 @@ public function test_expectation_fails_when_command_is_ran_and_callback_returns_
5858
5959 public function test_expectation_succeeds_when_callback_returns_nothing (): void
6060 {
61- $ this ->process ->mockProcess ('echo * ' , "hello \n" );
61+ $ this ->process ->mock ('echo * ' , "hello \n" );
6262 $ this ->executor ->run ('echo "hello" ' );
6363 $ this ->process ->assertCommandRan ('echo * ' , function (): void {});
6464 }
6565
6666 public function test_expectation_succeeds_when_callback_returns_true (): void
6767 {
68- $ this ->process ->mockProcess ('echo * ' , "hello \n" );
68+ $ this ->process ->mock ('echo * ' , "hello \n" );
6969 $ this ->executor ->run ('echo "hello" ' );
7070
7171 $ this ->process ->assertRan (function (PendingProcess $ process ): bool {
@@ -78,7 +78,7 @@ public function test_returning_false_from_callback_fails_expectation(): void
7878 $ this ->expectException (ExpectationFailedException::class);
7979 $ this ->expectExceptionMessage ('Callback for command "echo "hello"" returned false. ' );
8080
81- $ this ->process ->mockProcess ('echo * ' , "hello \n" );
81+ $ this ->process ->mock ('echo * ' , "hello \n" );
8282 $ this ->executor ->run ('echo "hello" ' );
8383
8484 $ this ->process ->assertRan (function (PendingProcess $ _process ): bool {
@@ -88,7 +88,7 @@ public function test_returning_false_from_callback_fails_expectation(): void
8888
8989 public function test_returning_true_from_callback_skips_other_iterations (): void
9090 {
91- $ this ->process ->mockProcess ('echo * ' , "hello \n" );
91+ $ this ->process ->mock ('echo * ' , "hello \n" );
9292 $ this ->executor ->run ('echo "hello" ' );
9393 $ this ->executor ->run ('echo "world" ' );
9494
@@ -106,7 +106,7 @@ public function test_never_returning_fails_expectation(): void
106106 $ this ->expectException (ExpectationFailedException::class);
107107 $ this ->expectExceptionMessage ('Could not find a matching command for the provided callback. ' );
108108
109- $ this ->process ->mockProcess ('echo * ' , "hello \n" );
109+ $ this ->process ->mock ('echo * ' , "hello \n" );
110110 $ this ->executor ->run ('echo "hello" ' );
111111
112112 $ this ->process ->assertRan (function (PendingProcess $ _process ): void {
0 commit comments