aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-10 12:49:51 +0000
committerMario <mario@mariovavti.com>2019-11-10 14:10:03 +0100
commit580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch)
tree82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php
parentd22766f458a8539a40a57f3946459a9be1f21cd6 (diff)
downloadvolse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php102
1 files changed, 47 insertions, 55 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php b/vendor/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php
index 15289ce52..6b6652967 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php
@@ -1,100 +1,92 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV;
require_once 'Sabre/TestUtil.php';
-class ObjectTreeTest extends \PHPUnit_Framework_TestCase {
-
+class ObjectTreeTest extends \PHPUnit\Framework\TestCase
+{
protected $tree;
- function setup() {
-
+ public function setup()
+ {
\Sabre\TestUtil::clearTempDir();
- mkdir(SABRE_TEMPDIR . '/root');
- mkdir(SABRE_TEMPDIR . '/root/subdir');
- file_put_contents(SABRE_TEMPDIR . '/root/file.txt', 'contents');
- file_put_contents(SABRE_TEMPDIR . '/root/subdir/subfile.txt', 'subcontents');
- $rootNode = new FSExt\Directory(SABRE_TEMPDIR . '/root');
+ mkdir(SABRE_TEMPDIR.'/root');
+ mkdir(SABRE_TEMPDIR.'/root/subdir');
+ file_put_contents(SABRE_TEMPDIR.'/root/file.txt', 'contents');
+ file_put_contents(SABRE_TEMPDIR.'/root/subdir/subfile.txt', 'subcontents');
+ $rootNode = new FSExt\Directory(SABRE_TEMPDIR.'/root');
$this->tree = new Tree($rootNode);
-
}
- function teardown() {
-
+ public function teardown()
+ {
\Sabre\TestUtil::clearTempDir();
-
}
- function testGetRootNode() {
-
+ public function testGetRootNode()
+ {
$root = $this->tree->getNodeForPath('');
$this->assertInstanceOf('Sabre\\DAV\\FSExt\\Directory', $root);
-
}
- function testGetSubDir() {
-
+ public function testGetSubDir()
+ {
$root = $this->tree->getNodeForPath('subdir');
$this->assertInstanceOf('Sabre\\DAV\\FSExt\\Directory', $root);
-
}
- function testCopyFile() {
-
- $this->tree->copy('file.txt', 'file2.txt');
- $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/file2.txt'));
- $this->assertEquals('contents', file_get_contents(SABRE_TEMPDIR . '/root/file2.txt'));
-
+ public function testCopyFile()
+ {
+ $this->tree->copy('file.txt', 'file2.txt');
+ $this->assertTrue(file_exists(SABRE_TEMPDIR.'/root/file2.txt'));
+ $this->assertEquals('contents', file_get_contents(SABRE_TEMPDIR.'/root/file2.txt'));
}
/**
* @depends testCopyFile
*/
- function testCopyDirectory() {
-
- $this->tree->copy('subdir', 'subdir2');
- $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir2'));
- $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir2/subfile.txt'));
- $this->assertEquals('subcontents', file_get_contents(SABRE_TEMPDIR . '/root/subdir2/subfile.txt'));
-
+ public function testCopyDirectory()
+ {
+ $this->tree->copy('subdir', 'subdir2');
+ $this->assertTrue(file_exists(SABRE_TEMPDIR.'/root/subdir2'));
+ $this->assertTrue(file_exists(SABRE_TEMPDIR.'/root/subdir2/subfile.txt'));
+ $this->assertEquals('subcontents', file_get_contents(SABRE_TEMPDIR.'/root/subdir2/subfile.txt'));
}
/**
* @depends testCopyFile
*/
- function testMoveFile() {
-
- $this->tree->move('file.txt', 'file2.txt');
- $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/file2.txt'));
- $this->assertFalse(file_exists(SABRE_TEMPDIR . '/root/file.txt'));
- $this->assertEquals('contents', file_get_contents(SABRE_TEMPDIR . '/root/file2.txt'));
-
+ public function testMoveFile()
+ {
+ $this->tree->move('file.txt', 'file2.txt');
+ $this->assertTrue(file_exists(SABRE_TEMPDIR.'/root/file2.txt'));
+ $this->assertFalse(file_exists(SABRE_TEMPDIR.'/root/file.txt'));
+ $this->assertEquals('contents', file_get_contents(SABRE_TEMPDIR.'/root/file2.txt'));
}
/**
* @depends testMoveFile
*/
- function testMoveFileNewParent() {
-
- $this->tree->move('file.txt', 'subdir/file2.txt');
- $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir/file2.txt'));
- $this->assertFalse(file_exists(SABRE_TEMPDIR . '/root/file.txt'));
- $this->assertEquals('contents', file_get_contents(SABRE_TEMPDIR . '/root/subdir/file2.txt'));
-
+ public function testMoveFileNewParent()
+ {
+ $this->tree->move('file.txt', 'subdir/file2.txt');
+ $this->assertTrue(file_exists(SABRE_TEMPDIR.'/root/subdir/file2.txt'));
+ $this->assertFalse(file_exists(SABRE_TEMPDIR.'/root/file.txt'));
+ $this->assertEquals('contents', file_get_contents(SABRE_TEMPDIR.'/root/subdir/file2.txt'));
}
/**
* @depends testCopyDirectory
*/
- function testMoveDirectory() {
-
- $this->tree->move('subdir', 'subdir2');
- $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir2'));
- $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir2/subfile.txt'));
- $this->assertFalse(file_exists(SABRE_TEMPDIR . '/root/subdir'));
- $this->assertEquals('subcontents', file_get_contents(SABRE_TEMPDIR . '/root/subdir2/subfile.txt'));
-
+ public function testMoveDirectory()
+ {
+ $this->tree->move('subdir', 'subdir2');
+ $this->assertTrue(file_exists(SABRE_TEMPDIR.'/root/subdir2'));
+ $this->assertTrue(file_exists(SABRE_TEMPDIR.'/root/subdir2/subfile.txt'));
+ $this->assertFalse(file_exists(SABRE_TEMPDIR.'/root/subdir'));
+ $this->assertEquals('subcontents', file_get_contents(SABRE_TEMPDIR.'/root/subdir2/subfile.txt'));
}
-
}