<?php

declare(strict_types=1);

namespace Drupal\Tests\flowdrop_orchestration\Unit;

use Drupal\Tests\UnitTestCase;
use Drupal\flowdrop_orchestration\Service\Orchestrator\OrchestratorInterface;
use Drupal\Tests\flowdrop\Unit\Traits\InterfaceContractTestTrait;

/**
 * Tests orchestration interface contracts are stable.
 *
 * @group flowdrop_orchestration
 */
class InterfaceContractTest extends UnitTestCase {

  use InterfaceContractTestTrait;

  /**
   * Tests OrchestratorInterface method signatures.
   *
   * @covers \Drupal\flowdrop_orchestration\Service\Orchestrator\OrchestratorInterface
   */
  public function testOrchestratorInterface(): void {
    $this->assertInterfaceHasMethod(OrchestratorInterface::class, 'getType');
    $this->assertInterfaceHasMethod(OrchestratorInterface::class, 'orchestrate', ['request']);
    $this->assertInterfaceHasMethod(OrchestratorInterface::class, 'supportsWorkflow', ['workflow']);
    $this->assertInterfaceHasMethod(OrchestratorInterface::class, 'getCapabilities');
    $this->assertInterfaceMethodCount(OrchestratorInterface::class, 4);
  }

}
