getGitRef()); self::assertTrue($mapping->isActive()); self::assertSame('never_synced', $mapping->getLastSyncStatus()); self::assertNull($mapping->getLastSuccessfulSyncAt()); self::assertNull($mapping->getLastSyncError()); } public function testSyncFailureDoesNotClearPreviousCacheKey(): void { $mapping = new ScriptMapping(); $mapping->setCacheKey('scripts/1.sh'); $mapping->markSyncFailed('git fetch failed'); self::assertSame('scripts/1.sh', $mapping->getCacheKey()); self::assertSame('failed', $mapping->getLastSyncStatus()); self::assertSame('git fetch failed', $mapping->getLastSyncError()); } }