Updated unit tests.

This commit is contained in:
Matt Butcher
2012-01-19 17:36:05 -06:00
parent d2389de15f
commit 7af6bc580d

View File

@@ -265,11 +265,23 @@ class StreamWrapperTest extends \HPCloud\Tests\TestCase {
*/
public function testClose($res) {
$this->assertTrue(is_resource($res));
fclose($res);
fwrite($res, 'extra.');
//throw new \Exception(stream_get_contents($res));
fflush($res);
// This is occasionally generating seemingly
// spurious PHP errors about Bootstrap::$config.
fclose($res);
/*
$url = $this->newUrl(self::FNAME);
//$res2 = fopen($url, 'r', FALSE, $this->basicSwiftContext());
//$this->assertTrue(is_resource($res2));
$res2 = fopen($url, 'r', FALSE, $this->basicSwiftContext());
$this->assertTrue(is_resource($res2));
$contents = stream_get_contents($res2);
fclose($res2);
$this->assertRegExp('/~{4}$/', $contents);
*/
}
public function testOpenFailureWithWrite() {