1<?php
2
3namespace Sabre\CalDAV\Principal;
4use Sabre\DAVACL;
5
6class ProxyWriteTest extends ProxyReadTest {
7
8    function getInstance() {
9
10        $backend = new DAVACL\PrincipalBackend\Mock();
11        $principal = new ProxyWrite($backend, array(
12            'uri' => 'principal/user',
13        ));
14        $this->backend = $backend;
15        return $principal;
16
17    }
18
19    function testGetName() {
20
21        $i = $this->getInstance();
22        $this->assertEquals('calendar-proxy-write', $i->getName());
23
24    }
25    function testGetDisplayName() {
26
27        $i = $this->getInstance();
28        $this->assertEquals('calendar-proxy-write', $i->getDisplayName());
29
30    }
31
32    function testGetPrincipalUri() {
33
34        $i = $this->getInstance();
35        $this->assertEquals('principal/user/calendar-proxy-write', $i->getPrincipalUrl());
36
37    }
38
39}
40