mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
fix(tests): Use testing application for testing ajax endpoints, not user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com> Signed-off-by: Louis Chmn <louis@chmn.me>
This commit is contained in:
parent
92efa01337
commit
f9abfe0473
2 changed files with 14 additions and 4 deletions
10
apps/testing/ajax/endpoint.php
Normal file
10
apps/testing/ajax/endpoint.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
// Fake ajax endpoint for testing url generator
|
||||
|
|
@ -114,16 +114,16 @@ class UrlGeneratorTest extends \Test\TestCase {
|
|||
|
||||
public static function provideDocRootAppUrlParts(): array {
|
||||
return [
|
||||
['user_ldap', 'ajax/wizard.php', [], '/index.php/apps/user_ldap/ajax/wizard.php'],
|
||||
['user_ldap', 'ajax/wizard.php', ['trut' => 'trat', 'dut' => 'dat'], '/index.php/apps/user_ldap/ajax/wizard.php?trut=trat&dut=dat'],
|
||||
['testing', 'ajax/endpoint.php', [], '/index.php/apps/testing/ajax/endpoint.php'],
|
||||
['testing', 'ajax/endpoint.php', ['trut' => 'trat', 'dut' => 'dat'], '/index.php/apps/testing/ajax/endpoint.php?trut=trat&dut=dat'],
|
||||
['', 'index.php', ['trut' => 'trat', 'dut' => 'dat'], '/index.php?trut=trat&dut=dat'],
|
||||
];
|
||||
}
|
||||
|
||||
public static function provideSubDirAppUrlParts(): array {
|
||||
return [
|
||||
['user_ldap', 'ajax/wizard.php', [], '/nextcloud/index.php/apps/user_ldap/ajax/wizard.php'],
|
||||
['user_ldap', 'ajax/wizard.php', ['trut' => 'trat', 'dut' => 'dat'], '/nextcloud/index.php/apps/user_ldap/ajax/wizard.php?trut=trat&dut=dat'],
|
||||
['testing', 'ajax/endpoint.php', [], '/nextcloud/index.php/apps/testing/ajax/endpoint.php'],
|
||||
['testing', 'ajax/endpoint.php', ['trut' => 'trat', 'dut' => 'dat'], '/nextcloud/index.php/apps/testing/ajax/endpoint.php?trut=trat&dut=dat'],
|
||||
['', 'index.php', ['trut' => 'trat', 'dut' => 'dat'], '/nextcloud/index.php?trut=trat&dut=dat'],
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue