Skip to content

Commit 5a5ce14

Browse files
committed
Clean up
1 parent d12f12f commit 5a5ce14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/PHPCurlClass/PHPCurlClassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,13 +485,14 @@ public function testDownloadCallback()
485485
$curl->download(Test::TEST_URL . '?' . http_build_query(array(
486486
'file_path' => $uploaded_file_path,
487487
)), function($instance, $fh) use (&$callback_called) {
488-
$callback_called = true;
488+
PHPUnit_Framework_Assert::assertFalse($callback_called);
489489
PHPUnit_Framework_Assert::assertInstanceOf('Curl\Curl', $instance);
490490
PHPUnit_Framework_Assert::assertTrue(is_resource($fh));
491491
PHPUnit_Framework_Assert::assertEquals('stream', get_resource_type($fh));
492492
PHPUnit_Framework_Assert::assertGreaterThan(0, strlen(stream_get_contents($fh)));
493493
PHPUnit_Framework_Assert::assertEquals(0, strlen(stream_get_contents($fh)));
494494
PHPUnit_Framework_Assert::assertTrue(fclose($fh));
495+
$callback_called = true;
495496
});
496497
$this->assertTrue($callback_called);
497498

0 commit comments

Comments
 (0)