3 use PHPUnit\Framework\TestCase
;
5 class HTTPFileStreamerTest
extends TestCase
{
8 * @covers HTTPFileStreamer::preprocessHeaders
9 * @dataProvider providePreprocessHeaders
11 public function testPreprocessHeaders( array $input, array $expectedRaw, array $expectedOpt ) {
12 list( $actualRaw, $actualOpt ) = HTTPFileStreamer
::preprocessHeaders( $input );
13 $this->assertSame( $expectedRaw, $actualRaw );
14 $this->assertSame( $expectedOpt, $actualOpt );
17 public function providePreprocessHeaders() {
20 [ 'Vary' => 'cookie', 'Cache-Control' => 'private' ],
21 [ 'Vary: cookie', 'Cache-Control: private' ],
26 'Range' => 'bytes=(123-456)',
27 'Content-Type' => 'video/mp4',
28 'If-Modified-Since' => 'Wed, 21 Oct 2015 07:28:00 GMT',
30 [ 'Content-Type: video/mp4' ],
31 [ 'range' => 'bytes=(123-456)', 'if-modified-since' => 'Wed, 21 Oct 2015 07:28:00 GMT' ],