Search by

adachsoft / content-source-contract-tests

Arkadiusz Adach

Reusable PHPUnit contract tests for content source providers.

Package info

gitlab.com/a.adach/content-source-contract-tests

Issues

pkg:composer/adachsoft/content-source-contract-tests

Statistics

Installs: 4

Dependents: 1

Suggesters: 0

Stars: 0

v0.1.0 2026-11-22 15:58 UTC

This package is auto-updated.

Last update: 2026-11-22 14:59:28 UTC


README

Reusable PHPUnit contract tests for implementations of SourceProviderInterface from adachsoft/content-source-contracts. The suite checks provider identity, entity support, and the completeness and attribution of fetched source documents.

Requirements

  • PHP 8.3 or later
  • PHPUnit 12.5 or later
  • adachsoft/content-source-contracts

Installation

composer require --dev adachsoft/content-source-contract-tests

Usage

Extend AbstractSourceProviderContractTest in the consuming project's test suite. Implement the fixture methods to provide the source provider, a supported entity, and the locale. PHPUnit then runs the inherited contract checks on the concrete test class.

See the example.