承接 nexus4812/plain-php-test-framework 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nexus4812/plain-php-test-framework

最新稳定版本:v0.0.1

Composer 安装命令:

composer require nexus4812/plain-php-test-framework

包简介

README 文档

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.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-12-21