ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAVACL\PrincipalCollectionTest Class Reference
+ Inheritance diagram for Sabre\DAVACL\PrincipalCollectionTest:
+ Collaboration diagram for Sabre\DAVACL\PrincipalCollectionTest:

Public Member Functions

 testBasic ()
 
 testGetChildren ()
 testBasic More...
 
 testGetChildrenDisable ()
 testBasic Sabre More...
 
 testFindByUri ()
 

Detailed Description

Definition at line 5 of file PrincipalCollectionTest.php.

Member Function Documentation

◆ testBasic()

Sabre\DAVACL\PrincipalCollectionTest::testBasic ( )

Definition at line 7 of file PrincipalCollectionTest.php.

7  {
8 
9  $backend = new PrincipalBackend\Mock();
10  $pc = new PrincipalCollection($backend);
11  $this->assertTrue($pc instanceof PrincipalCollection);
12 
13  $this->assertEquals('principals', $pc->getName());
14 
15  }

◆ testFindByUri()

Sabre\DAVACL\PrincipalCollectionTest::testFindByUri ( )

Definition at line 48 of file PrincipalCollectionTest.php.

48  {
49 
50  $backend = new PrincipalBackend\Mock();
51  $pc = new PrincipalCollection($backend);
52  $this->assertEquals('principals/user1', $pc->findByUri('mailto:user1.sabredav@sabredav.org'));
53  $this->assertNull($pc->findByUri('mailto:fake.user.sabredav@sabredav.org'));
54  $this->assertNull($pc->findByUri(''));
55  }

◆ testGetChildren()

Sabre\DAVACL\PrincipalCollectionTest::testGetChildren ( )

testBasic

Definition at line 20 of file PrincipalCollectionTest.php.

20  {
21 
22  $backend = new PrincipalBackend\Mock();
23  $pc = new PrincipalCollection($backend);
24 
25  $children = $pc->getChildren();
26  $this->assertTrue(is_array($children));
27 
28  foreach ($children as $child) {
29  $this->assertTrue($child instanceof IPrincipal);
30  }
31 
32  }

◆ testGetChildrenDisable()

Sabre\DAVACL\PrincipalCollectionTest::testGetChildrenDisable ( )

testBasic Sabre

Definition at line 38 of file PrincipalCollectionTest.php.

38  {
39 
40  $backend = new PrincipalBackend\Mock();
41  $pc = new PrincipalCollection($backend);
42  $pc->disableListing = true;
43 
44  $children = $pc->getChildren();
45 
46  }

The documentation for this class was generated from the following file: