diff options
author | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
commit | 0b02a6d123b2014705998c94ddf3d460948d3eac (patch) | |
tree | 78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php | |
parent | 40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff) | |
download | volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.gz volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.bz2 volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.zip |
initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php index 412389e8b..952dc174a 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php @@ -17,9 +17,10 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase { $principals = new PrincipalCollection($backend); $dir->addChild($principals); - $fakeServer = new DAV\Server(new DAV\ObjectTree($dir)); + $fakeServer = new DAV\Server($dir); + $fakeServer->sapi = new HTTP\SapiMock(); $fakeServer->httpResponse = new HTTP\ResponseMock(); - $plugin = new Plugin($backend,'realm'); + $plugin = new Plugin(); $this->assertTrue($plugin instanceof Plugin); $fakeServer->addPlugin($plugin); $this->assertEquals($plugin, $fakeServer->getPlugin('acl')); @@ -39,7 +40,7 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase { 'REQUEST_URI' => '/principals', ); - $request = new HTTP\Request($serverVars); + $request = HTTP\Sapi::createFromServerArray($serverVars); $request->setBody($xml); $server = $this->getServer(); @@ -47,10 +48,11 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase { $server->exec(); - $this->assertEquals('HTTP/1.1 400 Bad request', $server->httpResponse->status); + $this->assertEquals(400, $server->httpResponse->status); $this->assertEquals(array( - 'Content-Type' => 'application/xml; charset=utf-8', - ), $server->httpResponse->headers); + 'X-Sabre-Version' => [DAV\Version::VERSION], + 'Content-Type' => ['application/xml; charset=utf-8'], + ), $server->httpResponse->getHeaders()); } @@ -65,7 +67,7 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase { 'REQUEST_URI' => '/principals', ); - $request = new HTTP\Request($serverVars); + $request = HTTP\Sapi::createFromServerArray($serverVars); $request->setBody($xml); $server = $this->getServer(); @@ -73,10 +75,11 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase { $server->exec(); - $this->assertEquals('HTTP/1.1 400 Bad request', $server->httpResponse->status, $server->httpResponse->body); + $this->assertEquals(400, $server->httpResponse->status, $server->httpResponse->body); $this->assertEquals(array( - 'Content-Type' => 'application/xml; charset=utf-8', - ), $server->httpResponse->headers); + 'X-Sabre-Version' => [DAV\Version::VERSION], + 'Content-Type' => ['application/xml; charset=utf-8'], + ), $server->httpResponse->getHeaders()); } @@ -91,7 +94,7 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase { 'REQUEST_URI' => '/principals', ); - $request = new HTTP\Request($serverVars); + $request = HTTP\Sapi::createFromServerArray($serverVars); $request->setBody($xml); $server = $this->getServer(); @@ -99,10 +102,11 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase { $server->exec(); - $this->assertEquals('HTTP/1.1 200 OK', $server->httpResponse->status, $server->httpResponse->body); + $this->assertEquals(200, $server->httpResponse->status, $server->httpResponse->body); $this->assertEquals(array( - 'Content-Type' => 'application/xml; charset=utf-8', - ), $server->httpResponse->headers); + 'X-Sabre-Version' => [DAV\Version::VERSION], + 'Content-Type' => ['application/xml; charset=utf-8'], + ), $server->httpResponse->getHeaders()); $check = array( |