Search by

adachsoft / workflow-launcher-contract-tests

Arkadiusz Adach

Reusable PHPUnit contract tests for workflow launcher implementations.

Package info

gitlab.com/a.adach/workflow-launcher-contract-tests

Issues

pkg:composer/adachsoft/workflow-launcher-contract-tests

Statistics

Installs: 9

Dependents: 1

Suggesters: 0

Stars: 0

v0.1.2 2026-11-21 12:03 UTC

This package is auto-updated.

Last update: 2026-11-21 11:04:17 UTC


README

Reusable PHPUnit behavioral contract suites for implementations of WorkflowLauncherInterface and ConcurrencySlotInterface. Use them to verify that a workflow launcher or concurrency-slot adapter honors the shared contracts without depending on a particular workflow execution engine.

Capabilities

  • Check launch results, unknown workflows, idempotency, budget rejection, and concurrency-key behavior.
  • Check concurrency limits, independent keys, reservation release, re-entrant reservations, and TTL expiration.
  • Supply a mutable PSR clock for deterministic expiration tests.

Installation

Install the package as a development dependency:

composer require --dev adachsoft/workflow-launcher-contract-tests

Usage

Create concrete PHPUnit test classes in your project that extend the relevant abstract contract suite and implement its factory method. The factories should return your production implementation configured for the case supplied by the contract test. See the integration example.

Requirements

The package requires PHP 8.3 or later, PHPUnit 12.5 or later, and adachsoft/workflow-launcher-contracts. PHPUnit is included as a runtime dependency because the reusable contract suites extend PHPUnit's TestCase class.