From 66effbfe0827fc61fff6d248797a894213ad20d6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 28 May 2016 17:46:24 +0200 Subject: upgrade to sabre32 --- .../tests/Sabre/DAV/ServerUpdatePropertiesTest.php | 63 +++++++++++----------- 1 file changed, 31 insertions(+), 32 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAV/ServerUpdatePropertiesTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/DAV/ServerUpdatePropertiesTest.php b/vendor/sabre/dav/tests/Sabre/DAV/ServerUpdatePropertiesTest.php index 7fde11b22..383f8e657 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/ServerUpdatePropertiesTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/ServerUpdatePropertiesTest.php @@ -1,101 +1,100 @@ updateProperties('foo', array( + $result = $server->updateProperties('foo', [ '{DAV:}foo' => 'bar' - )); + ]); - $expected = array( + $expected = [ '{DAV:}foo' => 403, - ); + ]; $this->assertEquals($expected, $result); } function testUpdatePropertiesProtected() { - $tree = array( + $tree = [ new SimpleCollection('foo'), - ); + ]; $server = new Server($tree); $server->on('propPatch', function($path, PropPatch $propPatch) { $propPatch->handleRemaining(function() { return true; }); }); - $result = $server->updateProperties('foo', array( + $result = $server->updateProperties('foo', [ '{DAV:}getetag' => 'bla', - '{DAV:}foo' => 'bar' - )); + '{DAV:}foo' => 'bar' + ]); - $expected = array( + $expected = [ '{DAV:}getetag' => 403, - '{DAV:}foo' => 424, - ); + '{DAV:}foo' => 424, + ]; $this->assertEquals($expected, $result); } function testUpdatePropertiesEventFail() { - $tree = array( + $tree = [ new SimpleCollection('foo'), - ); + ]; $server = new Server($tree); $server->on('propPatch', function($path, PropPatch $propPatch) { $propPatch->setResultCode('{DAV:}foo', 404); $propPatch->handleRemaining(function() { return true; }); }); - $result = $server->updateProperties('foo', array( - '{DAV:}foo' => 'bar', + $result = $server->updateProperties('foo', [ + '{DAV:}foo' => 'bar', '{DAV:}foo2' => 'bla', - )); + ]); - $expected = array( - '{DAV:}foo' => 404, + $expected = [ + '{DAV:}foo' => 404, '{DAV:}foo2' => 424, - ); + ]; $this->assertEquals($expected, $result); } function testUpdatePropertiesEventSuccess() { - $tree = array( + $tree = [ new SimpleCollection('foo'), - ); + ]; $server = new Server($tree); $server->on('propPatch', function($path, PropPatch $propPatch) { $propPatch->handle(['{DAV:}foo', '{DAV:}foo2'], function() { return [ - '{DAV:}foo' => 200, + '{DAV:}foo' => 200, '{DAV:}foo2' => 201, ]; }); }); - $result = $server->updateProperties('foo', array( - '{DAV:}foo' => 'bar', + $result = $server->updateProperties('foo', [ + '{DAV:}foo' => 'bar', '{DAV:}foo2' => 'bla', - )); + ]); - $expected = array( - '{DAV:}foo' => 200, + $expected = [ + '{DAV:}foo' => 200, '{DAV:}foo2' => 201, - ); + ]; $this->assertEquals($expected, $result); } -- cgit v1.2.3