Search by

azatmurtazin / probatio-php

azatmurtazin

Probatio-php is a simple testing framework

Package info

github.com/azatmurtazin/probatio-php

pkg:composer/azatmurtazin/probatio-php

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.1.4 2026-09-11 16:02 UTC

This package is auto-updated.

Last update: 2026-09-27 17:16:48 UTC


README

logo

Tests

Probatio is a lightweight, zero-dependency testing framework for PHP (>= 7.2).

It provides a Pest/RSpec/JS-like BDD API: describe, context, test, it, expect, and lifecycle hooks (beforeAll, afterAll, beforeEach, afterEach).

Installation

composer require --dev azatmurtazin/probatio-php

Or add it manually to composer.json:

{
    "require-dev": {
        "azatmurtazin/probatio-php": "^X.Y"
    }
}

Then run composer update.

See the latest release on the Packagist.org

Basic usage

Create file tests/Unit/MagicTest.php:

<?php
test('magic✨', function () {
    expect(join(["\xF0\x9F", "\xA6\x84"]))
        ->toBe('🦄');
});

Run all discovered tests (recursively from the tests directory, tests/ by default):

./vendor/bin/probatio

Run a specific test file:

./vendor/bin/probatio tests/Unit/MagicTest.php

Exit code

The process exits with 0 when every test and assertion passed, and 1 when any test failed or any assertion throw. This makes it CI-friendly out of the box.

See also

License

It's open-sourced software licensed under the MIT license.