adachsoft / content-source-contract-tests
Reusable PHPUnit contract tests for content source providers.
Package info
gitlab.com/a.adach/content-source-contract-tests
pkg:composer/adachsoft/content-source-contract-tests
Requires
- php: ^8.3
- adachsoft/content-source-contracts: ^0.1.0
Requires (Dev)
- adachsoft/php-code-style: ^0.7.3
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^12.5
- rector/rector: ^2.8
- symplify/phpstan-rules: ^14.19
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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.