@@ -80,54 +80,4 @@ public function testStreamShouldBeWritableIfOpened(): void
80
80
$ stream = $ eventLoop ->wait ($ eventLoop ->writable ($ streamIn ));
81
81
$ this ->assertSame ($ streamIn , $ stream );
82
82
}
83
-
84
- public function testStreamShouldNotBeWritableIfClosed (): void
85
- {
86
- $ eventLoop = $ this ->createEventLoop ();
87
- [$ streamIn , $ streamOut ] = $ this ->createStreamPair ();
88
-
89
- $ waitSomeTicks = function () use ($ eventLoop ) {
90
- yield $ eventLoop ->idle ();
91
- yield $ eventLoop ->idle ();
92
- yield $ eventLoop ->idle ();
93
-
94
- return 'Aborted ' ;
95
- };
96
-
97
- // If stream is closed, the promise will never be resolved
98
- fclose ($ streamIn );
99
- $ result = $ eventLoop ->wait (
100
- $ eventLoop ->promiseRace (
101
- $ eventLoop ->async ($ waitSomeTicks ()),
102
- $ eventLoop ->writable ($ streamIn )
103
- )
104
- );
105
-
106
- $ this ->assertSame ('Aborted ' , $ result );
107
- }
108
-
109
- public function testStreamShouldNotBeReadableIfClosed (): void
110
- {
111
- $ eventLoop = $ this ->createEventLoop ();
112
- [$ streamIn , $ streamOut ] = $ this ->createStreamPair ();
113
-
114
- $ waitSomeTicks = function () use ($ eventLoop ) {
115
- yield $ eventLoop ->idle ();
116
- yield $ eventLoop ->idle ();
117
- yield $ eventLoop ->idle ();
118
-
119
- return 'Aborted ' ;
120
- };
121
-
122
- // If stream is closed, the promise will never be resolved
123
- fclose ($ streamOut );
124
- $ result = $ eventLoop ->wait (
125
- $ eventLoop ->promiseRace (
126
- $ eventLoop ->async ($ waitSomeTicks ()),
127
- $ eventLoop ->readable ($ streamOut )
128
- )
129
- );
130
-
131
- $ this ->assertSame ('Aborted ' , $ result );
132
- }
133
83
}
0 commit comments