mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-14 08:42:38 -04:00
Remove tests that copy app logic into the test, grep PHP source as text, only check literals, constants, class_exists or PHP built-ins, duplicate other tests, or are always skipped. Keep source checks that guard security and authorization rules. Rename a duplicate Pest helper so the full suite loads, drop the missing v5/Browser path, and remove the CLAUDE.md symlink in favor of AGENTS.md. Correct AGENTS.md: Dusk is not installed and the upgrade script is scripts/upgrade.sh.
20 lines
1.0 KiB
PHP
20 lines
1.0 KiB
PHP
<?php
|
|
|
|
it('refreshes backup executions from backup broadcasts on the current team channel', function () {
|
|
$serviceExecutions = file_get_contents(app_path('Livewire/Project/Service/BackupExecutions.php'));
|
|
$serviceBackups = file_get_contents(app_path('Livewire/Project/Service/VolumeBackup/Index.php'));
|
|
$databaseExecutions = file_get_contents(app_path('Livewire/Project/Database/BackupExecutions.php'));
|
|
$databaseBackupJob = file_get_contents(app_path('Jobs/DatabaseBackupJob.php'));
|
|
|
|
expect($serviceExecutions)
|
|
->toContain('echo-private:team.{$teamId},BackupCreated')
|
|
->toContain("=> '\$refresh'")
|
|
->and($serviceBackups)
|
|
->toContain('echo-private:team.{$teamId},BackupCreated')
|
|
->and($databaseExecutions)
|
|
->toContain('$teamId = currentTeam()->id')
|
|
->not->toContain('$userId = Auth::id()')
|
|
->and(strpos($databaseBackupJob, "'finished_at' => Carbon::now()->toImmutable()"))
|
|
->toBeLessThan(strrpos($databaseBackupJob, 'BackupCreated::dispatch($this->team->id)'));
|
|
});
|