test fixes

This commit is contained in:
Dennis Eichhorn 2024-03-17 03:57:41 +00:00
parent 10de97b0e4
commit 73729510ea
22 changed files with 5 additions and 385 deletions

View File

@ -368,7 +368,7 @@ final class ApiController extends Controller
->hasPermission(PermissionType::CREATE, $this->app->unitId, null, self::NAME, PermissionCategory::ACCEPT)
) {
$response->header->status = RequestStatusCode::R_403;
$this->createInvalidUpdateResponse($request, $response, null);
$this->createInvalidUpdateResponse($request, $response, []);
return;
}

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'شارات',
'Name' => 'اسم',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Odznaky',
'Name' => 'název',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Badges.',
'Name' => 'Navn',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Κονδύλια',
'Name' => 'Ονομα',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Insignias',
'Name' => 'Nombre',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Merkit',
'Name' => 'Nimi',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Badges',
'Name' => 'Nom',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Jelvények',
'Name' => 'Név',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Distintivi',
'Name' => 'Nome',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'バッジ',
'Name' => '名前',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => '배지',
'Name' => '이름',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Merker',
'Name' => 'Navn',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Odznaki',
'Name' => 'Nazwa',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Distintivos',
'Name' => 'Nome',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Значки',
'Name' => 'Имя',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Märken',
'Name' => 'namn',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'ป้าย',
'Name' => 'ชื่อ',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Rozetler',
'Name' => 'İsim',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => 'Значки',
'Name' => 'Назва',
]];

View File

@ -1,19 +0,0 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
return ['QA' => [
'All' => '',
'Badges' => '徽章',
'Name' => '名称',
]];

View File

@ -75,8 +75,8 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
TestUtils::setMember($account, 'id', 1);
$permission = new AccountPermission();
$permission->unit = 1;
$permission->app = 2;
$permission->unit = $this->app->unitId;
$permission->app = $this->app->appId;
$permission->setPermission(
PermissionType::READ
| PermissionType::CREATE
@ -298,7 +298,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
$response = new HttpResponse();
$request = new HttpRequest();
$request->header->account = 1;
$request->header->account = 2;
$request->setData('id', '1');
$request->setData('type', '-1');
@ -308,7 +308,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
$response = new HttpResponse();
$request = new HttpRequest();
$request->header->account = 1;
$request->header->account = 2;
$request->setData('id', '1');
$request->setData('type', '1');