diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-04-21 22:45:35 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-04-22 13:09:25 +0200 |
commit | c870b6ab2eec668813eb5127ffcf19e9b91e9011 (patch) | |
tree | d97b99499fe9606af9f563ba884496586417fbb2 /tests | |
parent | ac57bbcf999b5b8831722d04c2a4e54133eb2498 (diff) | |
download | nextcloud-server-c870b6ab2eec668813eb5127ffcf19e9b91e9011.tar.gz nextcloud-server-c870b6ab2eec668813eb5127ffcf19e9b91e9011.zip |
Fix new routing in settings etc
Also prefix resources
Unify the prefix handling
Handle urls with and without slash
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/AppFramework/Routing/RoutingTest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/AppFramework/Routing/RoutingTest.php b/tests/lib/AppFramework/Routing/RoutingTest.php index f9cd181468f..34aaff82310 100644 --- a/tests/lib/AppFramework/Routing/RoutingTest.php +++ b/tests/lib/AppFramework/Routing/RoutingTest.php @@ -194,13 +194,13 @@ class RoutingTest extends \Test\TestCase { public function testResource() { $routes = ['resources' => ['account' => ['url' => '/accounts']]]; - $this->assertResource($routes, 'account', '/accounts', 'AccountController', 'id'); + $this->assertResource($routes, 'account', '/apps/app1/accounts', 'AccountController', 'id'); } public function testResourceWithUnderScoreName() { $routes = ['resources' => ['admin_accounts' => ['url' => '/admin/accounts']]]; - $this->assertResource($routes, 'admin_accounts', '/admin/accounts', 'AdminAccountsController', 'id'); + $this->assertResource($routes, 'admin_accounts', '/apps/app1/admin/accounts', 'AdminAccountsController', 'id'); } private function assertSimpleRoute($routes, $name, $verb, $url, $controllerName, $actionName, array $requirements = [], array $defaults = [], $postfix = '', $allowRootUrl = false): void { |