Definition at line 10 of file ClientTest.php.
◆ setUp()
Sabre\DAV\ClientTest::setUp |
( |
| ) |
|
Definition at line 12 of file ClientTest.php.
14 if (!function_exists(
'curl_init')) {
15 $this->markTestSkipped(
'CURL must be installed to test the client');
◆ testAuth()
Sabre\DAV\ClientTest::testAuth |
( |
| ) |
|
Definition at line 38 of file ClientTest.php.
References $client.
46 $this->assertEquals(
"foo:bar",
$client->curlSettings[CURLOPT_USERPWD]);
47 $this->assertEquals(CURLAUTH_BASIC | CURLAUTH_DIGEST,
$client->curlSettings[CURLOPT_HTTPAUTH]);
if($_SERVER['argc']< 4) $client
◆ testBasicAuth()
Sabre\DAV\ClientTest::testBasicAuth |
( |
| ) |
|
Definition at line 51 of file ClientTest.php.
References $client, and Sabre\DAV\Client\AUTH_BASIC.
60 $this->assertEquals(
"foo:bar",
$client->curlSettings[CURLOPT_USERPWD]);
61 $this->assertEquals(CURLAUTH_BASIC,
$client->curlSettings[CURLOPT_HTTPAUTH]);
if($_SERVER['argc']< 4) $client
const AUTH_BASIC
Basic authentication.
◆ testConstruct()
Sabre\DAV\ClientTest::testConstruct |
( |
| ) |
|
Definition at line 20 of file ClientTest.php.
References $client.
25 $this->assertInstanceOf(
'Sabre\DAV\ClientMock',
$client);
if($_SERVER['argc']< 4) $client
◆ testConstructNoBaseUri()
Sabre\DAV\ClientTest::testConstructNoBaseUri |
( |
| ) |
|
InvalidArgumentException
Definition at line 32 of file ClientTest.php.
References $client.
if($_SERVER['argc']< 4) $client
◆ testDigestAuth()
Sabre\DAV\ClientTest::testDigestAuth |
( |
| ) |
|
Definition at line 65 of file ClientTest.php.
References $client, and Sabre\DAV\Client\AUTH_DIGEST.
74 $this->assertEquals(
"foo:bar",
$client->curlSettings[CURLOPT_USERPWD]);
75 $this->assertEquals(CURLAUTH_DIGEST,
$client->curlSettings[CURLOPT_HTTPAUTH]);
if($_SERVER['argc']< 4) $client
const AUTH_DIGEST
Digest authentication.
◆ testEncoding()
Sabre\DAV\ClientTest::testEncoding |
( |
| ) |
|
◆ testNTLMAuth()
Sabre\DAV\ClientTest::testNTLMAuth |
( |
| ) |
|
Definition at line 79 of file ClientTest.php.
References $client, and Sabre\DAV\Client\AUTH_NTLM.
88 $this->assertEquals(
"foo:bar",
$client->curlSettings[CURLOPT_USERPWD]);
89 $this->assertEquals(CURLAUTH_NTLM,
$client->curlSettings[CURLOPT_HTTPAUTH]);
if($_SERVER['argc']< 4) $client
const AUTH_NTLM
NTLM authentication.
◆ testOPTIONS()
Sabre\DAV\ClientTest::testOPTIONS |
( |
| ) |
|
Definition at line 283 of file ClientTest.php.
References $client, $request, and $result.
289 $client->response =
new Response(207, [
290 'DAV' =>
'calendar-access, extended-mkcol',
295 [
'calendar-access',
'extended-mkcol'],
300 $this->assertEquals(
'OPTIONS',
$request->getMethod());
301 $this->assertEquals(
'/',
$request->getUrl());
302 $this->assertEquals([
foreach($paths as $path) $request
if($_SERVER['argc']< 4) $client
◆ testPropFind()
Sabre\DAV\ClientTest::testPropFind |
( |
| ) |
|
Definition at line 115 of file ClientTest.php.
References $client, $request, and $result.
121 $responseBody = <<<XML
122 <?xml version=
"1.0"?>
123 <multistatus xmlns=
"DAV:">
128 <displayname>bar</displayname>
130 <status>
HTTP/1.1 200 OK</status>
136 $client->response =
new Response(207, [], $responseBody);
137 $result =
$client->propFind(
'foo', [
'{DAV:}displayname',
'{urn:zim}gir']);
139 $this->assertEquals([
'{DAV:}displayname' =>
'bar'],
$result);
142 $this->assertEquals(
'PROPFIND',
$request->getMethod());
143 $this->assertEquals(
'/foo',
$request->getUrl());
144 $this->assertEquals([
146 'Content-Type' => [
'application/xml'],
foreach($paths as $path) $request
if($_SERVER['argc']< 4) $client
◆ testPropFindDepth1()
Sabre\DAV\ClientTest::testPropFindDepth1 |
( |
| ) |
|
Definition at line 165 of file ClientTest.php.
References $client, $request, and $result.
171 $responseBody = <<<XML
172 <?xml version=
"1.0"?>
173 <multistatus xmlns=
"DAV:">
178 <displayname>bar</displayname>
180 <status>
HTTP/1.1 200 OK</status>
186 $client->response =
new Response(207, [], $responseBody);
187 $result =
$client->propFind(
'foo', [
'{DAV:}displayname',
'{urn:zim}gir'], 1);
189 $this->assertEquals([
191 '{DAV:}displayname' =>
'bar' 196 $this->assertEquals(
'PROPFIND',
$request->getMethod());
197 $this->assertEquals(
'/foo',
$request->getUrl());
198 $this->assertEquals([
200 'Content-Type' => [
'application/xml'],
foreach($paths as $path) $request
if($_SERVER['argc']< 4) $client
◆ testPropFindError()
Sabre\DAV\ClientTest::testPropFindError |
( |
| ) |
|
Definition at line 154 of file ClientTest.php.
References $client.
160 $client->response =
new Response(405, []);
161 $client->propFind(
'foo', [
'{DAV:}displayname',
'{urn:zim}gir']);
if($_SERVER['argc']< 4) $client
◆ testPropPatch()
Sabre\DAV\ClientTest::testPropPatch |
( |
| ) |
|
Definition at line 205 of file ClientTest.php.
References $client, $request, and $result.
211 $responseBody = <<<XML
212 <?xml version=
"1.0"?>
213 <multistatus xmlns=
"DAV:">
218 <displayname>bar</displayname>
220 <status>
HTTP/1.1 200 OK</status>
226 $client->response =
new Response(207, [], $responseBody);
227 $result =
$client->propPatch(
'foo', [
'{DAV:}displayname' =>
'hi',
'{urn:zim}gir' => null]);
230 $this->assertEquals(
'PROPPATCH',
$request->getMethod());
231 $this->assertEquals(
'/foo',
$request->getUrl());
232 $this->assertEquals([
233 'Content-Type' => [
'application/xml'],
foreach($paths as $path) $request
if($_SERVER['argc']< 4) $client
◆ testPropPatchHTTPError()
Sabre\DAV\ClientTest::testPropPatchHTTPError |
( |
| ) |
|
testPropPatch
Definition at line 242 of file ClientTest.php.
References $client.
248 $client->response =
new Response(403, [],
'');
249 $client->propPatch(
'foo', [
'{DAV:}displayname' =>
'hi',
'{urn:zim}gir' => null]);
if($_SERVER['argc']< 4) $client
◆ testPropPatchMultiStatusError()
Sabre\DAV\ClientTest::testPropPatchMultiStatusError |
( |
| ) |
|
testPropPatch Sabre
Definition at line 257 of file ClientTest.php.
References $client.
263 $responseBody = <<<XML
264 <?xml version=
"1.0"?>
265 <multistatus xmlns=
"DAV:">
272 <status>
HTTP/1.1 403 Forbidden</status>
278 $client->response =
new Response(207, [], $responseBody);
279 $client->propPatch(
'foo', [
'{DAV:}displayname' =>
'hi',
'{urn:zim}gir' => null]);
if($_SERVER['argc']< 4) $client
◆ testProxy()
Sabre\DAV\ClientTest::testProxy |
( |
| ) |
|
Definition at line 93 of file ClientTest.php.
References $client.
97 'proxy' =>
'localhost:8888',
100 $this->assertEquals(
"localhost:8888",
$client->curlSettings[CURLOPT_PROXY]);
if($_SERVER['argc']< 4) $client
The documentation for this class was generated from the following file: