testflowlabs/test-attributes

PHP 8 attributes for testing - BDD steps and test traceability

Installs: 151

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/testflowlabs/test-attributes

v1.0.0 2025-12-13 23:21 UTC

This package is auto-updated.

Last update: 2025-12-13 23:23:13 UTC


README

PHP 8 attributes for testing - BDD steps and test traceability

PHP Version License

Lightweight PHP 8 attributes for use with testing plugins.

Installation

composer require testflowlabs/test-attributes

Attributes

Attribute Target Purpose Used By
#[Given] Method/Function BDD step - Arrange testflowlabs/pest-plugin-bdd
#[When] Method/Function BDD step - Act testflowlabs/pest-plugin-bdd
#[Then] Method/Function BDD step - Assert testflowlabs/pest-plugin-bdd
#[TestedBy] Method Mark production method as tested by specific test testflowlabs/testlink
#[Links] Method Link test to production code (traceability only) testflowlabs/testlink
#[LinksAndCovers] Method Link test to production code + coverage testflowlabs/testlink

All attributes are repeatable.

Why Separate Package?

This package is a production dependency, while testing plugins remain dev dependencies.

{
    "require": {
        "testflowlabs/test-attributes": "^1.0"
    },
    "require-dev": {
        "testflowlabs/pest-plugin-bdd": "^0.1",
        "testflowlabs/testlink": "^0.1"
    }
}

This allows annotating code with attributes without pulling in test runners.

License

MIT License. See LICENSE for details.