value) ->toBe('tenant_configuration.exchange_powershell_invocation') ->and(OperationRunType::values())->toContain('tenant_configuration.exchange_powershell_invocation') ->and(OperationCatalog::canonicalCode('tenant_configuration.exchange_powershell_invocation')) ->toBe('tenant_configuration.exchange_powershell_invocation') ->and(OperationCatalog::label('tenant_configuration.exchange_powershell_invocation')) ->toBe('Exchange PowerShell invocation') ->and(app(OperationRunCapabilityResolver::class)->requiredExecutionCapabilityForType('tenant_configuration.exchange_powershell_invocation')) ->toBe(Capabilities::PROVIDER_RUN); expect($providerOperations->get('tenant_configuration.exchange_powershell_invocation')) ->toMatchArray([ 'operation_type' => 'tenant_configuration.exchange_powershell_invocation', 'module' => 'exchange_powershell', 'required_capability' => Capabilities::PROVIDER_RUN, 'provider_capability_keys' => ['exchange_powershell_invoke'], ]) ->and($providerOperations->bindingFor('tenant_configuration.exchange_powershell_invocation', 'microsoft')['binding_status']) ->toBe(ProviderOperationRegistry::BINDING_ACTIVE) ->and($providerCapabilities->get('exchange_powershell_invoke')->operationTypes) ->toBe(['tenant_configuration.exchange_powershell_invocation']) ->and($providerCapabilities->get('exchange_powershell_invoke')->providerRequirementKeys) ->toBe(['provider.exchange_powershell_invocation', 'permissions.admin_consent']); }); it('Spec431 defaults the invocation feature gate off', function (): void { putenv('TENANTPILOT_EXCHANGE_POWERSHELL_INVOCATION_ENABLED'); unset($_ENV['TENANTPILOT_EXCHANGE_POWERSHELL_INVOCATION_ENABLED'], $_SERVER['TENANTPILOT_EXCHANGE_POWERSHELL_INVOCATION_ENABLED']); $config = require config_path('tenantpilot.php'); expect($config['features']['exchange_powershell_invocation'])->toBeFalse() ->and(ExchangePowerShellInvocationGate::FEATURE_CONFIG_PATH) ->toBe('tenantpilot.features.exchange_powershell_invocation'); });