aboutsummaryrefslogblamecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CalDAV/Principal/ProxyWriteTest.php
blob: df1715ee5882f583e7c8a16a5cbb5831a5ba8acd (plain) (tree)
1
2
3
4
5
6
7
8

     

                        
                                 
 

                 



                                          
                                                      
                                               
                                      
           
                                  
 
                          

     

                                 

                                                                   
     
 

                                        

                                                                          

     

                                         

                                                                                          
     
 
<?php

declare(strict_types=1);

namespace Sabre\CalDAV\Principal;

use Sabre\DAVACL;

class ProxyWriteTest extends ProxyReadTest
{
    public function getInstance()
    {
        $backend = new DAVACL\PrincipalBackend\Mock();
        $principal = new ProxyWrite($backend, [
            'uri' => 'principal/user',
        ]);
        $this->backend = $backend;

        return $principal;
    }

    public function testGetName()
    {
        $i = $this->getInstance();
        $this->assertEquals('calendar-proxy-write', $i->getName());
    }

    public function testGetDisplayName()
    {
        $i = $this->getInstance();
        $this->assertEquals('calendar-proxy-write', $i->getDisplayName());
    }

    public function testGetPrincipalUri()
    {
        $i = $this->getInstance();
        $this->assertEquals('principal/user/calendar-proxy-write', $i->getPrincipalUrl());
    }
}