This commit is contained in:
Nicolas Le Goff
2014-03-23 23:07:01 +01:00
parent e45d7edbc3
commit e317f86c51
34 changed files with 93 additions and 110 deletions

View File

@@ -31,16 +31,16 @@ class ApacheTest extends \PhraseanetTestCase
touch($file);
}
$mapping = array(array(
$mapping = [[
'directory' => $dir,
'mount-point' => 'mp4-videos',
'passphrase' => '123456',
));
]];
return array(
array(array(), null, '/path/to/file'),
array($mapping, null, '/path/to/file'),
array($mapping, '/^\/mp4-videos\/[a-zA-Z0-9]+\/[0-9a-f]+\/to\/file$/', $file),
);
return [
[[], null, '/path/to/file'],
[$mapping, null, '/path/to/file'],
[$mapping, '/^\/mp4-videos\/[a-zA-Z0-9]+\/[0-9a-f]+\/to\/file$/', $file],
];
}
}

View File

@@ -66,19 +66,19 @@ class H264FactoryTest extends \PhraseanetTestCase
public function provideTypes()
{
return array(
array('nginx', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Nginx'),
array('apache', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Apache'),
array('apache2', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Apache'),
);
return [
['nginx', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Nginx'],
['apache', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Apache'],
['apache2', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Apache'],
];
}
private function getNginxMapping()
{
return array(array(
return [[
'directory' => __DIR__ . '/../../../../files/',
'mount-point' => '/protected/',
'passphrase' => 'dfdskqhfsfilddsmfmqsdmlfomqs',
));
]];
}
}

View File

@@ -31,16 +31,16 @@ class NginxTest extends \PhraseanetTestCase
touch($file);
}
$mapping = array(array(
$mapping = [[
'directory' => $dir,
'mount-point' => 'mp4-videos',
'passphrase' => '123456',
));
]];
return array(
array(array(), null, '/path/to/file'),
array($mapping, null, '/path/to/file'),
array($mapping, '/^\/mp4-videos\/to\/file\?hash=[a-zA-Z0-9-_+]+&expires=[0-9]+/', $file),
);
return [
[[], null, '/path/to/file'],
[$mapping, null, '/path/to/file'],
[$mapping, '/^\/mp4-videos\/to\/file\?hash=[a-zA-Z0-9-_+]+&expires=[0-9]+/', $file],
];
}
}