Lines Matching refs:this

22         $this->server->addPlugin($locksPlugin);
23 $this->locksPlugin = $locksPlugin;
29 $this->assertEquals(array(2),$this->locksPlugin->getFeatures());
35 $this->assertEquals(array('LOCK','UNLOCK'),$this->locksPlugin->getHTTPMethods(''));
42 $this->server->httpRequest = $request;
43 $this->server->exec();
45 $this->assertEquals(array(
49 $this->response->getHeaders()
52 $this->assertEquals(400, $this->response->status);
68 $this->server->httpRequest = $request;
69 $this->server->exec();
71 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
72this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
74 …$this->assertEquals(200, $this->response->status,'Got an incorrect status back. Response body: ' .…
76 …replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"urn:DAV\"",$this->response->body);
99this->assertEquals(1,count($data),'We expected 1 match for the xpath expression "' . $elem . '". '…
103 $this->assertEquals('infinity',(string)$depth[0]);
106 …$this->assertEquals($this->response->getHeader('Lock-Token'),'<' . (string)$token[0] . '>','Token …
125 $this->server->httpRequest = $request;
126 $this->server->exec();
128 $this->response = new HTTP\ResponseMock();
129 $this->server->httpResponse = $this->response;
131 $this->server->exec();
133 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
135 … $this->assertEquals(423, $this->response->status, 'Full response: ' . $this->response->body);
154 $this->server->httpRequest = $request;
155 $this->server->exec();
157 $lockToken = $this->response->getHeader('Lock-Token');
159 $this->response = new HTTP\ResponseMock();
160 $this->server->httpResponse = $this->response;
165 $this->server->httpRequest = $request;
166 $this->server->exec();
168 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
170 …$this->assertEquals(200, $this->response->status,'We received an incorrect status code. Full respo…
189 $this->server->httpRequest = $request;
190 $this->server->exec();
192 $lockToken = $this->response->getHeader('Lock-Token');
194 $this->response = new HTTP\ResponseMock();
195 $this->server->httpResponse = $this->response;
200 $this->server->httpRequest = $request;
201 $this->server->exec();
203 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
205 …$this->assertEquals(423, $this->response->getStatus(),'We received an incorrect status code. Full …
224 $this->server->httpRequest = $request;
225 $this->server->exec();
227 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
228this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
230 $this->assertEquals(201, $this->response->status);
240 $this->server->httpRequest = $request;
241 $this->server->exec();
243 $this->assertEquals([
247 $this->response->getHeaders()
250 $this->assertEquals(400, $this->response->status);
260 $this->server->httpRequest = $request;
261 $this->server->exec();
263 $this->assertEquals([
267 $this->response->getHeaders()
270 …$this->assertEquals(409, $this->response->status, 'Got an incorrect status code. Full response bod…
289 $this->server->httpRequest = $request;
290 $this->server->exec();
292 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
293this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
295 $this->assertEquals(200, $this->response->status);
299 $this->server->httpRequest = $request;
300 $this->server->exec();
302 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
303this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
305 $this->assertEquals(423, $this->response->status);
315 $this->server->httpRequest = $request;
326 $this->server->invokeMethod($request, $this->server->httpResponse);
327 $lockToken = $this->server->httpResponse->getHeader('Lock-Token');
330 $this->server->httpRequest = $request;
331 $this->server->httpResponse = new HTTP\ResponseMock();
332 $this->server->invokeMethod($request, $this->server->httpResponse);
334 …$this->assertEquals(204,$this->server->httpResponse->status,'Got an incorrect status code. Full re…
335 $this->assertEquals([
339 $this->server->httpResponse->getHeaders()
351 $this->server->httpRequest = $request;
362 $this->server->invokeMethod($request, $this->server->httpResponse);
363 $lockToken = $this->server->httpResponse->getHeader('Lock-Token');
369 $this->server->httpRequest = $request;
370 $this->server->httpResponse = new HTTP\ResponseMock();
371 $this->server->invokeMethod($request, $this->server->httpResponse);
373 …$this->assertEquals(204, $this->server->httpResponse->status,'Got an incorrect status code. Full r…
374 $this->assertEquals([
378 $this->server->httpResponse->getHeaders()
393 $this->server->httpRequest = $request;
402 $this->server->invokeMethod($request, $this->server->httpResponse);
403 $lockToken = $this->server->httpResponse->getHeader('Lock-Token');
405 $locks = $this->locksPlugin->getLocks('test.txt');
406 $this->assertEquals(1,count($locks));
407 $this->assertEquals('Evert',$locks[0]->owner);
432 $this->server->httpRequest = $request;
433 $this->server->exec();
435 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
436this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
438 $this->assertEquals(200, $this->response->status);
448 $this->server->httpRequest = $request;
449 $this->server->exec();
451 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
452this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
455 $this->assertEquals(423, $this->response->status);
479 $this->server->httpRequest = $request;
480 $this->server->exec();
482 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
483this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
485 $this->assertEquals(200, $this->response->status);
493 $this->server->httpRequest = $request;
494 $this->server->exec();
496 $this->assertEquals(423, $this->response->status);
497 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
520 $this->server->httpRequest = $request;
521 $this->server->exec();
523 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
524this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
526 $this->assertEquals(200, $this->response->status);
531 'HTTP_IF' => '(' . $this->response->getHeader('Lock-Token') . ')',
535 $this->server->httpRequest = $request;
536 $this->server->exec();
538 $this->assertEquals(204, $this->response->status);
539 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
563 $this->server->httpRequest = $request;
564 $this->server->exec();
566 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
567this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
569 $this->assertEquals(200, $this->response->status);
578 $this->server->httpRequest = $request;
579 $this->server->exec();
581 …$this->assertEquals(201, $this->response->status,'Copy must succeed if only the source is locked, …
582 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
605 $this->server->httpRequest = $request;
606 $this->server->exec();
608 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
609this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
611 $this->assertEquals(201, $this->response->status);
620 $this->server->httpRequest = $request;
621 $this->server->exec();
623 …$this->assertEquals(423, $this->response->status,'Copy must succeed if only the source is locked, …
624 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
648 $this->server->httpRequest = $request;
649 $this->server->exec();
651 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
652this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
654 $this->assertEquals(200, $this->response->status);
663 $this->server->httpRequest = $request;
664 $this->server->exec();
666 …$this->assertEquals(423, $this->response->status,'Copy must succeed if only the source is locked, …
667 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
691 $this->server->httpRequest = $request;
692 $this->server->exec();
694 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
695this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
697 $this->assertEquals(200, $this->response->status);
703 'HTTP_IF' => '(' . $this->response->getHeader('Lock-Token') . ')',
707 $this->server->httpRequest = $request;
708 $this->server->exec();
710this->assertEquals(201, $this->response->status,'A valid lock-token was provided for the source, s…
734 $this->server->httpRequest = $request;
735 $this->server->exec();
737 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
738this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
740 $this->assertEquals(201, $this->response->status);
749 $this->server->httpRequest = $request;
750 $this->server->exec();
752 …$this->assertEquals(423, $this->response->status,'Copy must succeed if only the source is locked, …
753 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
777 $this->server->httpRequest = $request;
778 $this->server->exec();
780 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
781this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
783 $this->assertEquals(200,$this->response->status);
789 'HTTP_IF' => '</dir> (' . $this->response->getHeader('Lock-Token') . ')',
793 $this->server->httpRequest = $request;
794 $this->server->exec();
796 …$this->assertEquals(201, $this->response->status,'We locked the parent of both the source and dest…
797 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
821 $this->server->httpRequest = $request;
822 $this->server->exec();
824 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
825this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
827 $this->assertEquals(200, $this->response->status);
832 'HTTP_IF' => '('.$this->response->getHeader('Lock-Token').')',
837 $this->server->httpRequest = $request;
838 $this->server->exec();
840 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
841this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
843 $this->assertEquals(204, $this->response->status);
862 $this->server->httpRequest = $request;
863 $this->server->exec();
865 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
866this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
868 $this->assertEquals(201, $this->response->getStatus());
873 ['If' => '</unrelated.txt> ('.$this->response->getHeader('Lock-Token').')']
876 $this->server->httpRequest = $request;
877 $this->server->exec();
879 … $this->assertEquals('application/xml; charset=utf-8',$this->response->getHeader('Content-Type'));
880this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/',$this->response->getHeader('Lock-Token'))…
882 $this->assertEquals(204, $this->response->status);
896 $this->server->httpRequest = $request;
897 $this->server->exec();
898 $this->assertEquals(412, $this->response->status);
909 $this->server->tree = $tree;
925 $this->server->httpRequest = $request;
926 $this->server->exec();
927 …$this->assertEquals(204, $this->response->status, 'Incorrect status received. Full response body:'…
940 $this->server->httpRequest = $request;
941 $this->server->exec();
942 $this->assertEquals(412, $this->response->status);
952 $this->server->httpRequest = $request;
953 $this->assertEquals(100, $this->locksPlugin->getTimeoutHeader());
963 $this->server->httpRequest = $request;
964 $this->assertEquals(5, $this->locksPlugin->getTimeoutHeader());
974 $this->server->httpRequest = $request;
975 $this->assertEquals(LockInfo::TIMEOUT_INFINITE, $this->locksPlugin->getTimeoutHeader());
988 $this->server->httpRequest = $request;
989 $this->locksPlugin->getTimeoutHeader();