mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-01-11 15:18:42 +00:00
upgrade phpunit
This commit is contained in:
parent
5917c262f0
commit
7520fdfde7
|
|
@ -101,8 +101,8 @@ trait ApiBillControllerTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Billing\Controller\ApiController
|
* @covers \Modules\Billing\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testBillCreateInvalidData() : void
|
public function testBillCreateInvalidData() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -117,8 +117,8 @@ trait ApiBillControllerTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Billing\Controller\ApiController
|
* @covers \Modules\Billing\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testBillElementCreateInvalidData() : void
|
public function testBillElementCreateInvalidData() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,9 @@ use phpOMS\Router\WebRouter;
|
||||||
use phpOMS\Utils\TestUtils;
|
use phpOMS\Utils\TestUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @testdox Modules\tests\Billing\Controller\ApiControllerTest: Billing api controller
|
|
||||||
*
|
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\TestDox('Modules\tests\Billing\Controller\ApiControllerTest: Billing api controller')]
|
||||||
final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
protected ApplicationAbstract $app;
|
protected ApplicationAbstract $app;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ use phpOMS\Stdlib\Base\FloatInt;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\BillElement::class)]
|
||||||
final class BillElementTest extends \PHPUnit\Framework\TestCase
|
final class BillElementTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private BillElement $element;
|
private BillElement $element;
|
||||||
|
|
@ -34,10 +35,7 @@ final class BillElementTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->element = new BillElement();
|
$this->element = new BillElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\BillElement
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->element->id);
|
self::assertEquals(0, $this->element->id);
|
||||||
|
|
@ -47,20 +45,14 @@ final class BillElementTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertInstanceOf('\phpOMS\Stdlib\Base\FloatInt', $this->element->totalPurchasePriceNet);
|
self::assertInstanceOf('\phpOMS\Stdlib\Base\FloatInt', $this->element->totalPurchasePriceNet);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\BillElement
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testItemInputOutput() : void
|
public function testItemInputOutput() : void
|
||||||
{
|
{
|
||||||
$this->element->setItem(123);
|
$this->element->setItem(123);
|
||||||
self::assertEquals(123, $this->element->item->id);
|
self::assertEquals(123, $this->element->item->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\BillElement
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->element->order = 2;
|
$this->element->order = 2;
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ use Modules\Billing\Models\NullBillType;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\Bill::class)]
|
||||||
final class BillTest extends \PHPUnit\Framework\TestCase
|
final class BillTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private Bill $bill;
|
private Bill $bill;
|
||||||
|
|
@ -32,10 +33,7 @@ final class BillTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->bill = new Bill();
|
$this->bill = new Bill();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\Bill
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->bill->id);
|
self::assertEquals(0, $this->bill->id);
|
||||||
|
|
@ -76,20 +74,14 @@ final class BillTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals('', $this->bill->shippingText);
|
self::assertEquals('', $this->bill->shippingText);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\Bill
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNumberRendering() : void
|
public function testNumberRendering() : void
|
||||||
{
|
{
|
||||||
$this->bill->type->numberFormat = '{y}{m}{d}-{id}';
|
$this->bill->type->numberFormat = '{y}{m}{d}-{id}';
|
||||||
self::assertEquals(\date('Y') . \date('m') . \date('d') . '-0', $this->bill->getNumber());
|
self::assertEquals(\date('Y') . \date('m') . \date('d') . '-0', $this->bill->getNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\Bill
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->bill->number = '123456';
|
$this->bill->number = '123456';
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ use phpOMS\Localization\BaseStringL11n;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\BillType::class)]
|
||||||
final class BillTypeTest extends \PHPUnit\Framework\TestCase
|
final class BillTypeTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private BillType $type;
|
private BillType $type;
|
||||||
|
|
@ -32,20 +33,14 @@ final class BillTypeTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->type = new BillType();
|
$this->type = new BillType();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\BillType
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->type->id);
|
self::assertEquals(0, $this->type->id);
|
||||||
self::assertTrue($this->type->transferStock);
|
self::assertTrue($this->type->transferStock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\BillType
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testL11nInputOutput() : void
|
public function testL11nInputOutput() : void
|
||||||
{
|
{
|
||||||
$this->type->setL11n('Test1');
|
$this->type->setL11n('Test1');
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,8 @@ require_once __DIR__ . '/../Autoloader.php';
|
||||||
*/
|
*/
|
||||||
final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testNetSales($json, $content) : void
|
public function testNetSales($json, $content) : void
|
||||||
{
|
{
|
||||||
$billObj = new Bill();
|
$billObj = new Bill();
|
||||||
|
|
@ -40,10 +38,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals($test['netSales'], $billObj->netSales->value);
|
self::assertEquals($test['netSales'], $billObj->netSales->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testTaxRate($json, $content) : void
|
public function testTaxRate($json, $content) : void
|
||||||
{
|
{
|
||||||
$billObj = new Bill();
|
$billObj = new Bill();
|
||||||
|
|
@ -54,10 +50,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals($test['tax_rate'], \reset($billObj->elements)->taxR->value);
|
self::assertEquals($test['tax_rate'], \reset($billObj->elements)->taxR->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testGrossSales($json, $content) : void
|
public function testGrossSales($json, $content) : void
|
||||||
{
|
{
|
||||||
$billObj = new Bill();
|
$billObj = new Bill();
|
||||||
|
|
@ -68,10 +62,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals($test['grossSales'], $billObj->grossSales->value);
|
self::assertEquals($test['grossSales'], $billObj->grossSales->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testTaxAmount($json, $content) : void
|
public function testTaxAmount($json, $content) : void
|
||||||
{
|
{
|
||||||
$billObj = new Bill();
|
$billObj = new Bill();
|
||||||
|
|
@ -82,10 +74,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals($test['tax_amount'], $billObj->taxP->value);
|
self::assertEquals($test['tax_amount'], $billObj->taxP->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testBillDate($json, $content) : void
|
public function testBillDate($json, $content) : void
|
||||||
{
|
{
|
||||||
$billObj = new Bill();
|
$billObj = new Bill();
|
||||||
|
|
@ -96,10 +86,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals($test['bill_date'], $billObj->billDate?->format('Y-m-d'));
|
self::assertEquals($test['bill_date'], $billObj->billDate?->format('Y-m-d'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testBillLanguage($json, $content) : void
|
public function testBillLanguage($json, $content) : void
|
||||||
{
|
{
|
||||||
$billObj = new Bill();
|
$billObj = new Bill();
|
||||||
|
|
@ -110,10 +98,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals($test['language'], $billObj->language);
|
self::assertEquals($test['language'], $billObj->language);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testBillCurrency($json, $content) : void
|
public function testBillCurrency($json, $content) : void
|
||||||
{
|
{
|
||||||
$billObj = new Bill();
|
$billObj = new Bill();
|
||||||
|
|
@ -124,10 +110,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals($test['currency'], $billObj->currency);
|
self::assertEquals($test['currency'], $billObj->currency);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testIban($json, $content) : void
|
public function testIban($json, $content) : void
|
||||||
{
|
{
|
||||||
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
||||||
|
|
@ -154,10 +138,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testVATId($json, $content) : void
|
public function testVATId($json, $content) : void
|
||||||
{
|
{
|
||||||
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
||||||
|
|
@ -184,10 +166,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testTaxId($json, $content) : void
|
public function testTaxId($json, $content) : void
|
||||||
{
|
{
|
||||||
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
||||||
|
|
@ -214,10 +194,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testWebsite($json, $content) : void
|
public function testWebsite($json, $content) : void
|
||||||
{
|
{
|
||||||
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
||||||
|
|
@ -244,10 +222,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testEmail($json, $content) : void
|
public function testEmail($json, $content) : void
|
||||||
{
|
{
|
||||||
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
||||||
|
|
@ -274,10 +250,8 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\DataProvider('billList')]
|
||||||
* @dataProvider billList
|
#[\PHPUnit\Framework\Attributes\Group('maybe')]
|
||||||
* @group maybe
|
|
||||||
*/
|
|
||||||
public function testPhone($json, $content) : void
|
public function testPhone($json, $content) : void
|
||||||
{
|
{
|
||||||
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
$identifierContent = \file_get_contents(__DIR__ . '/../../Models/bill_identifier.json');
|
||||||
|
|
@ -306,7 +280,7 @@ final class InvoiceRecognitionTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
public static array $billList = [];
|
public static array $billList = [];
|
||||||
|
|
||||||
public function billList()
|
public static function billList()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
if (\str_ends_with(__DIR__ . '/bills/12.png', 'pdf')) {
|
if (\str_ends_with(__DIR__ . '/bills/12.png', 'pdf')) {
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\Billing\Models\NullBillElement;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\NullBillElement::class)]
|
||||||
final class NullBillElementTest extends \PHPUnit\Framework\TestCase
|
final class NullBillElementTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullBillElement
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\Billing\Models\BillElement', new NullBillElement());
|
self::assertInstanceOf('\Modules\Billing\Models\BillElement', new NullBillElement());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullBillElement
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullBillElement(2);
|
$null = new NullBillElement(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullBillElement
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullBillElement(2);
|
$null = new NullBillElement(2);
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\Billing\Models\NullBill;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\NullBill::class)]
|
||||||
final class NullBillTest extends \PHPUnit\Framework\TestCase
|
final class NullBillTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullBill
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\Billing\Models\Bill', new NullBill());
|
self::assertInstanceOf('\Modules\Billing\Models\Bill', new NullBill());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullBill
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullBill(2);
|
$null = new NullBill(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullBill
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullBill(2);
|
$null = new NullBill(2);
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\Billing\Models\NullBillType;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\NullBillType::class)]
|
||||||
final class NullBillTypeTest extends \PHPUnit\Framework\TestCase
|
final class NullBillTypeTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullBillType
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\Billing\Models\BillType', new NullBillType());
|
self::assertInstanceOf('\Modules\Billing\Models\BillType', new NullBillType());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullBillType
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullBillType(2);
|
$null = new NullBillType(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullBillType
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullBillType(2);
|
$null = new NullBillType(2);
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\Billing\Models\NullSubscription;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\NullSubscription::class)]
|
||||||
final class NullSubscriptionTest extends \PHPUnit\Framework\TestCase
|
final class NullSubscriptionTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullSubscription
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\Billing\Models\Subscription', new NullSubscription());
|
self::assertInstanceOf('\Modules\Billing\Models\Subscription', new NullSubscription());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullSubscription
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullSubscription(2);
|
$null = new NullSubscription(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\NullSubscription
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullSubscription(2);
|
$null = new NullSubscription(2);
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\Billing\Models\Price\NullPrice;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\Price\NullPrice::class)]
|
||||||
final class NullPriceTest extends \PHPUnit\Framework\TestCase
|
final class NullPriceTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\Price\NullPrice
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\Billing\Models\Price\Price', new NullPrice());
|
self::assertInstanceOf('\Modules\Billing\Models\Price\Price', new NullPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\Price\NullPrice
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullPrice(2);
|
$null = new NullPrice(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\Price\NullPrice
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullPrice(2);
|
$null = new NullPrice(2);
|
||||||
|
|
|
||||||
|
|
@ -17,124 +17,85 @@ namespace Modules\Billing\tests\Models;
|
||||||
use Modules\Billing\Models\PurchaseBillMapper;
|
use Modules\Billing\Models\PurchaseBillMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @testdox Modules\Billing\tests\Models\PurchaseBillMapperTest: App database mapper
|
|
||||||
*
|
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\PurchaseBillMapper::class)]
|
||||||
|
#[\PHPUnit\Framework\Attributes\TestDox('Modules\Billing\tests\Models\PurchaseBillMapperTest: App database mapper')]
|
||||||
final class PurchaseBillMapperTest extends \PHPUnit\Framework\TestCase
|
final class PurchaseBillMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetPurchaseBeforePivotInvalid() : void
|
public function testGetPurchaseBeforePivotInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], PurchaseBillMapper::getPurchaseBeforePivot(-1));
|
self::assertEquals([], PurchaseBillMapper::getPurchaseBeforePivot(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetPurchaseAfterPivotInvalid() : void
|
public function testGetPurchaseAfterPivotInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], PurchaseBillMapper::getPurchaseAfterPivot(99999));
|
self::assertEquals([], PurchaseBillMapper::getPurchaseAfterPivot(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetPurchaseByItemIdInvalid() : void
|
public function testGetPurchaseByItemIdInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, PurchaseBillMapper::getPurchaseByItemId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
self::assertEquals(0, PurchaseBillMapper::getPurchaseByItemId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetPurchaseBySupplierIdInvalid() : void
|
public function testGetPurchaseBySupplierIdInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, PurchaseBillMapper::getPurchaseBySupplierId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
self::assertEquals(0, PurchaseBillMapper::getPurchaseBySupplierId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetAvgPurchasePriceByItemIdInvalid() : void
|
public function testGetAvgPurchasePriceByItemIdInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, PurchaseBillMapper::getAvgPurchasePriceByItemId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
self::assertEquals(0, PurchaseBillMapper::getAvgPurchasePriceByItemId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetLastOrderDateByItemIdInvalid() : void
|
public function testGetLastOrderDateByItemIdInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertNull(PurchaseBillMapper::getLastOrderDateByItemId(99999));
|
self::assertNull(PurchaseBillMapper::getLastOrderDateByItemId(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetLastOrderDateBySupplierIdInvalid() : void
|
public function testGetLastOrderDateBySupplierIdInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertNull(PurchaseBillMapper::getLastOrderDateBySupplierId(99999));
|
self::assertNull(PurchaseBillMapper::getLastOrderDateBySupplierId(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetNewestItemInvoicesInvalid() : void
|
public function testGetNewestItemInvoicesInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], PurchaseBillMapper::getNewestItemInvoices(99999));
|
self::assertEquals([], PurchaseBillMapper::getNewestItemInvoices(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetNewestSupplierInvoicesInvalid() : void
|
public function testGetNewestSupplierInvoicesInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], PurchaseBillMapper::getNewestSupplierInvoices(99999));
|
self::assertEquals([], PurchaseBillMapper::getNewestSupplierInvoices(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetItemTopSuppliersInvalid() : void
|
public function testGetItemTopSuppliersInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([[], []], PurchaseBillMapper::getItemTopSuppliers(99999, new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([[], []], PurchaseBillMapper::getItemTopSuppliers(99999, new \DateTime('now'), new \DateTime('now')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetItemCountryPurchaseInvalid() : void
|
public function testGetItemCountryPurchaseInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], PurchaseBillMapper::getItemCountryPurchase(99999, new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([], PurchaseBillMapper::getItemCountryPurchase(99999, new \DateTime('now'), new \DateTime('now')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetItemMonthlyPurchaseCostsInvalid() : void
|
public function testGetItemMonthlyPurchaseCostsInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], PurchaseBillMapper::getItemMonthlyPurchaseCosts(99999, new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([], PurchaseBillMapper::getItemMonthlyPurchaseCosts(99999, new \DateTime('now'), new \DateTime('now')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\PurchaseBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetSupplierMonthlyPurchaseCostsInvalid() : void
|
public function testGetSupplierMonthlyPurchaseCostsInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], PurchaseBillMapper::getSupplierMonthlyPurchaseCosts(99999, new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([], PurchaseBillMapper::getSupplierMonthlyPurchaseCosts(99999, new \DateTime('now'), new \DateTime('now')));
|
||||||
|
|
|
||||||
|
|
@ -17,133 +17,91 @@ namespace Modules\Billing\tests\Models;
|
||||||
use Modules\Billing\Models\SalesBillMapper;
|
use Modules\Billing\Models\SalesBillMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @testdox Modules\Billing\tests\Models\SalesBillMapperTest: App database mapper
|
|
||||||
*
|
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\SalesBillMapper::class)]
|
||||||
|
#[\PHPUnit\Framework\Attributes\TestDox('Modules\Billing\tests\Models\SalesBillMapperTest: App database mapper')]
|
||||||
final class SalesBillMapperTest extends \PHPUnit\Framework\TestCase
|
final class SalesBillMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetSalesBeforePivotInvalid() : void
|
public function testGetSalesBeforePivotInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], SalesBillMapper::getSalesBeforePivot(-1));
|
self::assertEquals([], SalesBillMapper::getSalesBeforePivot(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetSalesAfterPivotInvalid() : void
|
public function testGetSalesAfterPivotInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], SalesBillMapper::getSalesAfterPivot(99999));
|
self::assertEquals([], SalesBillMapper::getSalesAfterPivot(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetSalesByItemIdInvalid() : void
|
public function testGetSalesByItemIdInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, SalesBillMapper::getSalesByItemId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
self::assertEquals(0, SalesBillMapper::getSalesByItemId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetSalesByClientIdInvalid() : void
|
public function testGetSalesByClientIdInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, SalesBillMapper::getSalesByClientId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
self::assertEquals(0, SalesBillMapper::getSalesByClientId(99999, new \DateTime('now'), new \DateTime('now'))->getInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetLastOrderDateByItemIdInvalid() : void
|
public function testGetLastOrderDateByItemIdInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertNull(SalesBillMapper::getLastOrderDateByItemId(99999));
|
self::assertNull(SalesBillMapper::getLastOrderDateByItemId(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetLastOrderDateByClientIdInvalid() : void
|
public function testGetLastOrderDateByClientIdInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertNull(SalesBillMapper::getLastOrderDateByClientId(99999));
|
self::assertNull(SalesBillMapper::getLastOrderDateByClientId(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetNewestItemInvoicesInvalid() : void
|
public function testGetNewestItemInvoicesInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], SalesBillMapper::getNewestItemInvoices(99999));
|
self::assertEquals([], SalesBillMapper::getNewestItemInvoices(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetNewestClientInvoicesInvalid() : void
|
public function testGetNewestClientInvoicesInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], SalesBillMapper::getNewestClientInvoices(99999));
|
self::assertEquals([], SalesBillMapper::getNewestClientInvoices(99999));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetItemTopClientsInvalid() : void
|
public function testGetItemTopClientsInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([[], []], SalesBillMapper::getItemTopClients(99999, new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([[], []], SalesBillMapper::getItemTopClients(99999, new \DateTime('now'), new \DateTime('now')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetItemBillsInvalid() : void
|
public function testGetItemBillsInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], SalesBillMapper::getItemBills(99999, new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([], SalesBillMapper::getItemBills(99999, new \DateTime('now'), new \DateTime('now')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetClientItem() : void
|
public function testGetClientItem() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], SalesBillMapper::getClientItem(99999, new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([], SalesBillMapper::getClientItem(99999, new \DateTime('now'), new \DateTime('now')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetItemCountrySalesInvalid() : void
|
public function testGetItemCountrySalesInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], SalesBillMapper::getItemCountrySales(99999, new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([], SalesBillMapper::getItemCountrySales(99999, new \DateTime('now'), new \DateTime('now')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetItemMonthlySalesCostsInvalid() : void
|
public function testGetItemMonthlySalesCostsInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], SalesBillMapper::getItemMonthlySalesCosts([99999], new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([], SalesBillMapper::getItemMonthlySalesCosts([99999], new \DateTime('now'), new \DateTime('now')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\SalesBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetClientMonthlySalesCostsInvalid() : void
|
public function testGetClientMonthlySalesCostsInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], SalesBillMapper::getClientMonthlySalesCosts(99999, new \DateTime('now'), new \DateTime('now')));
|
self::assertEquals([], SalesBillMapper::getClientMonthlySalesCosts(99999, new \DateTime('now'), new \DateTime('now')));
|
||||||
|
|
|
||||||
|
|
@ -17,25 +17,19 @@ namespace Modules\Billing\tests\Models;
|
||||||
use Modules\Billing\Models\StockBillMapper;
|
use Modules\Billing\Models\StockBillMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @testdox Modules\Billing\tests\Models\StockBillMapperTest: App database mapper
|
|
||||||
*
|
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\StockBillMapper::class)]
|
||||||
|
#[\PHPUnit\Framework\Attributes\TestDox('Modules\Billing\tests\Models\StockBillMapperTest: App database mapper')]
|
||||||
final class StockBillMapperTest extends \PHPUnit\Framework\TestCase
|
final class StockBillMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\StockBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetStockBeforePivotInvalid() : void
|
public function testGetStockBeforePivotInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], StockBillMapper::getStockBeforePivot(-1));
|
self::assertEquals([], StockBillMapper::getStockBeforePivot(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\StockBillMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testGetStockAfterPivotInvalid() : void
|
public function testGetStockAfterPivotInvalid() : void
|
||||||
{
|
{
|
||||||
self::assertEquals([], StockBillMapper::getStockAfterPivot(99999));
|
self::assertEquals([], StockBillMapper::getStockAfterPivot(99999));
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\Billing\Models\Tax\NullTaxCombination;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Billing\Models\Tax\NullTaxCombination::class)]
|
||||||
final class NullTaxCombinationTest extends \PHPUnit\Framework\TestCase
|
final class NullTaxCombinationTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\Tax\NullTaxCombination
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\Billing\Models\Tax\TaxCombination', new NullTaxCombination());
|
self::assertInstanceOf('\Modules\Billing\Models\Tax\TaxCombination', new NullTaxCombination());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\Tax\NullTaxCombination
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullTaxCombination(2);
|
$null = new NullTaxCombination(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Billing\Models\Tax\NullTaxCombination
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullTaxCombination(2);
|
$null = new NullTaxCombination(2);
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" columns="120" stopOnError="true" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" columns="120" stopOnError="true" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
|
||||||
<coverage includeUncoveredFiles="true" processUncoveredFiles="false">
|
<coverage includeUncoveredFiles="true">
|
||||||
<include>
|
|
||||||
<directory suffix=".php">../</directory>
|
|
||||||
</include>
|
|
||||||
<exclude>
|
|
||||||
<directory>../vendor*</directory>
|
|
||||||
<directory>../MainRepository*</directory>
|
|
||||||
<directory>../Karaka*</directory>
|
|
||||||
<directory>../Admin/Install/Application*</directory>
|
|
||||||
<directory>../phpOMS*</directory>
|
|
||||||
<directory>../tests*</directory>
|
|
||||||
<directory>../*/tests*</directory>
|
|
||||||
<directory>../**/tests*</directory>
|
|
||||||
<directory>*/tests*</directory>
|
|
||||||
<directory suffix="tpl.php">../*</directory>
|
|
||||||
<directory suffix="lang.php">../*</directory>
|
|
||||||
<directory suffix="Test.php">../*</directory>
|
|
||||||
<directory suffix="Routes.php">../*</directory>
|
|
||||||
<directory suffix="Hooks.php">../*</directory>
|
|
||||||
<directory>../**/test*</directory>
|
|
||||||
<directory>../**/Theme*</directory>
|
|
||||||
<directory>../**/Admin/Routes*</directory>
|
|
||||||
<directory>../**/Admin/Hooks*</directory>
|
|
||||||
<directory>../**/Admin/Install*</directory>
|
|
||||||
<directory>../Media/Files*</directory>
|
|
||||||
</exclude>
|
|
||||||
<report>
|
<report>
|
||||||
<clover outputFile="coverage.xml"/>
|
<clover outputFile="coverage.xml"/>
|
||||||
<html outputDirectory="../tests" lowUpperBound="75" highLowerBound="95"/>
|
<html outputDirectory="../tests" lowUpperBound="75" highLowerBound="95"/>
|
||||||
|
|
@ -56,4 +31,31 @@
|
||||||
<const name="WEB_SERVER_DOCROOT" value="./Karaka"/>
|
<const name="WEB_SERVER_DOCROOT" value="./Karaka"/>
|
||||||
<const name="RESET" value="1"/>
|
<const name="RESET" value="1"/>
|
||||||
</php>
|
</php>
|
||||||
|
<source>
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../</directory>
|
||||||
|
</include>
|
||||||
|
<exclude>
|
||||||
|
<directory>../vendor*</directory>
|
||||||
|
<directory>../MainRepository*</directory>
|
||||||
|
<directory>../Karaka*</directory>
|
||||||
|
<directory>../Admin/Install/Application*</directory>
|
||||||
|
<directory>../phpOMS*</directory>
|
||||||
|
<directory>../tests*</directory>
|
||||||
|
<directory>../*/tests*</directory>
|
||||||
|
<directory>../**/tests*</directory>
|
||||||
|
<directory>*/tests*</directory>
|
||||||
|
<directory suffix="tpl.php">../*</directory>
|
||||||
|
<directory suffix="lang.php">../*</directory>
|
||||||
|
<directory suffix="Test.php">../*</directory>
|
||||||
|
<directory suffix="Routes.php">../*</directory>
|
||||||
|
<directory suffix="Hooks.php">../*</directory>
|
||||||
|
<directory>../**/test*</directory>
|
||||||
|
<directory>../**/Theme*</directory>
|
||||||
|
<directory>../**/Admin/Routes*</directory>
|
||||||
|
<directory>../**/Admin/Hooks*</directory>
|
||||||
|
<directory>../**/Admin/Install*</directory>
|
||||||
|
<directory>../Media/Files*</directory>
|
||||||
|
</exclude>
|
||||||
|
</source>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user