30 $this->assertEquals(0, $file->getSize());
38 $this->assertNull($file->getETag());
45 $this->assertNull($file->getContentType());
73 $lastMod = $file->getLastModified();
74 $compareTime = ($lastMod + 1) - time();
75 $this->assertTrue($compareTime < 3);
82 $file = $dir->getChild(
'mockfile');
83 $this->assertTrue($file instanceof
FileMock);
90 $this->assertTrue($dir->childExists(
'mockfile'));
97 $this->assertFalse($dir->childExists(
'mockfile2'));
107 $file = $dir->getChild(
'blabla');
117 $dir->createFile(
'hello',
'data');
127 $dir->createDirectory(
'hello');
134 $this->assertInstanceOf(
'Sabre\DAV\SimpleCollection', $dir);
145 $file2 = $dir->getChild(
'mockfile');
147 $this->assertEquals($file, $file2);
168 $dir->addChild($file);
169 $file2 = $dir->getChild(
'mockfile');
171 $this->assertEquals($file, $file2);
183 $dir->addChild($file);
185 $this->assertEquals([$file], $dir->getChildren());
195 $this->assertEquals(
'simpledir', $dir->getName());
206 $dir->getChild(
'blabla');
An exception for terminatinating execution or to throw for unit testing.
testSimpleDirectoryConstruct()
testSimpleDirectoryConstructChild()
@depends testSimpleDirectoryConstruct
testSimpleDirectoryGetChild404()
@depends testSimpleDirectoryConstruct @expectedException Sabre\DAV\Exception\NotFound
testSimpleDirectoryGetChildren()
@depends testSimpleDirectoryConstruct @depends testSimpleDirectoryAddChild
testGetChild404()
@expectedException Sabre\DAV\Exception\NotFound
testCreateDirectory()
@expectedException Sabre\DAV\Exception\Forbidden
testPut()
@expectedException Sabre\DAV\Exception\Forbidden
testSimpleDirectoryAddChild()
@depends testSimpleDirectoryConstruct
testCreateFile()
@expectedException Sabre\DAV\Exception\Forbidden
testGet()
@expectedException Sabre\DAV\Exception\Forbidden
testDelete()
@expectedException Sabre\DAV\Exception\Forbidden
testSetName()
@expectedException Sabre\DAV\Exception\Forbidden
testSimpleDirectoryBadParam()
@expectedException Sabre\DAV\Exception @depends testSimpleDirectoryConstruct
testSimpleDirectoryGetName()
getChildren()
Returns an array with all the child nodes.
getName()
Returns the name of the node.
getName()
Returns the name of the node.