diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-01-02 16:16:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-02 16:16:50 +0100 |
commit | c347b7cc148f69f12f7d8e98e3e6fee3a026d11c (patch) | |
tree | 8048a7e68d01554f1b4ebce6fbfe9aa6495c7995 /tests/lib | |
parent | dbbe68745621cc193bf37d510b6ed3f5e11c4373 (diff) | |
parent | d393b1612bab004359621500ff5e771d10165a95 (diff) | |
download | nextcloud-server-c347b7cc148f69f12f7d8e98e3e6fee3a026d11c.tar.gz nextcloud-server-c347b7cc148f69f12f7d8e98e3e6fee3a026d11c.zip |
Merge pull request #18583 from nextcloud/enh/18579/chrome-regex-brave-vivaldi-opera
Modify regex to match some other chromium browsers
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/AppFramework/Http/RequestTest.php | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index 000a05f7913..56982aaf511 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -103,7 +103,7 @@ class RequestTest extends \Test\TestCase { } - + public function testImmutableArrayAccess() { $this->expectException(\RuntimeException::class); @@ -123,7 +123,7 @@ class RequestTest extends \Test\TestCase { $request['nickname'] = 'Janey'; } - + public function testImmutableMagicAccess() { $this->expectException(\RuntimeException::class); @@ -143,7 +143,7 @@ class RequestTest extends \Test\TestCase { $request->{'nickname'} = 'Janey'; } - + public function testGetTheMethodRight() { $this->expectException(\LogicException::class); @@ -999,6 +999,27 @@ class RequestTest extends \Test\TestCase { ], true, ], + [ + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.99 Safari/537.36 Vivaldi/2.9.1705.41', + [ + Request::USER_AGENT_CHROME + ], + true + ], + [ + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.38 Safari/537.36 Brave/75', + [ + Request::USER_AGENT_CHROME + ], + true + ], + [ + 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 OPR/50.0.2762.67', + [ + Request::USER_AGENT_CHROME + ], + true + ] ]; } @@ -1246,7 +1267,7 @@ class RequestTest extends \Test\TestCase { $this->assertSame('www.owncloud.org', self::invokePrivate($request, 'getOverwriteHost')); } - + public function testGetPathInfoNotProcessible() { $this->expectException(\Exception::class); $this->expectExceptionMessage('The requested uri(/foo.php) cannot be processed by the script \'/var/www/index.php\')'); @@ -1267,7 +1288,7 @@ class RequestTest extends \Test\TestCase { $request->getPathInfo(); } - + public function testGetRawPathInfoNotProcessible() { $this->expectException(\Exception::class); $this->expectExceptionMessage('The requested uri(/foo.php) cannot be processed by the script \'/var/www/index.php\')'); |