Download the PHP package memran/php-testify without Composer
On this page you can find all versions of the php package memran/php-testify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-testify
PHP-Testify
PHP-Testify brings an expressive expect() API, describe() / it() specs, a readable CLI runner, and watch mode to standard PHPUnit-based projects. It stays small, framework-agnostic, and compatible with plain Composer workflows.
Features
- Fluent assertions such as
toBe(),toEqual(),toContain(),toThrow(), and negation withnot() - Parameterized specs with
->with([...]) - Fluent skip/incomplete controls with
->skip(),incomplete(), andtodo() - Fluent groups/tags with
->group()/group()plus CLI filtering - Two test styles in the same project: PHPUnit classes and Jest/Vitest-like specs
- Built-in lifecycle hooks with nested-suite inheritance:
beforeAll,afterAll,beforeEach,afterEach - Filtered runs, grouped runs, verbose output, and watch mode from the
bin/testifyCLI - Static analysis, formatting, and CI setup ready for package contributors
Requirements
- PHP 8.2 or newer
- Composer
Installation
Create a phpunit.config.php file in your project root:
Quick Start
Write your first spec:
Run it:
Parameterized and grouped specs:
Tutorials
1. Write a spec with hooks
2. Mix PHPUnit and Testify in one project
tests/InvoiceCalculatorTest.php
tests/invoice_expectations_test.php
3. Run focused feedback loops
Use --filter to run matching PHPUnit methods, spec names, suite names, or dataset labels. Use --group and --exclude-group to select fluent tests by tags. Use --watch during local development to re-run the suite after file changes without shell interpolation.
4. Skip or mark work incomplete
Assertion Examples
Project Layout
src/runtime classes, assertions, suite registry, runner, and watch supportbin/testifyCLI entrypointtests/package fixtures plus PHPUnit coverage for internal behaviorphpunit.config.phpfixture config used by the package integration suite
Development
composer testruns the internal PHPUnit suite fromtests/Unitcomposer test:packageruns the package through its own CLI against fixture specscomposer analyseruns PHPStancomposer lintruns PHP-CS-Fixer in dry-run modecomposer fixapplies formatting fixescomposer ciruns the full local quality gate
Tooling Status
- PHPStan 2.x configuration: phpstan.neon.dist
- PHPUnit configuration: phpunit.xml.dist
- GitHub Actions workflow: .github/workflows/ci.yml
- Contributor guide: AGENTS.md
Security and Production Notes
- Watch mode spawns child processes with argument arrays, not shell-built command strings.
- The runner validates
bootstrapandtest_patternsbefore loading files. - Keep
phpunit.config.phpunder version control and point it only at trusted bootstrap files. - Fluent groups/tags currently apply to Testify specs, not native PHPUnit
#[Group]attributes.
Supported Today
describe()/it()/test()specs- nested suites with inherited
beforeEach/afterEachhooks - datasets with
->with([...]) - fluent groups/tags with CLI selection
- skip/incomplete states through metadata or runtime helpers
- mixed projects that contain both PHPUnit test classes and Testify specs
- expanded day-to-day matchers in
expect()
Current Limits
- PHPUnit attributes such as
#[DataProvider],#[Depends], and#[Group]are not re-exposed through the Testify runner yet - fluent datasets are inline per test; reusable named dataset registries are not implemented
- there is no XML bridge for
phpunit.xmlorphpunit.xml.dist;phpunit.config.phpremains the runtime config source - machine-readable reporters and advanced PHPUnit extension/event integration are still missing
Contributing
Run composer ci before opening a pull request. Keep changes focused, add regression tests for behavior changes, and document any CLI or configuration changes in this README.