PHPackages                             wsteel/tp51unit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. wsteel/tp51unit

ActivePhpunit[Testing &amp; Quality](/categories/testing)

wsteel/tp51unit
===============

A simple unit test for thinkphp5.1

v0.0.3(6y ago)121MITPHP

Since May 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/wsteel/tp51unit)[ Packagist](https://packagist.org/packages/wsteel/tp51unit)[ Docs](https://github.com/wsteel/tp51unit)[ RSS](/packages/wsteel-tp51unit/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

tp51unit , unit test for thinkphp5.1, only test
===============================================

[](#tp51unit--unit-test-for-thinkphp51-only-test)

test thinkphp5.1 app's logic by phpstorm 2019

**usage**

```
composer require wsteel/php51unit

```

**require**

```
"php": ">=7.0.0",
"topthink/framework": "5.1.*"
"phpunit/phpunit": "6.*"

```

**phpstorm setting**

File | Settings | Languages &amp; Frameworks | PHP | Test Frameworks

```
PHPUnit library -> Path to phpunit.phar -> _YOUR_phpunit-*.phar

Test Runner -> Default bootstrap file:  __YOUR_APP__\vendor\wsteel\tp51unit\src\wsteel\tp51unit\TestCase.php

```

**demo**

filename

```
tests/demo/demoTest.php

```

content

```
namespace tests\demo;

use wsteel\tp51unit\TestCase;

class demoTest extends TestCase
{

    public function testTrue()
    {
        $this->assertTrue(true);
    }

    public function testFalse()
    {
        $this->assertFalse(false, 'false');
    }

    public function testModel()
    {
        $e = \app\serverapi\model\Users::get(1)->toArray();
        $this->assertNotEmpty($e);
    }

    public function testM()
    {
        $user = model('users', 'serverapi\model');
        $e = $user->where('id', 1)->find()->toArray();
        $this->assertNotEmpty($e);
    }

    public function testDB()
    {
        $user = \think\Db::name('server_user');
        $e = $user->where('id', 1)->find();
        $this->assertNotEmpty($e);
    }

    public function testConfig()
    {
        $config = config('serverapi');
        $this->assertNotEmpty($config);
    }
}
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Total

2

Last Release

2551d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20486291?v=4)[wsteel](/maintainers/wsteel)[@wsteel](https://github.com/wsteel)

---

Tags

phpunitthinkphp5.1tp51unit

### Embed Badge

![Health badge](/badges/wsteel-tp51unit/health.svg)

```
[![Health](https://phpackages.com/badges/wsteel-tp51unit/health.svg)](https://phpackages.com/packages/wsteel-tp51unit)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k940.0M150.3k](/packages/phpunit-phpunit)[brianium/paratest

Parallel testing for PHP

2.5k129.9M913](/packages/brianium-paratest)[johnkary/phpunit-speedtrap

Find and report on slow tests in your PHPUnit test suite

78338.4M130](/packages/johnkary-phpunit-speedtrap)[spatie/phpunit-snapshot-assertions

Snapshot testing with PHPUnit

69619.1M606](/packages/spatie-phpunit-snapshot-assertions)[dg/bypass-finals

Removes final keyword from source code on-the-fly and allows mocking of final methods and classes

57128.2M570](/packages/dg-bypass-finals)[phpspec/prophecy-phpunit

Integrating the Prophecy mocking library in PHPUnit test cases

19457.8M1.7k](/packages/phpspec-prophecy-phpunit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
