Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softonic/laravel-database-migrate-test-listener
Laravel database migrate test listener
https://github.com/softonic/laravel-database-migrate-test-listener
laravel listener migrations phpunit testing
Last synced: 3 days ago
JSON representation
Laravel database migrate test listener
- Host: GitHub
- URL: https://github.com/softonic/laravel-database-migrate-test-listener
- Owner: softonic
- License: other
- Archived: true
- Created: 2019-07-23T10:45:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-04T08:09:36.000Z (over 2 years ago)
- Last Synced: 2024-12-18T06:39:52.959Z (about 1 month ago)
- Topics: laravel, listener, migrations, phpunit, testing
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
PHPUnit listener to run Laravel database migrations before each testsuite
=====[![Latest Version](https://img.shields.io/github/release/softonic/laravel-database-migrate-test-listener.svg?style=flat-square)](https://github.com/softonic/laravel-database-migrate-test-listener/releases)
[![Software License](https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/softonic/laravel-database-migrate-test-listener/master.svg?style=flat-square)](https://travis-ci.org/softonic/laravel-database-migrate-test-listener)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/softonic/laravel-database-migrate-test-listener.svg?style=flat-square)](https://scrutinizer-ci.com/g/softonic/laravel-database-migrate-test-listener/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/softonic/laravel-database-migrate-test-listener.svg?style=flat-square)](https://scrutinizer-ci.com/g/softonic/laravel-database-migrate-test-listener)
[![Total Downloads](https://img.shields.io/packagist/dt/softonic/laravel-database-migrate-test-listener.svg?style=flat-square)](https://packagist.org/packages/softonic/laravel-database-migrate-test-listener)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/softonic/laravel-database-migrate-test-listener.svg?style=flat-square)](http://isitmaintained.com/project/softonic/laravel-database-migrate-test-listener "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/softonic/laravel-database-migrate-test-listener.svg?style=flat-square)](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
-------Via composer:
```
composer require --dev softonic/laravel-database-migrate-test-listener
```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
-------`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.
``` bash
$ docker-compose run test
```License
-------The Apache 2.0 license. Please see [LICENSE](LICENSE) for more information.
[PSR-2]: http://www.php-fig.org/psr/psr-2/
[PSR-4]: http://www.php-fig.org/psr/psr-4/