mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-03 13:49:56 +09:00
Migrate product models and enhance promo redemption functionality (#3587)
* Migrate product models; add `promo_redemption`
* Add DomainPricing & ProductOrder repositories
* Use Promo entity typehints and update tests
* Use DI logger, validate order config, update tests
* Replace `error_log` with logger; use stubs in tests
* Use attachOrderConfig and tighten service checks
* Clarify domain defaults and remove deprecated doc tag
* Add missing indexes to `promo_redemption` table
* Enrich promo API arrays and add redemption filters
* Various UI/JS fixes and template cleanups
* Log invoice issues as warnings; expose form_id
* Normalize spelling in UpdatePatcher comment
* Remove checkLimits production method and clean up stale test mocks
* Use getConfig() and add promo permission
* Use container logger directly, remove helpers
* Use defaults for optional Twig settings
* Import macro_functions into admin template
* Compensate promo redemptions on checkout failure
* 🐛 Fix product category and add-on availability handling
This commit is contained in:
1 parent
0d6c34137c
commit
febec281a6
85 files changed
+10319
-6431
No files matched your search
@@ -1166,13 +1166,7 @@ test('canned create', function (): void {
|
||||
->atLeast()->once()
|
||||
->andReturn($randId);
|
||||
|
||||
$systemServiceMock = Mockery::mock(Box\Mod\System\Service::class);
|
||||
$systemServiceMock->shouldReceive('checkLimits')
|
||||
->byDefault()
|
||||
->andReturn(null);
|
||||
|
||||
$di = container();
|
||||
$di['mod_service'] = $di->protect(fn () => $systemServiceMock);
|
||||
$di['db'] = $dbMock;
|
||||
$di['logger'] = new Tests\Helpers\TestLogger();
|
||||
$service->setDi($di);
|
||||
@@ -1847,16 +1841,10 @@ test('kb create category', function (): void {
|
||||
->atLeast()->once()
|
||||
->andReturn('article-slug');
|
||||
|
||||
$systemServiceMock = Mockery::mock(Box\Mod\System\Service::class);
|
||||
$systemServiceMock->shouldReceive('checkLimits')
|
||||
->byDefault()
|
||||
->andReturn(true);
|
||||
|
||||
$di = container();
|
||||
$di['db'] = $dbMock;
|
||||
$di['tools'] = $toolsMock;
|
||||
$di['logger'] = new Tests\Helpers\TestLogger();
|
||||
$di['mod_service'] = $di->protect(fn () => $systemServiceMock);
|
||||
$service->setDi($di);
|
||||
|
||||
$result = $service->kbCreateCategory('Title', 'Description');
|
||||
|
||||
Reference in new issue
Block a user