Lines Matching refs:this

30         $this->caldavBackend = new Backend\Mock(array(
68 $calendars = new CalendarRoot($principalBackend,$this->caldavBackend);
75 $this->server = new DAV\Server($root);
76 $this->server->sapi = new HTTP\SapiMock();
77 $this->server->debugExceptions = true;
78 $this->server->setBaseUri('/');
79 $this->plugin = new Plugin();
80 $this->server->addPlugin($this->plugin);
83 $this->server->addPlugin(new DAVACL\Plugin());
90 $this->server->addPlugin($authPlugin);
95 $this->response = new HTTP\ResponseMock();
96 $this->server->httpResponse = $this->response;
102 …$this->assertEquals(array('MKCALENDAR'), $this->plugin->getHTTPMethods('calendars/user1/randomnewc…
103 … $this->assertEquals(array('calendar-access','calendar-proxy'), $this->plugin->getFeatures());
104 $this->assertEquals(
106 $this->plugin->getPluginInfo()['name']
118 $this->server->httpRequest = $request;
119 $this->server->exec();
121 …$this->assertEquals(501, $this->response->status,'Incorrect status returned. Full response body:' …
134 $this->server->httpRequest = $request;
135 $this->server->exec();
137 $this->assertEquals(415, $this->response->status);
187 $this->server->httpRequest = $request;
188 $this->server->exec();
190 $this->assertEquals(403, $this->response->status);
240 $this->server->httpRequest = $request;
241 $this->server->exec();
243 $this->assertEquals(409, $this->response->status);
293 $this->server->httpRequest = $request;
294 $this->server->exec();
296 $this->assertEquals(405, $this->response->status);
347 $this->server->httpRequest = $request;
348 $this->server->exec();
350 …$this->assertEquals(201, $this->response->status,'Invalid response code received. Full response bo…
352 $calendars = $this->caldavBackend->getCalendarsForUser('principals/user1');
353 $this->assertEquals(3, count($calendars));
363 $this->assertInternalType('array',$newCalendar);
376 $this->assertArrayHasKey($key, $newCalendar);
379 $this->assertEquals($value, $newCalendar[$key]);
383 … $this->assertTrue($newCalendar[$sccs] instanceof Xml\Property\SupportedCalendarComponentSet);
384 $this->assertEquals(array('VEVENT'),$newCalendar[$sccs]->getValue());
396 $this->server->httpRequest = $request;
397 $this->server->exec();
399 …$this->assertEquals(201, $this->response->status,'Invalid response code received. Full response bo…
401 $calendars = $this->caldavBackend->getCalendarsForUser('principals/user1');
402 $this->assertEquals(3, count($calendars));
412 $this->assertInternalType('array',$newCalendar);
422 $this->assertArrayHasKey($key, $newCalendar);
425 $this->assertEquals($value, $newCalendar[$key]);
429 … $this->assertTrue($newCalendar[$sccs] instanceof Xml\Property\SupportedCalendarComponentSet);
430 $this->assertEquals(array('VEVENT','VTODO'),$newCalendar[$sccs]->getValue());
444 $this->server->httpRequest = $request;
445 $this->server->exec();
447 $this->assertEquals(400, $this->response->status);
456 $this->server->httpRequest = $httpRequest;
458 $props = $this->server->getPropertiesForPath('/principals/user1',array(
466 $this->assertArrayHasKey(0,$props);
467 $this->assertArrayHasKey(200,$props[0]);
470 $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}calendar-home-set',$props[0][200]);
472 $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $prop);
473 $this->assertEquals('calendars/user1/',$prop->getHref());
475 …$this->assertArrayHasKey('{http://calendarserver.org/ns/}calendar-proxy-read-for', $props[0][200]);
477 $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $prop);
478 $this->assertEquals(array('principals/admin/'), $prop->getHrefs());
480 …$this->assertArrayHasKey('{http://calendarserver.org/ns/}calendar-proxy-write-for', $props[0][200]…
482 $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $prop);
483 $this->assertEquals(array('principals/admin/'), $prop->getHrefs());
485 … $this->assertArrayHasKey('{' . Plugin::NS_CALENDARSERVER . '}email-address-set',$props[0][200]);
487 $this->assertInstanceOf('Sabre\\CalDAV\\Xml\\Property\\EmailAddressSet', $prop);
488 $this->assertEquals(['user1.sabredav@sabredav.org'],$prop->getValue());
494 $props = $this->server->getPropertiesForPath('/calendars/user1',array(
498 $this->assertArrayHasKey(0,$props);
499 $this->assertArrayHasKey(200,$props[0]);
500 $this->assertArrayHasKey('{DAV:}supported-report-set',$props[0][200]);
504 $this->assertInstanceOf('\\Sabre\\DAV\\Xml\\Property\\SupportedReportSet', $prop);
510 $this->assertEquals($value,$prop->getValue());
519 $props = $this->server->getPropertiesForPath('/calendars/user1/UUID-123467',array(
523 $this->assertArrayHasKey(0,$props);
524 $this->assertArrayHasKey(200,$props[0]);
525 $this->assertArrayHasKey('{DAV:}supported-report-set',$props[0][200]);
529 $this->assertInstanceOf('\\Sabre\\DAV\\Xml\\Property\\SupportedReportSet', $prop);
538 $this->assertEquals($value,$prop->getValue());
544 $this->server->addPlugin(new \Sabre\DAV\Sync\Plugin());
546 $props = $this->server->getPropertiesForPath('/calendars/user1',array(
550 $this->assertArrayHasKey(0,$props);
551 $this->assertArrayHasKey(200,$props[0]);
552 $this->assertArrayHasKey('{DAV:}supported-report-set',$props[0][200]);
556 $this->assertInstanceOf('\\Sabre\\DAV\\Xml\\Property\\SupportedReportSet', $prop);
563 $this->assertEquals($value,$prop->getValue());
589 $this->server->httpRequest = $request;
590 $this->server->exec();
592 …$this->assertEquals(207, $this->response->status,'Invalid HTTP status received. Full response body…
612 $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString());
640 $this->server->httpRequest = $request;
641 $this->server->exec();
643 …$this->assertEquals(207, $this->response->status,'Invalid HTTP status received. Full response body…
669 $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString());
702 $this->server->httpRequest = $request;
703 $this->server->exec();
705 …$this->assertEquals(207, $this->response->status,'Received an unexpected status. Full response bod…
731 $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString());
765 $this->server->httpRequest = $request;
766 $this->server->exec();
768 …$this->assertEquals(207, $this->response->status,'Received an unexpected status. Full response bod…
794 $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString());
827 $this->server->httpRequest = $request;
828 $this->server->exec();
830 …$this->assertEquals(400, $this->response->status,'Received an unexpected status. Full response bod…
859 $this->server->httpRequest = $request;
860 $this->server->exec();
862 …$this->assertEquals(207, $this->response->status,'Received an unexpected status. Full response bod…
879 $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString());
903 $this->server->httpRequest = $request;
904 $this->server->exec();
906 …$this->assertEquals(400, $this->response->status,'Received an unexpected status. Full response bod…
939 $this->server->httpRequest = $request;
940 $this->server->exec();
942 …$this->assertEquals(207, $this->response->status,'Received an unexpected status. Full response bod…
968 $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString());
998 $this->server->httpRequest = $request;
999 $this->server->exec();
1001 …$this->assertEquals(207, $this->response->status,'Received an unexpected status. Full response bod…
1018 $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString());
1025 …$r = $this->server->emit('onHTMLActionsPanel', [$this->server->tree->getNodeForPath('calendars/use…
1026 $this->assertFalse($r);
1028 $this->assertTrue(!!strpos($output,'Display name'));
1056 $this->server->httpRequest = $request;
1057 $this->server->exec();
1059 …$this->assertEquals(400, $this->response->status,'Invalid HTTP status received. Full response body…
1087 $this->server->httpRequest = $request;
1088 $this->server->exec();
1090 …$this->assertEquals(400, $this->response->status,'Invalid HTTP status received. Full response body…
1118 $this->server->httpRequest = $request;
1119 $this->server->exec();
1121 …$this->assertEquals(400, $this->response->status,'Invalid HTTP status received. Full response body…
1131 $props = $this->server->getProperties('calendars/user1/UUID-123467', [
1137 $this->assertEquals([