/** * Method to test getSize(). * * @return void * * @covers Asika\Http\Stream::getSize */ public function testGetSize() { $this->createTempFile(); file_put_contents($this->tmpnam, 'FOO BAR'); $resource = fopen($this->tmpnam, Stream::MODE_READ_ONLY_FROM_BEGIN); $stream = new Stream($resource); $this->assertEquals(7, $stream->getSize()); }