mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-07 23:29:28 +00:00
0bc0a09bf4
- application/extensions file system permission now is 775 - application/logs file system permission now is 775 - Added extensions directory in application/: config, controllers, helpers, hooks, libraries, models, views and widgets - Added view views/extensions/manage.php - Added controller controllers/system/extensions/Manager.php - Added library ExtensionsLib to manage extensions - Added model models/system/Extensions_model.php - Moved code related to print out info from MigrationLib to EPrintfLib
56 lines
1.5 KiB
PHP
56 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace Sabre\CardDAV;
|
|
|
|
use Sabre\HTTP;
|
|
use Sabre\DAV;
|
|
|
|
require_once 'Sabre/HTTP/ResponseMock.php';
|
|
|
|
class MultiGetTest extends AbstractPluginTest {
|
|
|
|
function testMultiGet() {
|
|
|
|
$request = new HTTP\Request(array(
|
|
'REQUEST_METHOD' => 'REPORT',
|
|
'REQUEST_URI' => '/addressbooks/user1/book1',
|
|
));
|
|
|
|
$request->setBody(
|
|
'<?xml version="1.0"?>
|
|
<c:addressbook-multiget xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav">
|
|
<d:prop>
|
|
<d:getetag />
|
|
<c:address-data />
|
|
</d:prop>
|
|
<d:href>/addressbooks/user1/book1/card1</d:href>
|
|
</c:addressbook-multiget>'
|
|
);
|
|
|
|
$response = new HTTP\ResponseMock();
|
|
|
|
$this->server->httpRequest = $request;
|
|
$this->server->httpResponse = $response;
|
|
|
|
$this->server->exec();
|
|
|
|
$this->assertEquals('HTTP/1.1 207 Multi-Status', $response->status, 'Incorrect status code. Full response body:' . $response->body);
|
|
|
|
// using the client for parsing
|
|
$client = new DAV\Client(array('baseUri'=>'/'));
|
|
|
|
$result = $client->parseMultiStatus($response->body);
|
|
|
|
$this->assertEquals(array(
|
|
'/addressbooks/user1/book1/card1' => array(
|
|
200 => array(
|
|
'{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"',
|
|
'{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD",
|
|
)
|
|
)
|
|
), $result);
|
|
|
|
}
|
|
|
|
}
|