mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Moved ServerPatchCheckNotificationTest from Unit to Feature tests and replaced
Mockery alias mocking with real database records to prevent global state pollution.
The original implementation used Mockery::mock('alias:InstanceSettings::class)
which creates a global class alias that persists across all tests, causing
other tests to fail when they try to use the real InstanceSettings model.
Changes:
- Moved test from tests/Unit/ to tests/Feature/ (requires database access)
- Replaced Mockery alias mocking with RefreshDatabase and real InstanceSettings records
- Tests now create actual InstanceSettings records in the test database
- Preserved Server mocking with Mockery for non-database dependencies
All 4 tests pass individually and when run via php artisan test without
polluting global state or affecting other tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| CloudInitScriptTest.php | ||
| ConvertArraysTest.php | ||
| ConvertContainerEnvsToArray.php | ||
| ConvertingGitUrlsTest.php | ||
| DatabaseBackupCreationApiTest.php | ||
| DatabaseBackupJobTest.php | ||
| DeletesUserSessionsTest.php | ||
| DeploymentCancellationApiTest.php | ||
| DockerCustomCommandsTest.php | ||
| ExecuteContainerCommandTest.php | ||
| GithubAppsListApiTest.php | ||
| GithubSourceChangeTest.php | ||
| GithubSourceCreateTest.php | ||
| HetznerServerCreationTest.php | ||
| InstanceSettingsHelperVersionTest.php | ||
| IpAllowlistTest.php | ||
| MultilineEnvironmentVariableTest.php | ||
| ServerPatchCheckNotificationTest.php | ||
| ServerSettingSentinelRestartTest.php | ||
| ServerSettingWasChangedTest.php | ||
| TeamInvitationEmailNormalizationTest.php | ||
| TeamInvitationPrivilegeEscalationTest.php | ||
| TeamPolicyTest.php | ||
| TrustHostsMiddlewareTest.php | ||
| Utf8HandlingTest.php | ||