@@ -16,13 +16,13 @@ public function testSimultaneousReads()
1616
1717 $ handle = $ this ->driver ->openFile (__FILE__ , "r " );
1818
19- $ promise1 = async (fn () => $ handle ->read (length: 20 ));
20- $ promise2 = async (fn () => $ handle ->read (length: 20 ));
19+ $ future1 = async (fn () => $ handle ->read (length: 20 ));
20+ $ future2 = async (fn () => $ handle ->read (length: 20 ));
2121
2222 $ expected = \substr (File \read (__FILE__ ), 0 , 20 );
23- $ this ->assertSame ($ expected , $ promise1 ->await ());
23+ $ this ->assertSame ($ expected , $ future1 ->await ());
2424
25- $ promise2 ->await ();
25+ $ future2 ->await ();
2626 }
2727
2828 public function testSeekWhileReading ()
@@ -31,13 +31,13 @@ public function testSeekWhileReading()
3131
3232 $ handle = $ this ->driver ->openFile (__FILE__ , "r " );
3333
34- $ promise1 = async (fn () => $ handle ->read (length: 10 ));
35- $ promise2 = async (fn () => $ handle ->read (length: 0 ));
34+ $ future1 = async (fn () => $ handle ->read (length: 10 ));
35+ $ future2 = async (fn () => $ handle ->read (length: 0 ));
3636
3737 $ expected = \substr (File \read (__FILE__ ), 0 , 10 );
38- $ this ->assertSame ($ expected , $ promise1 ->await ());
38+ $ this ->assertSame ($ expected , $ future1 ->await ());
3939
40- $ promise2 ->await ();
40+ $ future2 ->await ();
4141 }
4242
4343 public function testReadWhileWriting ()
@@ -50,12 +50,12 @@ public function testReadWhileWriting()
5050
5151 $ data = "test " ;
5252
53- $ promise1 = async (fn () => $ handle ->write ($ data ));
54- $ promise2 = async (fn () => $ handle ->read (length: 10 ));
53+ $ future1 = async (fn () => $ handle ->write ($ data ));
54+ $ future2 = async (fn () => $ handle ->read (length: 10 ));
5555
56- $ this ->assertNull ($ promise1 ->await ());
56+ $ this ->assertNull ($ future1 ->await ());
5757
58- $ promise2 ->await ();
58+ $ future2 ->await ();
5959 }
6060
6161 public function testWriteWhileReading ()
@@ -66,12 +66,12 @@ public function testWriteWhileReading()
6666
6767 $ handle = $ this ->driver ->openFile ($ path , "c+ " );
6868
69- $ promise1 = async (fn () => $ handle ->read (length: 10 ));
70- $ promise2 = async (fn () => $ handle ->write ("test " ));
69+ $ future1 = async (fn () => $ handle ->read (length: 10 ));
70+ $ future2 = async (fn () => $ handle ->write ("test " ));
7171
72- $ this ->assertNull ($ promise1 ->await ());
72+ $ this ->assertNull ($ future1 ->await ());
7373
74- $ promise2 ->await ();
74+ $ future2 ->await ();
7575 }
7676
7777 public function testCancelReadThenReadAgain ()
0 commit comments