X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=phpunit%2FMessageBodyTest.php;h=1764ef6027b89128915420ce2667676fbb27ab3c;hb=9da9c90ae841a731913fe3aec7463dced6378470;hp=cc0f421efd9f92c31d2d9d7cd76999773b563a20;hpb=ae3da9e40ac118dc77984bfe172aa0ddc0a49a48;p=m6w6%2Fext-http diff --git a/phpunit/MessageBodyTest.php b/phpunit/MessageBodyTest.php index cc0f421..1764ef6 100644 --- a/phpunit/MessageBodyTest.php +++ b/phpunit/MessageBodyTest.php @@ -124,4 +124,11 @@ class MessageBodyTest extends PHPUnit_Framework_TestCase { function testClone() { $this->assertEquals((string) $this->file, (string) clone $this->file); } + + function testGetResource() { + $stream = $this->file->getResource(); + $this->assertTrue(is_resource($stream)); + $stat = fstat($stream); + $this->assertEquals(filesize(__FILE__), $stat["size"]); + } }