Definition at line 5 of file TreeTest.php.
◆ testCopy()
Sabre\DAV\TreeTest::testCopy |
( |
| ) |
|
Definition at line 16 of file TreeTest.php.
References $tree.
18 $tree =
new TreeMock();
19 $tree->copy(
'hi',
'hi2');
21 $this->assertArrayHasKey(
'hi2',
$tree->getNodeForPath(
'')->newDirectories);
22 $this->assertEquals(
'foobar',
$tree->getNodeForPath(
'hi/file')->get());
23 $this->assertEquals([
'test1' =>
'value'],
$tree->getNodeForPath(
'hi/file')->getProperties([]));
◆ testDeepMove()
Sabre\DAV\TreeTest::testDeepMove |
( |
| ) |
|
Definition at line 37 of file TreeTest.php.
References $tree.
39 $tree =
new TreeMock();
40 $tree->move(
'hi/sub',
'hi2');
42 $this->assertArrayHasKey(
'hi2',
$tree->getNodeForPath(
'')->newDirectories);
43 $this->assertTrue(
$tree->getNodeForPath(
'hi/sub')->isDeleted);
◆ testDelete()
Sabre\DAV\TreeTest::testDelete |
( |
| ) |
|
Definition at line 47 of file TreeTest.php.
References $tree.
49 $tree =
new TreeMock();
51 $this->assertTrue(
$tree->getNodeForPath(
'hi')->isDeleted);
◆ testGetChildren()
Sabre\DAV\TreeTest::testGetChildren |
( |
| ) |
|
Definition at line 55 of file TreeTest.php.
References $tree.
57 $tree =
new TreeMock();
58 $children =
$tree->getChildren(
'');
59 $this->assertEquals(2, count($children));
60 $this->assertEquals(
'hi', $children[0]->getName());
◆ testGetMultipleNodes()
Sabre\DAV\TreeTest::testGetMultipleNodes |
( |
| ) |
|
Definition at line 64 of file TreeTest.php.
References $result, and $tree.
66 $tree =
new TreeMock();
67 $result =
$tree->getMultipleNodes([
'hi/sub',
'hi/file']);
68 $this->assertArrayHasKey(
'hi/sub',
$result);
69 $this->assertArrayHasKey(
'hi/file',
$result);
71 $this->assertEquals(
'sub',
$result[
'hi/sub']->getName());
72 $this->assertEquals(
'file',
$result[
'hi/file']->getName());
◆ testGetMultipleNodes2()
Sabre\DAV\TreeTest::testGetMultipleNodes2 |
( |
| ) |
|
◆ testMove()
Sabre\DAV\TreeTest::testMove |
( |
| ) |
|
Definition at line 27 of file TreeTest.php.
References $tree.
29 $tree =
new TreeMock();
30 $tree->move(
'hi',
'hi2');
32 $this->assertEquals(
'hi2',
$tree->getNodeForPath(
'hi')->getName());
33 $this->assertTrue(
$tree->getNodeForPath(
'hi')->isRenamed);
◆ testNodeExists()
Sabre\DAV\TreeTest::testNodeExists |
( |
| ) |
|
Definition at line 7 of file TreeTest.php.
References $tree.
9 $tree =
new TreeMock();
11 $this->assertTrue(
$tree->nodeExists(
'hi'));
12 $this->assertFalse(
$tree->nodeExists(
'hello'));
The documentation for this class was generated from the following file: