@@ -120,9 +120,8 @@ public function testSendSyncReturningResponseStreamData()
120
120
121
121
public function testSendSyncReturningResponseLarge3bytesLength ()
122
122
{
123
- $ this ->markTestIncomplete (
124
- 'For some reason, my RouterOS v5.6 doesn not work with this (bug?). '
125
- );
123
+ $ memoryLimit = ini_set ('memory_limit ' , -1 );
124
+
126
125
$ systemResource = $ this ->object ->sendSync (
127
126
new Request ('/system/resource/print ' )
128
127
);
@@ -169,13 +168,18 @@ public function testSendSyncReturningResponseLarge3bytesLength()
169
168
);
170
169
}
171
170
}
171
+
172
+ //Clearing out for other tests.
173
+ ini_set ('memory_limit ' , $ memoryLimit );
172
174
}
173
175
174
176
public function testSendSyncReturningResponseLarge4bytesLength ()
175
177
{
176
178
$ this ->markTestIncomplete (
177
- 'For some reason, my RouterOS v5.6 doesn not work with this (bug?). '
179
+ 'For some reason, my RouterOS v6.* doesn not work with this (bug?). '
178
180
);
181
+ $ memoryLimit = ini_set ('memory_limit ' , -1 );
182
+
179
183
$ systemResource = $ this ->object ->sendSync (
180
184
new Request ('/system/resource/print ' )
181
185
);
@@ -222,19 +226,19 @@ public function testSendSyncReturningResponseLarge4bytesLength()
222
226
);
223
227
}
224
228
}
229
+
230
+ //Clearing out for other tests.
231
+ ini_set ('memory_limit ' , $ memoryLimit );
225
232
}
226
233
227
234
public function testSendSyncReturningResponseLargeDataException ()
228
235
{
229
- $ this ->markTestIncomplete (
230
- 'TODO: A known issue; Requests with excessively long words "leak". '
231
- );
232
236
//Required for this test
233
237
$ memoryLimit = ini_set ('memory_limit ' , -1 );
234
238
try {
235
239
$ comment = fopen ('php://temp ' , 'r+b ' );
236
240
fwrite ($ comment , str_repeat ('t ' , 0xFFFFFF ));
237
- for ($ i = 0 ; $ i < 14 ; $ i ++) {
241
+ for ($ i = 0 ; $ i < 255 ; $ i ++) {
238
242
fwrite ($ comment , str_repeat ('t ' , 0xFFFFFF ));
239
243
}
240
244
fwrite (
@@ -243,14 +247,12 @@ public function testSendSyncReturningResponseLargeDataException()
243
247
);
244
248
rewind ($ comment );
245
249
246
- $ commentString = stream_get_contents ($ comment );
247
- $ maxArgL = 0xFFFFFFF - strlen ('=comment= ' );
250
+ $ maxArgL = 0xFFFFFFFF - strlen ('=comment= ' );
248
251
$ this ->assertGreaterThan (
249
252
$ maxArgL ,
250
- strlen ( $ commentString ),
253
+ Communicator:: seekableStreamLength ( $ comment ),
251
254
'$comment is not long enough. '
252
255
);
253
- unset($ commentString );
254
256
rewind ($ comment );
255
257
$ addRequest = new Request ('/queue/simple/add ' );
256
258
$ addRequest ->setArgument ('name ' , TEST_QUEUE_NAME )
0 commit comments