What Changed Removed per-file uses(TestCase::class ...) bindings in Unit tests to avoid Pest v4 “folder already uses the test case” discovery failure (kept RefreshDatabase where needed). Updated the backup scheduling job test to pass the newly required BulkOperationService when manually calling RunBackupScheduleJob::handle(). Where Unit (bulk cleanup across 56 files) RunBackupScheduleJobTest.php Verification ./vendor/bin/sail test → 443 passed, 5 skipped Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local> Reviewed-on: #45
20 lines
625 B
PHP
20 lines
625 B
PHP
<?php
|
|
|
|
use App\Services\Intune\DefaultPolicyNormalizer;
|
|
|
|
it('flattens normalized settings with section prefixes for diffs', function () {
|
|
$normalizer = app(DefaultPolicyNormalizer::class);
|
|
|
|
$snapshot = [
|
|
'@odata.type' => '#microsoft.graph.somePolicy',
|
|
'displayName' => 'Example Policy',
|
|
'customSetting' => true,
|
|
];
|
|
|
|
$flat = $normalizer->flattenForDiff($snapshot, 'somePolicyType', 'all');
|
|
|
|
expect($flat)->toHaveKey('General > Display Name', 'Example Policy');
|
|
expect($flat)->toHaveKey('General > Custom Setting');
|
|
expect($flat['General > Custom Setting'])->toBeTrue();
|
|
});
|