File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -198,9 +198,6 @@ public function testListFolderFromCursor()
198198
199199 $ oFolder = $ this ->dropboxHelper ->loadFolderCursor ($ sCursor );
200200
201- # This is the last cursor so Folder::next should return null
202- $ this ->assertNull ($ oFolder ->next ());
203-
204201 # Test Folder::next after write
205202 $ sTestFilePath = $ this ->sFolderPath . '/DropboxHelper-test-file- ' . uniqid () . '.txt ' ;
206203 $ sContent = "PHP Unit Test of DropboxHelper: \n" . (new \DateTime ())->format (DATE_ATOM );
@@ -209,11 +206,21 @@ public function testListFolderFromCursor()
209206 $ oFolder = $ this ->dropboxHelper ->loadFolderCursor ($ sCursor );
210207 $ this ->assertInternalType ('array ' , $ oFolder ->next ());
211208
209+ # Race condition: there may be other items to test
210+ while (($ aFolder = $ oFolder ->next ())) {
211+ $ this ->assertInternalType ('array ' , $ aFolder );
212+ }
213+
212214 # Test Folder::next after delete
213215 $ bResult = $ this ->dropboxHelper ->delete ($ sTestFilePath );
214216
215217 $ oFolder = $ this ->dropboxHelper ->loadFolderCursor ($ sCursor );
216218 $ this ->assertInternalType ('array ' , $ oFolder ->next ());
219+
220+ # Race condition: there may be other items to test
221+ while (($ aFolder = $ oFolder ->next ())) {
222+ $ this ->assertInternalType ('array ' , $ aFolder );
223+ }
217224 }
218225
219226 public function testFolder ()
You can’t perform that action at this time.
0 commit comments