feat: plugin scaffold with dependency check
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LIT\MCP\Tests\Unit;
|
||||
|
||||
use LIT\MCP\Dependencies;
|
||||
|
||||
final class DependenciesTest extends TestCase
|
||||
{
|
||||
public function testReportsNothingMissingWhenAllClassesExist(): void
|
||||
{
|
||||
$deps = new Dependencies(static fn (string $class): bool => true);
|
||||
|
||||
self::assertSame([], $deps->missing());
|
||||
}
|
||||
|
||||
public function testNamesEveryMissingComponent(): void
|
||||
{
|
||||
$deps = new Dependencies(static fn (string $class): bool => false);
|
||||
|
||||
self::assertSame(
|
||||
['wordpress/mcp-adapter', 'wp-media/mcp-oauth', 'WordPress Abilities API'],
|
||||
$deps->missing()
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user