PHPackages                             softonic/laravel-database-migrate-test-listener - 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. softonic/laravel-database-migrate-test-listener

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

softonic/laravel-database-migrate-test-listener
===============================================

PHPUnit listener to run Laravel database migrations before each testsuite

3.1.0(3y ago)111.6kApache-2.0PHPPHP &gt;=7.3

Since Jul 23Pushed 3y ago11 watchersCompare

[ Source](https://github.com/softonic/laravel-database-migrate-test-listener)[ Packagist](https://packagist.org/packages/softonic/laravel-database-migrate-test-listener)[ Docs](https://github.com/softonic/laravel-database-migrate-test-listener)[ RSS](/packages/softonic-laravel-database-migrate-test-listener/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (4)Versions (13)Used By (0)

PHPUnit listener to run Laravel database migrations before each testsuite
=========================================================================

[](#phpunit-listener-to-run-laravel-database-migrations-before-each-testsuite)

[![Latest Version](https://camo.githubusercontent.com/dba8ac20c38599912d1cc2502413f61af33702432ba14eb23aa3dbab15c1b737/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f736f66746f6e69632f6c61726176656c2d64617461626173652d6d6967726174652d746573742d6c697374656e65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/softonic/laravel-database-migrate-test-listener/releases)[![Software License](https://camo.githubusercontent.com/36cfc741510e076bec951c1421a2b1c3a5553e953fcdb378339626a5f33c1e8d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322e302d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/2f912ed2dda87eafba5edeccb19b693ed2c3e0c2febf41017133fa652ce0af9a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f736f66746f6e69632f6c61726176656c2d64617461626173652d6d6967726174652d746573742d6c697374656e65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/softonic/laravel-database-migrate-test-listener)[![Coverage Status](https://camo.githubusercontent.com/93b0a754f0b60843ba05bbe7d6a1abe9b0e15bc78e2958d31327b9eedf6588ee/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f736f66746f6e69632f6c61726176656c2d64617461626173652d6d6967726174652d746573742d6c697374656e65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/softonic/laravel-database-migrate-test-listener/code-structure)[![Quality Score](https://camo.githubusercontent.com/d525962bf6353a89ac8b53179bfb5ff87866327b283870eb6204246314644004/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f736f66746f6e69632f6c61726176656c2d64617461626173652d6d6967726174652d746573742d6c697374656e65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/softonic/laravel-database-migrate-test-listener)[![Total Downloads](https://camo.githubusercontent.com/205d7283449ea1c46d56bba05b16045137bf5efb050c69797245d272c5acb368/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f66746f6e69632f6c61726176656c2d64617461626173652d6d6967726174652d746573742d6c697374656e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softonic/laravel-database-migrate-test-listener)[![Average time to resolve an issue](https://camo.githubusercontent.com/e27f1359619d91721a6811ff9c313d931f9dcdd93d159c7fa2ed06f841d013ea/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f7265736f6c7574696f6e2f736f66746f6e69632f6c61726176656c2d64617461626173652d6d6967726174652d746573742d6c697374656e65722e7376673f7374796c653d666c61742d737175617265)](http://isitmaintained.com/project/softonic/laravel-database-migrate-test-listener "Average time to resolve an issue")[![Percentage of issues still open](https://camo.githubusercontent.com/54617918f24f72d965609faab905e8837fe7471aaf13f08956d6a8919b8055ed/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f6f70656e2f736f66746f6e69632f6c61726176656c2d64617461626173652d6d6967726174652d746573742d6c697374656e65722e7376673f7374796c653d666c61742d737175617265)](http://isitmaintained.com/project/softonic/laravel-database-migrate-test-listener "Percentage of issues still open")

This PHPUnit listener run Laravel migrations before each testsuit

Installation
------------

[](#installation)

Via composer:

```
composer require --dev softonic/laravel-database-migrate-test-listener

```

Documentation
-------------

[](#documentation)

To use the listener add it to your phpunit.xml, defining on which test suites it should be activated, if it should seed data and the database connection to use.

```

    ...

                Feature

                Integration

            1
            sqlite
            >App\\Database\\Seeds\\Foo\\DatabaseSeeder

    ...

```

From now on before the specified test suite is run, the `migrate:fresh` Laravel command will be executed.

Testing
-------

[](#testing)

`softonic/laravel-database-migrate-test-listener` has a [PHPUnit](https://phpunit.de) test suite and a coding style compliance test suite using [PHP CS Fixer](http://cs.sensiolabs.org/).

To run the tests, run the following command from the project folder.

```
$ docker-compose run test
```

License
-------

[](#license)

The Apache 2.0 license. Please see [LICENSE](LICENSE) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~277 days

Total

11

Last Release

1316d ago

Major Versions

1.0.1 → 2.0.02019-07-26

2.3.0 → 3.0.02020-11-02

PHP version history (3 changes)1.0.0PHP &gt;=7.1

2.0.3PHP &gt;=7.2

3.0.0PHP &gt;=7.3

### Community

Maintainers

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

---

Top Contributors

[![jeurrutia](https://avatars.githubusercontent.com/u/7116300?v=4)](https://github.com/jeurrutia "jeurrutia (5 commits)")[![rccrdpccl](https://avatars.githubusercontent.com/u/18526422?v=4)](https://github.com/rccrdpccl "rccrdpccl (3 commits)")[![xaviapa](https://avatars.githubusercontent.com/u/8439057?v=4)](https://github.com/xaviapa "xaviapa (3 commits)")[![joskfg](https://avatars.githubusercontent.com/u/524887?v=4)](https://github.com/joskfg "joskfg (1 commits)")[![Lotykun](https://avatars.githubusercontent.com/u/9845202?v=4)](https://github.com/Lotykun "Lotykun (1 commits)")

---

Tags

laravellistenermigrationsphpunittestingphpunitlaraveldatabaselistener

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/softonic-laravel-database-migrate-test-listener/health.svg)

```
[![Health](https://phpackages.com/badges/softonic-laravel-database-migrate-test-listener/health.svg)](https://phpackages.com/packages/softonic-laravel-database-migrate-test-listener)
```

###  Alternatives

[christophrumpel/missing-livewire-assertions

This package adds missing livewire test assertions.

149336.0k9](/packages/christophrumpel-missing-livewire-assertions)[code-distortion/adapt

A Laravel package that builds databases for your tests, improving their speed.

2835.5k](/packages/code-distortion-adapt)[zizaco/testcases-laravel

Some classes to help write tests for laravel 4 applications

4650.5k2](/packages/zizaco-testcases-laravel)

PHPackages © 2026

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