nexus4812/plain-php-test-framework

There is no license information available for the latest version (v0.0.1) of this package.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/nexus4812/plain-php-test-framework

v0.0.1 2025-12-21 10:47 UTC

This package is auto-updated.

Last update: 2025-12-21 10:55:46 UTC


README

日本語 | English

What this is

A minimal test framework that works on PHP 5.3 and newer. It aims to feel PHPUnit-like so legacy projects can migrate gradually. The design keeps future switching to PHPUnit as painless as possible.

Status: Draft. Breaking changes without backwards compatibility may happen.

Installation

composer require --dev nexus4812/plain-php-test-framework

If you are on PHP 5.3, use composer 2.2.

Good fit for

  • Running tests on legacy PHP 5.3 environments
  • Using a PHPUnit-like style where PHPUnit itself cannot be installed
  • Keeping test code aligned for a future move to PHPUnit

Not a good fit for

  • Needing modern PHPUnit features (attributes, data providers, mocks, coverage, etc.)
  • Expecting full PHPUnit compatibility

Features

  • Works on PHP 5.3 to 8.5
  • Composer PSR-4 autoloading (Composer 2.2 compatible)
  • Basic assertions: assertSame / assertTrue / assertFalse / assertCount
  • Simple CLI runner: bin/run-tests

Quick start

  1. Write a test
<?php

use PlainPhp\TestFramework\TestCase;
use PlainPhp\TestFramework\Assert;

class ExampleTest extends TestCase
{
    public function testAdds()
    {
        Assert::assertSame(2, 1 + 1);
    }
}
  1. Run tests
php bin/run-tests

By default it searches tests/. You can also pass a custom path.

php bin/run-tests path/to/tests

Migration mindset

This framework is not the final destination for PHPUnit compatibility. It is a temporary, minimal stepping stone toward PHPUnit. When you can migrate, switch to PHPUnit.