mirror of
https://github.com/Karaka-Management/oms-Accounting.git
synced 2026-02-12 18:58:39 +00:00
bug and media fixes
This commit is contained in:
parent
804e1fa71d
commit
89c2beacf1
|
|
@ -13,5 +13,5 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'0100' => ''
|
'0100' => '',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Accounting\Controller;
|
namespace Modules\Accounting\Controller;
|
||||||
|
|
||||||
|
use phpOMS\Message\Http\RequestStatusCode;
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
use phpOMS\Message\Http\RequestStatusCode;
|
|
||||||
use phpOMS\Model\Message\FormValidation;
|
use phpOMS\Model\Message\FormValidation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -31,7 +31,7 @@ use phpOMS\Model\Message\FormValidation;
|
||||||
*/
|
*/
|
||||||
final class ApiController extends Controller
|
final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Api method to create an account
|
* Api method to create an account
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,9 @@ abstract class AccountAbstract
|
||||||
/**
|
/**
|
||||||
* Get entry.
|
* Get entry.
|
||||||
*
|
*
|
||||||
* @param \DateTime $start Interval start
|
* @param \DateTime $start Interval start
|
||||||
* @param null|\DateTime $end Interval end
|
* @param null|\DateTime $end Interval end
|
||||||
* @param int $dateType Date type by witch the entries should be filtered
|
* @param int $dateType Date type by witch the entries should be filtered
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -111,11 +111,11 @@ class BalanceL11n implements \JsonSerializable, ArrayableInterface
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'description' => $this->description,
|
'description' => $this->description,
|
||||||
'balance' => $this->balance,
|
'balance' => $this->balance,
|
||||||
'language' => $this->language,
|
'language' => $this->language,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,8 @@ class CostCenter
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'code' => $this->code,
|
'code' => $this->code,
|
||||||
'parent' => $this->parent,
|
'parent' => $this->parent,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,11 +111,11 @@ class CostCenterL11n implements \JsonSerializable, ArrayableInterface
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'description' => $this->description,
|
'description' => $this->description,
|
||||||
'costcenter' => $this->costcenter,
|
'costcenter' => $this->costcenter,
|
||||||
'language' => $this->language,
|
'language' => $this->language,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,8 @@ class CostObject
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'code' => $this->code,
|
'code' => $this->code,
|
||||||
'parent' => $this->parent,
|
'parent' => $this->parent,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,11 +111,11 @@ class CostObjectL11n implements \JsonSerializable, ArrayableInterface
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'description' => $this->description,
|
'description' => $this->description,
|
||||||
'costobject' => $this->costobject,
|
'costobject' => $this->costobject,
|
||||||
'language' => $this->language,
|
'language' => $this->language,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class Creditor
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'account' => $this->account,
|
'account' => $this->account,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class Debitor
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'account' => $this->account,
|
'account' => $this->account,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ return ['Accounting' => [
|
||||||
'CostCenter' => 'Kostnadssted',
|
'CostCenter' => 'Kostnadssted',
|
||||||
'CostCenters' => 'Kostnadssteder',
|
'CostCenters' => 'Kostnadssteder',
|
||||||
'CostObject' => 'Kostnadsbærer',
|
'CostObject' => 'Kostnadsbærer',
|
||||||
'CostObjects' => 'Kostnads objekter',
|
'CostObjects' => "Kostnads \u{200b}\u{200b}objekter",
|
||||||
'Created' => 'laget',
|
'Created' => 'laget',
|
||||||
'Creator' => 'skaperen',
|
'Creator' => 'skaperen',
|
||||||
'Credit' => 'Kreditt',
|
'Credit' => 'Kreditt',
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ return ['Accounting' => [
|
||||||
'CostCenter' => 'Kostnadscenter',
|
'CostCenter' => 'Kostnadscenter',
|
||||||
'CostCenters' => 'Kostnadsställen',
|
'CostCenters' => 'Kostnadsställen',
|
||||||
'CostObject' => 'Kostnadsobjekt',
|
'CostObject' => 'Kostnadsobjekt',
|
||||||
'CostObjects' => 'Kostnads Objects',
|
'CostObjects' => "Kostnads \u{200b}\u{200b}Objects",
|
||||||
'Created' => 'Skapad',
|
'Created' => 'Skapad',
|
||||||
'Creator' => 'Skapare',
|
'Creator' => 'Skapare',
|
||||||
'Credit' => 'Kreditera',
|
'Credit' => 'Kreditera',
|
||||||
|
|
|
||||||
|
|
@ -392,4 +392,4 @@ function phpServe() : void
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
phpServe();
|
\phpServe();
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ trait ApiControllerBatchEntryTrait
|
||||||
*/
|
*/
|
||||||
public function testApiBatchEntryCreate() : void
|
public function testApiBatchEntryCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -45,7 +45,7 @@ trait ApiControllerBatchEntryTrait
|
||||||
*/
|
*/
|
||||||
public function testApiBatchEntryCreateInvalid() : void
|
public function testApiBatchEntryCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -61,7 +61,7 @@ trait ApiControllerBatchEntryTrait
|
||||||
*/
|
*/
|
||||||
public function testApiBatchEntryUpdate() : void
|
public function testApiBatchEntryUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -79,7 +79,7 @@ trait ApiControllerBatchEntryTrait
|
||||||
*/
|
*/
|
||||||
public function testApiBatchEntryUpdateInvalid() : void
|
public function testApiBatchEntryUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -95,7 +95,7 @@ trait ApiControllerBatchEntryTrait
|
||||||
*/
|
*/
|
||||||
public function testApiRecurringEntryCreate() : void
|
public function testApiRecurringEntryCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -113,7 +113,7 @@ trait ApiControllerBatchEntryTrait
|
||||||
*/
|
*/
|
||||||
public function testApiRecurringEntryCreateInvalid() : void
|
public function testApiRecurringEntryCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -129,7 +129,7 @@ trait ApiControllerBatchEntryTrait
|
||||||
*/
|
*/
|
||||||
public function testApiRecurringEntryUpdate() : void
|
public function testApiRecurringEntryUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -147,7 +147,7 @@ trait ApiControllerBatchEntryTrait
|
||||||
*/
|
*/
|
||||||
public function testApiRecurringEntryUpdateInvalid() : void
|
public function testApiRecurringEntryUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ trait ApiControllerCostCenterTrait
|
||||||
*/
|
*/
|
||||||
public function testApiCostCenterCreate() : void
|
public function testApiCostCenterCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -45,7 +45,7 @@ trait ApiControllerCostCenterTrait
|
||||||
*/
|
*/
|
||||||
public function testApiCostCenterCreateInvalid() : void
|
public function testApiCostCenterCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -61,7 +61,7 @@ trait ApiControllerCostCenterTrait
|
||||||
*/
|
*/
|
||||||
public function testApiCostCenterUpdate() : void
|
public function testApiCostCenterUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -79,7 +79,7 @@ trait ApiControllerCostCenterTrait
|
||||||
*/
|
*/
|
||||||
public function testApiCostCenterUpdateInvalid() : void
|
public function testApiCostCenterUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ trait ApiControllerCostObjectTrait
|
||||||
*/
|
*/
|
||||||
public function testApiCostObjectCreate() : void
|
public function testApiCostObjectCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -45,7 +45,7 @@ trait ApiControllerCostObjectTrait
|
||||||
*/
|
*/
|
||||||
public function testApiCostObjectCreateInvalid() : void
|
public function testApiCostObjectCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -61,7 +61,7 @@ trait ApiControllerCostObjectTrait
|
||||||
*/
|
*/
|
||||||
public function testApiCostObjectUpdate() : void
|
public function testApiCostObjectUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -79,7 +79,7 @@ trait ApiControllerCostObjectTrait
|
||||||
*/
|
*/
|
||||||
public function testApiCostObjectUpdateInvalid() : void
|
public function testApiCostObjectUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ trait ApiControllerTaxKeyTrait
|
||||||
*/
|
*/
|
||||||
public function testApiTaxKeyCreate() : void
|
public function testApiTaxKeyCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -45,7 +45,7 @@ trait ApiControllerTaxKeyTrait
|
||||||
*/
|
*/
|
||||||
public function testApiTaxKeyCreateInvalid() : void
|
public function testApiTaxKeyCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -61,7 +61,7 @@ trait ApiControllerTaxKeyTrait
|
||||||
*/
|
*/
|
||||||
public function testApiTaxKeyUpdate() : void
|
public function testApiTaxKeyUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
@ -79,7 +79,7 @@ trait ApiControllerTaxKeyTrait
|
||||||
*/
|
*/
|
||||||
public function testApiTaxKeyUpdateInvalid() : void
|
public function testApiTaxKeyUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,13 @@ declare(strict_types=1);
|
||||||
namespace Modules\Accounting\tests\Controller;
|
namespace Modules\Accounting\tests\Controller;
|
||||||
|
|
||||||
use Model\CoreSettings;
|
use Model\CoreSettings;
|
||||||
use Modules\Admin\Models\AccountPermission;
|
|
||||||
use Modules\Accounting\tests\Controller\Api\ApiControllerAccountTrait;
|
use Modules\Accounting\tests\Controller\Api\ApiControllerAccountTrait;
|
||||||
|
use Modules\Accounting\tests\Controller\Api\ApiControllerBatchEntryTrait;
|
||||||
use Modules\Accounting\tests\Controller\Api\ApiControllerCostCenterTrait;
|
use Modules\Accounting\tests\Controller\Api\ApiControllerCostCenterTrait;
|
||||||
use Modules\Accounting\tests\Controller\Api\ApiControllerCostObjectTrait;
|
use Modules\Accounting\tests\Controller\Api\ApiControllerCostObjectTrait;
|
||||||
use Modules\Accounting\tests\Controller\Api\ApiControllerTaxKeyTrait;
|
|
||||||
use Modules\Accounting\tests\Controller\Api\ApiControllerEntryTrait;
|
use Modules\Accounting\tests\Controller\Api\ApiControllerEntryTrait;
|
||||||
use Modules\Accounting\tests\Controller\Api\ApiControllerBatchEntryTrait;
|
use Modules\Accounting\tests\Controller\Api\ApiControllerTaxKeyTrait;
|
||||||
|
use Modules\Admin\Models\AccountPermission;
|
||||||
use phpOMS\Account\Account;
|
use phpOMS\Account\Account;
|
||||||
use phpOMS\Account\AccountManager;
|
use phpOMS\Account\AccountManager;
|
||||||
use phpOMS\Account\PermissionType;
|
use phpOMS\Account\PermissionType;
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ final class AccountAbstractTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->class->getId());
|
self::assertEquals(0, $this->class->getId());
|
||||||
self::assertEquals(null, $this->class->summaryAccount);
|
self::assertNull($this->class->summaryAccount);
|
||||||
self::assertEquals(null, $this->class->getEntryById(0));
|
self::assertNull($this->class->getEntryById(0));
|
||||||
self::assertEquals([], $this->class->getEntriesByDate(new \DateTime()));
|
self::assertEquals([], $this->class->getEntriesByDate(new \DateTime()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,18 +81,18 @@ final class BalanceL11nTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->l11n->name = 'Title';
|
$this->l11n->name = 'Title';
|
||||||
$this->l11n->description = 'Description';
|
$this->l11n->description = 'Description';
|
||||||
$this->l11n->balance = 2;
|
$this->l11n->balance = 2;
|
||||||
$this->l11n->setLanguage(ISO639x1Enum::_DE);
|
$this->l11n->setLanguage(ISO639x1Enum::_DE);
|
||||||
|
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
[
|
[
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'name' => 'Title',
|
'name' => 'Title',
|
||||||
'description' => 'Description',
|
'description' => 'Description',
|
||||||
'balance' => 2,
|
'balance' => 2,
|
||||||
'language' => ISO639x1Enum::_DE,
|
'language' => ISO639x1Enum::_DE,
|
||||||
],
|
],
|
||||||
$this->l11n->jsonSerialize()
|
$this->l11n->jsonSerialize()
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ final class BatchPostingTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals(0, $this->batch->creator);
|
self::assertEquals(0, $this->batch->creator);
|
||||||
self::assertEquals('', $this->batch->description);
|
self::assertEquals('', $this->batch->description);
|
||||||
self::assertEquals(0, $this->batch->count());
|
self::assertEquals(0, $this->batch->count());
|
||||||
self::assertEquals(null, $this->batch->getPosting(1));
|
self::assertNull($this->batch->getPosting(1));
|
||||||
self::assertInstanceOf('\DateTimeImmutable', $this->batch->created);
|
self::assertInstanceOf('\DateTimeImmutable', $this->batch->created);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,18 +81,18 @@ final class CostCenterL11nTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->l11n->name = 'Title';
|
$this->l11n->name = 'Title';
|
||||||
$this->l11n->description = 'Description';
|
$this->l11n->description = 'Description';
|
||||||
$this->l11n->costcenter = 2;
|
$this->l11n->costcenter = 2;
|
||||||
$this->l11n->setLanguage(ISO639x1Enum::_DE);
|
$this->l11n->setLanguage(ISO639x1Enum::_DE);
|
||||||
|
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
[
|
[
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'name' => 'Title',
|
'name' => 'Title',
|
||||||
'description' => 'Description',
|
'description' => 'Description',
|
||||||
'costcenter' => 2,
|
'costcenter' => 2,
|
||||||
'language' => ISO639x1Enum::_DE,
|
'language' => ISO639x1Enum::_DE,
|
||||||
],
|
],
|
||||||
$this->l11n->jsonSerialize()
|
$this->l11n->jsonSerialize()
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@ final class CostCenterTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
[
|
[
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'code' => '123',
|
'code' => '123',
|
||||||
'parent' => null,
|
'parent' => null,
|
||||||
],
|
],
|
||||||
$this->cc->jsonSerialize()
|
$this->cc->jsonSerialize()
|
||||||
|
|
|
||||||
|
|
@ -81,18 +81,18 @@ final class CostObjectL11nTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->l11n->name = 'Title';
|
$this->l11n->name = 'Title';
|
||||||
$this->l11n->description = 'Description';
|
$this->l11n->description = 'Description';
|
||||||
$this->l11n->costobject = 2;
|
$this->l11n->costobject = 2;
|
||||||
$this->l11n->setLanguage(ISO639x1Enum::_DE);
|
$this->l11n->setLanguage(ISO639x1Enum::_DE);
|
||||||
|
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
[
|
[
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'name' => 'Title',
|
'name' => 'Title',
|
||||||
'description' => 'Description',
|
'description' => 'Description',
|
||||||
'costobject' => 2,
|
'costobject' => 2,
|
||||||
'language' => ISO639x1Enum::_DE,
|
'language' => ISO639x1Enum::_DE,
|
||||||
],
|
],
|
||||||
$this->l11n->jsonSerialize()
|
$this->l11n->jsonSerialize()
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@ final class CostObjectTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
[
|
[
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'code' => '123',
|
'code' => '123',
|
||||||
'parent' => null,
|
'parent' => null,
|
||||||
],
|
],
|
||||||
$this->co->jsonSerialize()
|
$this->co->jsonSerialize()
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ final class CreditorTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
[
|
[
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'account' => null,
|
'account' => null,
|
||||||
],
|
],
|
||||||
$this->creditor->jsonSerialize()
|
$this->creditor->jsonSerialize()
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ final class DebitorTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
[
|
[
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'account' => null,
|
'account' => null,
|
||||||
],
|
],
|
||||||
$this->debitor->jsonSerialize()
|
$this->debitor->jsonSerialize()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user