aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.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/BasicNodeTest.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/BasicNodeTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php64
1 files changed, 32 insertions, 32 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php b/vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php
index 155c785f8..ec104ec80 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php
@@ -7,7 +7,7 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
/**
* @expectedException Sabre\DAV\Exception\Forbidden
*/
- public function testPut() {
+ function testPut() {
$file = new FileMock();
$file->put('hi');
@@ -17,29 +17,29 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
/**
* @expectedException Sabre\DAV\Exception\Forbidden
*/
- public function testGet() {
+ function testGet() {
$file = new FileMock();
$file->get();
}
- public function testGetSize() {
+ function testGetSize() {
$file = new FileMock();
- $this->assertEquals(0,$file->getSize());
+ $this->assertEquals(0, $file->getSize());
}
- public function testGetETag() {
+ function testGetETag() {
$file = new FileMock();
$this->assertNull($file->getETag());
}
- public function testGetContentType() {
+ function testGetContentType() {
$file = new FileMock();
$this->assertNull($file->getContentType());
@@ -49,7 +49,7 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
/**
* @expectedException Sabre\DAV\Exception\Forbidden
*/
- public function testDelete() {
+ function testDelete() {
$file = new FileMock();
$file->delete();
@@ -59,24 +59,24 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
/**
* @expectedException Sabre\DAV\Exception\Forbidden
*/
- public function testSetName() {
+ function testSetName() {
$file = new FileMock();
$file->setName('hi');
}
- public function testGetLastModified() {
+ function testGetLastModified() {
$file = new FileMock();
// checking if lastmod is within the range of a few seconds
$lastMod = $file->getLastModified();
- $compareTime = ($lastMod + 1)-time();
+ $compareTime = ($lastMod + 1) - time();
$this->assertTrue($compareTime < 3);
}
- public function testGetChild() {
+ function testGetChild() {
$dir = new DirectoryMock();
$file = $dir->getChild('mockfile');
@@ -84,14 +84,14 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
}
- public function testChildExists() {
+ function testChildExists() {
$dir = new DirectoryMock();
$this->assertTrue($dir->childExists('mockfile'));
}
- public function testChildExistsFalse() {
+ function testChildExistsFalse() {
$dir = new DirectoryMock();
$this->assertFalse($dir->childExists('mockfile2'));
@@ -101,7 +101,7 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
/**
* @expectedException Sabre\DAV\Exception\NotFound
*/
- public function testGetChild404() {
+ function testGetChild404() {
$dir = new DirectoryMock();
$file = $dir->getChild('blabla');
@@ -111,26 +111,26 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
/**
* @expectedException Sabre\DAV\Exception\Forbidden
*/
- public function testCreateFile() {
+ function testCreateFile() {
$dir = new DirectoryMock();
- $dir->createFile('hello','data');
+ $dir->createFile('hello', 'data');
}
/**
* @expectedException Sabre\DAV\Exception\Forbidden
*/
- public function testCreateDirectory() {
+ function testCreateDirectory() {
$dir = new DirectoryMock();
$dir->createDirectory('hello');
}
- public function testSimpleDirectoryConstruct() {
+ function testSimpleDirectoryConstruct() {
- $dir = new SimpleCollection('simpledir',array());
+ $dir = new SimpleCollection('simpledir', []);
$this->assertInstanceOf('Sabre\DAV\SimpleCollection', $dir);
}
@@ -138,13 +138,13 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
/**
* @depends testSimpleDirectoryConstruct
*/
- public function testSimpleDirectoryConstructChild() {
+ function testSimpleDirectoryConstructChild() {
$file = new FileMock();
- $dir = new SimpleCollection('simpledir',array($file));
+ $dir = new SimpleCollection('simpledir', [$file]);
$file2 = $dir->getChild('mockfile');
- $this->assertEquals($file,$file2);
+ $this->assertEquals($file, $file2);
}
@@ -152,23 +152,23 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
* @expectedException Sabre\DAV\Exception
* @depends testSimpleDirectoryConstruct
*/
- public function testSimpleDirectoryBadParam() {
+ function testSimpleDirectoryBadParam() {
- $dir = new SimpleCollection('simpledir',array('string shouldn\'t be here'));
+ $dir = new SimpleCollection('simpledir', ['string shouldn\'t be here']);
}
/**
* @depends testSimpleDirectoryConstruct
*/
- public function testSimpleDirectoryAddChild() {
+ function testSimpleDirectoryAddChild() {
$file = new FileMock();
$dir = new SimpleCollection('simpledir');
$dir->addChild($file);
$file2 = $dir->getChild('mockfile');
- $this->assertEquals($file,$file2);
+ $this->assertEquals($file, $file2);
}
@@ -176,23 +176,23 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
* @depends testSimpleDirectoryConstruct
* @depends testSimpleDirectoryAddChild
*/
- public function testSimpleDirectoryGetChildren() {
+ function testSimpleDirectoryGetChildren() {
$file = new FileMock();
$dir = new SimpleCollection('simpledir');
$dir->addChild($file);
- $this->assertEquals(array($file),$dir->getChildren());
+ $this->assertEquals([$file], $dir->getChildren());
}
/*
* @depends testSimpleDirectoryConstruct
*/
- public function testSimpleDirectoryGetName() {
+ function testSimpleDirectoryGetName() {
$dir = new SimpleCollection('simpledir');
- $this->assertEquals('simpledir',$dir->getName());
+ $this->assertEquals('simpledir', $dir->getName());
}
@@ -200,7 +200,7 @@ class BasicNodeTest extends \PHPUnit_Framework_TestCase {
* @depends testSimpleDirectoryConstruct
* @expectedException Sabre\DAV\Exception\NotFound
*/
- public function testSimpleDirectoryGetChild404() {
+ function testSimpleDirectoryGetChild404() {
$dir = new SimpleCollection('simpledir');
$dir->getChild('blabla');
@@ -218,7 +218,7 @@ class DirectoryMock extends Collection {
function getChildren() {
- return array(new FileMock());
+ return [new FileMock()];
}