27 new Mock\StreamingFile(
'streaming',
'stream')
34 $request =
new HTTP\Request(
'HEAD',
'//file1');
37 $this->assertEquals(200,
$response->getStatus());
45 'Content-Type' => [
'application/octet-stream'],
46 'Content-Length' => [3],
47 'ETag' => [
'"' . md5(
'foo') .
'"'],
52 $this->assertEquals(
'',
$response->getBodyAsString());
63 $request =
new HTTP\Request(
'HEAD',
'/dir');
66 $this->assertEquals(200,
$response->getStatus());
83 $this->server->addPlugin(
88 $request =
new HTTP\Request(
'HEAD',
'/file1', [
'Authorization' =>
'Basic ' . base64_encode(
'user:pass')]);
91 $this->assertEquals(200,
$response->getStatus());
93 $this->assertEquals(1, $count,
'Auth was triggered twice :(');
foreach($paths as $path) $request
setUpTree()
Sets up the DAV tree.
Extremely simply HTTP Basic auth backend.
const VERSION
Full version number.
This class may be used as a basis for other webdav-related unittests.
Tests related to the HEAD request.
testHEADCollection()
According to the specs, HEAD should behave identical to GET.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
testDoubleAuth()
HEAD automatically internally maps to GET via a sub-request.