aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-05-28 17:46:24 +0200
committerMario Vavti <mario@mariovavti.com>2016-05-28 17:46:24 +0200
commit66effbfe0827fc61fff6d248797a894213ad20d6 (patch)
tree0fbb5ca644e1140e5b3b44b1adc874043790c388 /vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php
parentac4688eac087854bf8cb0c893d7a79052ad63a20 (diff)
downloadvolse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.gz
volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.bz2
volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.zip
upgrade to sabre32
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php b/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php
index 9516c2390..ad33200c8 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php
@@ -16,18 +16,18 @@ class TreeTest extends \PHPUnit_Framework_TestCase {
function testCopy() {
$tree = new TreeMock();
- $tree->copy('hi','hi2');
+ $tree->copy('hi', 'hi2');
$this->assertArrayHasKey('hi2', $tree->getNodeForPath('')->newDirectories);
$this->assertEquals('foobar', $tree->getNodeForPath('hi/file')->get());
- $this->assertEquals(array('test1'=>'value'), $tree->getNodeForPath('hi/file')->getProperties(array()));
+ $this->assertEquals(['test1' => 'value'], $tree->getNodeForPath('hi/file')->getProperties([]));
}
function testMove() {
$tree = new TreeMock();
- $tree->move('hi','hi2');
+ $tree->move('hi', 'hi2');
$this->assertEquals('hi2', $tree->getNodeForPath('hi')->getName());
$this->assertTrue($tree->getNodeForPath('hi')->isRenamed);
@@ -37,7 +37,7 @@ class TreeTest extends \PHPUnit_Framework_TestCase {
function testDeepMove() {
$tree = new TreeMock();
- $tree->move('hi/sub','hi2');
+ $tree->move('hi/sub', 'hi2');
$this->assertArrayHasKey('hi2', $tree->getNodeForPath('')->newDirectories);
$this->assertTrue($tree->getNodeForPath('hi/sub')->isDeleted);
@@ -56,7 +56,7 @@ class TreeTest extends \PHPUnit_Framework_TestCase {
$tree = new TreeMock();
$children = $tree->getChildren('');
- $this->assertEquals(2,count($children));
+ $this->assertEquals(2, count($children));
$this->assertEquals('hi', $children[0]->getName());
}
@@ -85,12 +85,12 @@ class TreeTest extends \PHPUnit_Framework_TestCase {
class TreeMock extends Tree {
- private $nodes = array();
+ private $nodes = [];
function __construct() {
$file = new TreeFileTester('file');
- $file->properties = ['test1'=>'value'];
+ $file->properties = ['test1' => 'value'];
$file->data = 'foobar';
parent::__construct(
@@ -113,8 +113,8 @@ class TreeMock extends Tree {
class TreeDirectoryTester extends SimpleCollection {
- public $newDirectories = array();
- public $newFiles = array();
+ public $newDirectories = [];
+ public $newFiles = [];
public $isDeleted = false;
public $isRenamed = false;
@@ -124,7 +124,7 @@ class TreeDirectoryTester extends SimpleCollection {
}
- function createFile($name,$data = null) {
+ function createFile($name, $data = null) {
$this->newFiles[$name] = $data;
@@ -132,7 +132,7 @@ class TreeDirectoryTester extends SimpleCollection {
function getChild($name) {
- if (isset($this->newDirectories[$name])) return new TreeDirectoryTester($name);
+ if (isset($this->newDirectories[$name])) return new self($name);
if (isset($this->newFiles[$name])) return new TreeFileTester($name, $this->newFiles[$name]);
return parent::getChild($name);
@@ -225,7 +225,7 @@ class TreeMultiGetTester extends TreeDirectoryTester implements IMultiGet {
function getMultipleChildren(array $paths) {
$result = [];
- foreach($paths as $path) {
+ foreach ($paths as $path) {
try {
$child = $this->getChild($path);
$result[] = $child;