File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -485,13 +485,14 @@ public function testDownloadCallback()
485
485
$ curl ->download (Test::TEST_URL . '? ' . http_build_query (array (
486
486
'file_path ' => $ uploaded_file_path ,
487
487
)), function ($ instance , $ fh ) use (&$ callback_called ) {
488
- $ callback_called = true ;
488
+ PHPUnit_Framework_Assert:: assertFalse ( $ callback_called) ;
489
489
PHPUnit_Framework_Assert::assertInstanceOf ('Curl\Curl ' , $ instance );
490
490
PHPUnit_Framework_Assert::assertTrue (is_resource ($ fh ));
491
491
PHPUnit_Framework_Assert::assertEquals ('stream ' , get_resource_type ($ fh ));
492
492
PHPUnit_Framework_Assert::assertGreaterThan (0 , strlen (stream_get_contents ($ fh )));
493
493
PHPUnit_Framework_Assert::assertEquals (0 , strlen (stream_get_contents ($ fh )));
494
494
PHPUnit_Framework_Assert::assertTrue (fclose ($ fh ));
495
+ $ callback_called = true ;
495
496
});
496
497
$ this ->assertTrue ($ callback_called );
497
498
You can’t perform that action at this time.
0 commit comments