tests/FileStreamerTest.php
/**
     * Test if range values get extracted from the ranges as defined in the http request header.
     *
     * @dataProvider provideValidRanges
     *
     * @param   string  $RequestedRange  A valid range.
     * @param   array   $expectedRange   Expected range extracted from the valid range.
     *
     * @return void
     */
Test if range values get extracted from the ranges as defined in the http request header.

@param   string  $RequestedRange  A valid range.
@param   array   $expectedRange   Expected range extracted from the valid range.

@return void
Test if range values get extracted from the ranges as defined in the http request header . @param string $RequestedRange A valid range . @param array $expectedRange Expected range extracted from the valid range . @return void
public function testGetRequestedRanges(string $RequestedRange, array $expectedRange)
    {
        $_SERVER['HTTP_RANGE'] = $RequestedRange;
        $fileStreamer          = new FileStreamer(vfsStream::url('source/dummyFile.txt'));
        $reflector             = Reflector::create($fileStreamer);
        $reflector->getRequestedRanges();
        $this->assertEquals($expectedRange, $reflector->fileRanges);
        $reflector->unset();
    }
public function testGetRequestedRanges ( string $ RequestedRange , array $ expectedRange ) { $ _SERVER [ 'HTTP_RANGE' ] = $ RequestedRange ; $ fileStreamer = new FileStreamer ( vfsStream :: url ( 'source/dummyFile.txt' ) ) ; $ reflector = Reflector :: create ( $ fileStreamer ) ; $ reflector -> getRequestedRanges ( ) ; $ this -> assertEquals ( $ expectedRange , $ reflector -> fileRanges ) ; $ reflector -> unset ( ) ; }
Test if range values get extracted from the ranges as defined in the http request header.
Test if range values get extracted from the ranges as defined in the http request header .