]> git.mxchange.org Git - friendica.git/blob - tests/src/Module/BaseApiTest.php
Merge pull request #10999 from nupplaphil/bug/configcache_set
[friendica.git] / tests / src / Module / BaseApiTest.php
1 <?php
2
3 namespace Friendica\Test\src\Module;
4
5 use Friendica\Test\src\Module\Api\ApiTest;
6
7 class BaseApiTest extends ApiTest
8 {
9         public function withWrongAuth()
10         {
11                 self::markTestIncomplete('Needs BasicAuth as dynamic method for overriding first');
12
13                 /*
14                 global $API;
15                 $API['api_path']           = [
16                         'method' => 'method',
17                         'auth'   => true
18                 ];
19                 $_SESSION['authenticated'] = false;
20                 $_SERVER['REQUEST_METHOD'] = 'method';
21                 $_SERVER['QUERY_STRING'] = 'pagename=api_path';
22
23                 $args = DI::args()->determine($_SERVER, $_GET);
24
25                 self::assertEquals(
26                         '{"status":{"error":"This API requires login","code":"401 Unauthorized","request":"api_path"}}',
27                         api_call($this->app, $args)
28                 );
29                 */
30         }
31 }