diff options
author | friendica <info@friendica.com> | 2013-10-21 15:46:31 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-10-21 15:46:31 -0700 |
commit | b35122f7a6ad42756c35bb60ba1f06c3dcd45c77 (patch) | |
tree | ccdf373ce6475d264778523259cc32899b732fe7 /vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/ApacheTest.php | |
parent | e3504df514d306cfe6b83e44a11f550664564af4 (diff) | |
download | volse-hubzilla-b35122f7a6ad42756c35bb60ba1f06c3dcd45c77.tar.gz volse-hubzilla-b35122f7a6ad42756c35bb60ba1f06c3dcd45c77.tar.bz2 volse-hubzilla-b35122f7a6ad42756c35bb60ba1f06c3dcd45c77.zip |
add sabre (1.8.x) via composer in the !@#$ place it wants to be
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/ApacheTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/ApacheTest.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/ApacheTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/ApacheTest.php new file mode 100644 index 000000000..b1ed555d4 --- /dev/null +++ b/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/ApacheTest.php @@ -0,0 +1,45 @@ +<?php + +namespace Sabre\DAV\Auth\Backend; + +use Sabre\DAV; +use Sabre\HTTP; + +class ApacheTest extends \PHPUnit_Framework_TestCase { + + function testConstruct() { + + $backend = new Apache(); + + } + + /** + * @expectedException Sabre\DAV\Exception + */ + function testNoHeader() { + + $server = new DAV\Server(); + $backend = new Apache(); + $backend->authenticate($server,'Realm'); + + } + + function testRemoteUser() { + + $backend = new Apache(); + + $server = new DAV\Server(); + $request = new HTTP\Request(array( + 'REMOTE_USER' => 'username', + )); + $server->httpRequest = $request; + + $this->assertTrue($backend->authenticate($server, 'Realm')); + + $userInfo = 'username'; + + $this->assertEquals($userInfo, $backend->getCurrentUser()); + + } + +} |