Make packages and SKUs name+description localizable
Add package and sku controllers
User entitlements UI and API
TODO: browser tests and more feature tests
Differential D1012
User entitlements management machniak on Mar 12 2020, 3:45 PM. Authored by Tags None Referenced Files
Subscribers None
Details
Make packages and SKUs name+description localizable TODO: browser tests and more feature tests
Diff Detail
Event TimelineComment Actions The following test seems to fail; $ vendor/bin/phpunit tests/Feature/Controller/DomainsTest.php PHPUnit 7.5.20 by Sebastian Bergmann and contributors. Error: No code coverage driver is available F.F 3 / 3 (100%) Time: 354 ms, Memory: 28.00 MB There were 2 failures: 1) Tests\Feature\Controller\DomainsTest::testConfirm Expected status code 200 but received 500. Failed asserting that false is true. /home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:151 /home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Feature/Controller/DomainsTest.php:58 2) Tests\Feature\Controller\DomainsTest::testShow Expected status code 200 but received 500. Failed asserting that false is true. /home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:151 /home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Feature/Controller/DomainsTest.php:141 FAILURES! Tests: 3, Assertions: 10, Failures: 2. Because; [2020-03-13 09:14:29] testing.DEBUG: [SQL] select * from `skus` where `skus`.`id` = ? limit 1 [2a1bb8ed-cda5-46d4-8142-c4d546b075b2] [2020-03-13 09:14:29] testing.ERROR: Sku not active [2020-03-13 09:14:29] testing.DEBUG: [SQL] select * from `domains` where `domains`.`id` = ? and `domains`.`deleted_at` is null limit 1 [1069549980] [2020-03-13 09:14:29] testing.DEBUG: [SQL] select * from `entitlements` where `entitlements`.`entitleable_id` = ? and `entitlements`.`entitleable_id` is not null and `entitlements`.`entitleable_type` = ? and `entitlements`.`deleted_at` is null limit 1 [1069549980, App\Domain] [2020-03-13 09:14:29] testing.ERROR: Trying to get property 'wallet' of non-object {"userId":1317732949,"exception":"[object] (ErrorException(code: 0): Trying to get property 'wallet' of non-object at /home/vanmeeuwen/devel/src/apheleia/kolab.git/src/app/Domain.php:348) [stacktrace] #0 /home/vanmeeuwen/devel/src/apheleia/kolab.git/src/app/Domain.php(348): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Trying to get p...', '/home/vanmeeuwe...', 348, Array) #1 /home/vanmeeuwen/devel/src/apheleia/kolab.git/src/app/User.php(252): App\\Domain->wallet() #2 /home/vanmeeuwen/devel/src/apheleia/kolab.git/src/app/Http/Controllers/API/DomainsController.php(115): App\\User->canRead(Object(App\\Domain)) #3 [internal function]: App\\Http\\Controllers\\API\\DomainsController->show('1069549980') It seems that an unchanged file src/tests/Feature/Controller/DomainTest.php is using the domain SKU and not the domain-hosting SKU. |