TenantAtlas/tests/Unit/ODataTypeValidationTest.php
ahmido 78467a76ac feat/011-restore-run-wizard (#37)
fix restore graph problem

Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local>
Reviewed-on: #37
2026-01-07 01:40:04 +00:00

39 lines
1.5 KiB
PHP

<?php
use App\Models\BackupItem;
it('accepts derived deviceConfiguration odata types', function (string $odataType) {
$result = BackupItem::validateODataType(['@odata.type' => $odataType], 'deviceConfiguration', 'all');
expect($result['matches'])->toBeTrue();
})->with([
'#microsoft.graph.windows10GeneralConfiguration',
'#microsoft.graph.windowsHealthMonitoringConfiguration',
]);
it('accepts derived deviceCompliancePolicy odata types', function (string $odataType) {
$result = BackupItem::validateODataType(['@odata.type' => $odataType], 'deviceCompliancePolicy', 'all');
expect($result['matches'])->toBeTrue();
})->with([
'#microsoft.graph.androidDeviceOwnerCompliancePolicy',
'#microsoft.graph.androidWorkProfileCompliancePolicy',
]);
it('accepts derived appProtectionPolicy odata types', function (string $odataType) {
$result = BackupItem::validateODataType(['@odata.type' => $odataType], 'appProtectionPolicy', 'mobile');
expect($result['matches'])->toBeTrue();
})->with([
'#microsoft.graph.windowsManagedAppProtection',
]);
it('accepts derived enrollmentRestriction odata types', function (string $odataType) {
$result = BackupItem::validateODataType(['@odata.type' => $odataType], 'enrollmentRestriction', 'all');
expect($result['matches'])->toBeTrue();
})->with([
'#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration',
'#microsoft.graph.windowsRestoreDeviceEnrollmentConfiguration',
]);