feat(cache): Verhaltensprobe und Smoke für WP Super Cache
SuperCacheProbe prüft beim Prüfen, ob wp_cache_post_edit die Cache-Datei einer Testseite entfernt; während der Probe ist nur der Einzelseiten-Purge erlaubt, der Pfad kommt aus home und es werden nur feste Dateinamen gelöscht. ProbeStep bündelt die Schrittlogik von Pods und WP Super Cache; ThrowawayPost hält Marker und Titel zentral und räumt auch private Probe-Seiten auf (WP Super Cache wie Pods beim Laden des Reiters). super-cache-smoke.sh prüft gegen das echte Plugin; lib.sh sperrt parallele Smoke-Läufe per flock, wp-config.php wird atomar wiederhergestellt. Doku: Host-Abhängigkeit des Einzel-Purges, WP-Cron für den Nachlauf, Komplett-Purge durch Divi beim Prüfen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
05bf890481
commit
661d3945fd
@@ -6,10 +6,12 @@ namespace LIT\MCP\Tests\Unit\Integrations\SuperCache;
|
||||
|
||||
use Brain\Monkey\Functions;
|
||||
use LIT\MCP\Compatibility\Call;
|
||||
use LIT\MCP\Compatibility\CheckStep;
|
||||
use LIT\MCP\Compatibility\Compatibility;
|
||||
use LIT\MCP\Compatibility\Tier;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviProfile;
|
||||
use LIT\MCP\Integrations\Pods\PodsCompatibility;
|
||||
use LIT\MCP\Integrations\SuperCache\SuperCacheCheckSteps;
|
||||
use LIT\MCP\Integrations\SuperCache\SuperCacheCompatibility;
|
||||
use LIT\MCP\Integrations\SuperCache\SuperCacheFeature;
|
||||
use LIT\MCP\Tests\Unit\TestCase;
|
||||
@@ -92,6 +94,21 @@ final class SuperCacheCompatibilityTest extends TestCase
|
||||
self::assertNull((SuperCacheCompatibility::profile()->version)());
|
||||
}
|
||||
|
||||
public function testTheCheckHasTheProbeAsExtraStep(): void
|
||||
{
|
||||
$profile = SuperCacheCompatibility::profile();
|
||||
|
||||
self::assertNotNull($profile->extraSteps);
|
||||
$steps = ($profile->extraSteps)(false);
|
||||
self::assertSame([SuperCacheCheckSteps::PROBE], array_map(static fn ($step): string => $step->key, $steps));
|
||||
self::assertTrue($steps[0]->skipped);
|
||||
self::assertNotNull($profile->stepLabel);
|
||||
self::assertSame(
|
||||
'Leeren-Test an einer Wegwerf-Seite im Cache',
|
||||
($profile->stepLabel)(new CheckStep(SuperCacheCheckSteps::PROBE, []))
|
||||
);
|
||||
}
|
||||
|
||||
public function testAllProfilesCoexistWithoutIdCollision(): void
|
||||
{
|
||||
$compatibility = new Compatibility(
|
||||
|
||||
Reference in New Issue
Block a user