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
An exception for terminatinating execution or to throw for unit testing.
This class may be used as a basis for other webdav-related unittests.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
Extremely simply HTTP Basic auth backend.
Tests related to the HEAD request.
testHEADCollection()
According to the specs, HEAD should behave identical to GET.
testDoubleAuth()
HEAD automatically internally maps to GET via a sub-request.
setUpTree()
Sets up the DAV tree.
const VERSION
Full version number.