mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-01-11 15:18:42 +00:00
58 lines
1.2 KiB
PHP
Executable File
58 lines
1.2 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Karaka
|
|
*
|
|
* PHP Version 8.1
|
|
*
|
|
* @package tests
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link https://karaka.app
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Billing\tests\Models;
|
|
|
|
use Modules\Billing\Models\BillType;
|
|
use Modules\Billing\Models\BillTypeL11n;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
final class BillTypeTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
private BillType $type;
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function setUp() : void
|
|
{
|
|
$this->type = new BillType();
|
|
}
|
|
|
|
/**
|
|
* @covers Modules\Billing\Models\BillType
|
|
* @group module
|
|
*/
|
|
public function testDefault() : void
|
|
{
|
|
self::assertEquals(0, $this->type->getId());
|
|
self::assertTrue($this->type->transferStock);
|
|
}
|
|
|
|
/**
|
|
* @covers Modules\Billing\Models\BillType
|
|
* @group module
|
|
*/
|
|
public function testL11nInputOutput() : void
|
|
{
|
|
$this->type->setL11n('Test1');
|
|
self::assertEquals('Test1', $this->type->getL11n());
|
|
|
|
$this->type->setL11n(new BillTypeL11n(0, 'Test2'));
|
|
self::assertEquals('Test2', $this->type->getL11n());
|
|
}
|
|
}
|