PHPackages                             recca0120/package-phpunit - 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. recca0120/package-phpunit

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

recca0120/package-phpunit
=========================

laravel package development phpunit

v0.2.1(10y ago)447MITPHPPHP &gt;=5.5.9

Since Jan 30Pushed 9y agoCompare

[ Source](https://github.com/recca0120/package-phpunit)[ Packagist](https://packagist.org/packages/recca0120/package-phpunit)[ RSS](/packages/recca0120-package-phpunit/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (9)Versions (6)Used By (0)

Laravel Package Develop Phpunit
===============================

[](#laravel-package-develop-phpunit)

Install
-------

[](#install)

### step1

[](#step1)

composer.json

```
require-dev: {
    "recca0120/package-phpunit": "~0.2.1"
}

```

composer install or composer update

### step2

[](#step2)

copy phpunit.xml, tests folder to root

### step3

[](#step3)

execute phpunit

Example
-------

[](#example)

This package is auto setup database \[sqlite\]

you can add migrations to database/migrations

and in your test case add code

```
class DatabaseTest extends PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $app = App::getInstance();
        $app->migrate('up');
    }

    public function tearDown()
    {
        $app = App::getInstance();
        $app->migrate('down');
    }
}
```

FULL DEMO
---------

[](#full-demo)

```
use Illuminate\Database\Eloquent\Model;

class DatabaseTest extends PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $app = App::getInstance();
        $app->migrate('up');
    }

    public function tearDown()
    {
        $app = App::getInstance();
        $app->migrate('down');
    }

    public function test_app_environment()
    {
        $this->assertEquals(App::environment(), 'testing');
    }

    public function test_insert_into_database()
    {
        $data = [
            'test1' => 'test1',
            'test2' => 'test2',
            'test3' => 'test3',
        ];
        $test = Test::create($data);
        // $result = $test->toArray();
        $this->assertEquals($test->id, 1);
        $this->assertEquals($test->test1, $data['test1']);
        $this->assertEquals($test->test2, $data['test2']);
        $this->assertEquals($test->test3, $data['test3']);
    }
}

class Test extends Model
{
    protected $guarded = ['id'];
}
```

notice
------

[](#notice)

### sqlite is not support alter table

[](#sqlite-is-not-support-alter-table)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

4

Last Release

3756d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1390554?v=4)[Recca Tsai](/maintainers/recca0120)[@recca0120](https://github.com/recca0120)

---

Top Contributors

[![recca0120](https://avatars.githubusercontent.com/u/1390554?v=4)](https://github.com/recca0120 "recca0120 (30 commits)")

---

Tags

phpunitlaravelpackagefacade

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/recca0120-package-phpunit/health.svg)

```
[![Health](https://phpackages.com/badges/recca0120-package-phpunit/health.svg)](https://phpackages.com/packages/recca0120-package-phpunit)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)

PHPackages © 2026

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