Changeset View
Changeset View
Standalone View
Standalone View
src/tests/TestCaseTrait.php
Show All 29 Lines | protected function assertUserEntitlements($user, $expected) | ||||
Assert::assertSame($expected, $skus); | Assert::assertSame($expected, $skus); | ||||
} | } | ||||
/** | /** | ||||
* Removes all beta entitlements from the database | * Removes all beta entitlements from the database | ||||
*/ | */ | ||||
protected function clearBetaEntitlements(): void | protected function clearBetaEntitlements(): void | ||||
{ | { | ||||
$betas = \App\Sku::where('handler_class', 'like', 'App\\Handlers\\Beta\\%') | $beta_handlers = [ | ||||
->orWhere('handler_class', 'App\Handlers\Beta') | 'App\Handlers\Beta', | ||||
->pluck('id')->all(); | 'App\Handlers\Distlist', | ||||
]; | |||||
$betas = \App\Sku::whereIn('handler_class', $beta_handlers)->pluck('id')->all(); | |||||
\App\Entitlement::whereIn('sku_id', $betas)->delete(); | \App\Entitlement::whereIn('sku_id', $betas)->delete(); | ||||
} | } | ||||
/** | /** | ||||
* Creates the application. | * Creates the application. | ||||
* | * | ||||
* @return \Illuminate\Foundation\Application | * @return \Illuminate\Foundation\Application | ||||
▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines |