PHPackages                             brandonbest/php-unittest-sqlite - 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. brandonbest/php-unittest-sqlite

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

brandonbest/php-unittest-sqlite
===============================

Limit the number of migrations/seeders run during unit tests.

v1.0.0(5y ago)11.1kMITPHPPHP ^7.2.0

Since Sep 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/brandonbest/php-unittest-sqlite)[ Packagist](https://packagist.org/packages/brandonbest/php-unittest-sqlite)[ Docs](https://brandonbest.com/packages/php-unittest-sqlite)[ RSS](/packages/brandonbest-php-unittest-sqlite/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

PHP UnitTest Sqlite
===================

[](#php-unittest-sqlite)

This package optimizes unit testing speed, especially for packages with a large number of migrations and/or seeders.

The package works by managing two copies of a sqlite database, `base` and `copy`. Migrations and seeders are run on `copy` if `base` does not exist. `Copy` is cloned into `base`. Every unit test with `RefreshDatabase` trait will delete `copy` and clone `base` into `copy`.

`Base` is deleted at the end of the unit test (you can keep `Base` around with a simple configuration update).

---

Setup
=====

[](#setup)

Install
-------

[](#install)

```
composer require --dev brandonbest/php-unittest-sqlite

```

PHP Unit
--------

[](#php-unit)

Add the following listener to phpunit.xml.

```

```

Commands
--------

[](#commands)

`php artisan sqlite:delete`Deletes the `base` file.

Future Plans
------------

[](#future-plans)

- Automatically detect new migrations and update the base sqlite

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

2085d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c7f3d3f04c179484539049a6d5198e404578963095f6a45f9306896f7499a95?d=identicon)[brandonbest](/maintainers/brandonbest)

---

Top Contributors

[![brandonbest](https://avatars.githubusercontent.com/u/7060471?v=4)](https://github.com/brandonbest "brandonbest (2 commits)")

---

Tags

laravellumenphpunit-testssqlite

### Embed Badge

![Health badge](/badges/brandonbest-php-unittest-sqlite/health.svg)

```
[![Health](https://phpackages.com/badges/brandonbest-php-unittest-sqlite/health.svg)](https://phpackages.com/packages/brandonbest-php-unittest-sqlite)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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