summaryrefslogtreecommitdiffstats
path: root/tests/lib/connector/sabre/BlockLegacyClientPluginTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/connector/sabre/BlockLegacyClientPluginTest.php')
-rw-r--r--tests/lib/connector/sabre/BlockLegacyClientPluginTest.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/lib/connector/sabre/BlockLegacyClientPluginTest.php b/tests/lib/connector/sabre/BlockLegacyClientPluginTest.php
index 2c7835dd73e..05488d9716a 100644
--- a/tests/lib/connector/sabre/BlockLegacyClientPluginTest.php
+++ b/tests/lib/connector/sabre/BlockLegacyClientPluginTest.php
@@ -97,7 +97,7 @@ class BlockLegacyClientPluginTest extends TestCase {
* @dataProvider newAndAlternateDesktopClientProvider
* @param string $userAgent
*/
- public function testBeforeHandlerSucess($userAgent) {
+ public function testBeforeHandlerSuccess($userAgent) {
/** @var \Sabre\HTTP\RequestInterface $request */
$request = $this->getMock('\Sabre\HTTP\RequestInterface');
$request
@@ -115,4 +115,15 @@ class BlockLegacyClientPluginTest extends TestCase {
$this->blockLegacyClientVersionPlugin->beforeHandler($request);
}
+ public function testBeforeHandlerNoUserAgent() {
+ /** @var \Sabre\HTTP\RequestInterface $request */
+ $request = $this->getMock('\Sabre\HTTP\RequestInterface');
+ $request
+ ->expects($this->once())
+ ->method('getHeader')
+ ->with('User-Agent')
+ ->will($this->returnValue(null));
+ $this->blockLegacyClientVersionPlugin->beforeHandler($request);
+ }
+
}