refactor(divi): DiviTab geht im Reiter „Compatibility“ auf
Der eigene Divi-Reiter entfällt. DiviAdminExtras behält Admin-Hinweis, Orphan-Bereinigung vor der Ausgabe (lit_mcp_compat_profile_load), Hinweis zum nächsten Schritt und zur privaten Testseite (lit_mcp_compat_profile_intro), Zustandstexte mit Quelle (lit_mcp_compat_explanation), Automatik-Notiz und Visual-Builder-Hinweis (lit_mcp_compat_profile_extra) sowie die Spalten Quelle, Probleme und Betroffene Tools über die neue, gegen fehlerhafte Callbacks abgesicherte Erweiterung lit_mcp_compat_capability_columns. Texte, Doku, CSS (lit-mcp-compat-*) und Smoke auf den neuen Reiter umgestellt, tote divi_*-Hinweise entfernt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
85f4138b36
commit
b40b81f585
@@ -10,8 +10,7 @@ use Brain\Monkey\Functions;
|
||||
use LIT\MCP\Abilities\Ability;
|
||||
use LIT\MCP\Abilities\ExposurePolicy;
|
||||
use LIT\MCP\Abilities\ToolAvailability;
|
||||
use LIT\MCP\Admin\AdminTab;
|
||||
use LIT\MCP\Integrations\Divi\Admin\DiviTab;
|
||||
use LIT\MCP\Admin\CompatibilityTab;
|
||||
use LIT\MCP\Admin\SettingsPage;
|
||||
use LIT\MCP\Compatibility\ProvidesCompatibility;
|
||||
use LIT\MCP\Integrations\Core\EnvironmentComponent;
|
||||
@@ -314,11 +313,10 @@ final class DiviIntegrationTest extends TestCase
|
||||
(new DiviIntegration($schema, FakeChangeLog::forbidden(), new ToolAvailability()))->libraryIdsVisible();
|
||||
}
|
||||
|
||||
/** Bootable: Divi's own hooks – upgrader cache reset, check route, tab "Divi" after the plugin's tabs. */
|
||||
/** Bootable: Divi's own hooks – upgrader cache reset, check route, extras in the tab "Compatibility" (no own tab). */
|
||||
public function testBootRegistersDivisOwnHooks(): void
|
||||
{
|
||||
$upgraded = null;
|
||||
$tabs = null;
|
||||
Actions\expectAdded('upgrader_process_complete')->once()->whenHappen(
|
||||
static function (callable $callback) use (&$upgraded): void {
|
||||
$upgraded = $callback;
|
||||
@@ -330,13 +328,13 @@ final class DiviIntegrationTest extends TestCase
|
||||
$changed = $callback;
|
||||
}
|
||||
);
|
||||
Filters\expectAdded(SettingsPage::TABS_FILTER)->once()->whenHappen(
|
||||
static function (callable $callback) use (&$tabs): void {
|
||||
$tabs = $callback;
|
||||
}
|
||||
);
|
||||
// The Divi admin extras hook into the admin notices and the tab "Compatibility"; Divi has no tab of its own.
|
||||
Filters\expectAdded(SettingsPage::TABS_FILTER)->never();
|
||||
Actions\expectAdded('admin_notices')->once();
|
||||
Actions\expectAdded(CompatibilityTab::LOAD_ACTION)->once();
|
||||
Actions\expectAdded(CompatibilityTab::EXTRA_ACTION)->once();
|
||||
Filters\expectAdded(CompatibilityTab::COLUMNS_FILTER)->once();
|
||||
Functions\expect('delete_transient')->once()->with(ReleaseResolver::CACHE)->andReturn(true);
|
||||
$base = Mockery::mock(AdminTab::class);
|
||||
|
||||
(new DiviIntegration(Mockery::mock(ContentSchema::class), FakeChangeLog::forbidden()))->boot();
|
||||
self::assertIsCallable($upgraded);
|
||||
@@ -345,12 +343,6 @@ final class DiviIntegrationTest extends TestCase
|
||||
self::assertIsCallable($changed);
|
||||
$changed('pods');
|
||||
$changed('divi');
|
||||
self::assertIsCallable($tabs);
|
||||
$all = $tabs([$base]);
|
||||
|
||||
self::assertCount(2, $all);
|
||||
self::assertSame($base, $all[0]);
|
||||
self::assertInstanceOf(DiviTab::class, $all[1]);
|
||||
}
|
||||
|
||||
public function testTheFeatureOverviewFindsTheToolsOfAllIntegrations(): void
|
||||
|
||||
Reference in New Issue
Block a user