Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vjik/demo-codeception-db-populator
Database Populator for Codeception DB Module demo project
https://github.com/vjik/demo-codeception-db-populator
Last synced: about 5 hours ago
JSON representation
Database Populator for Codeception DB Module demo project
- Host: GitHub
- URL: https://github.com/vjik/demo-codeception-db-populator
- Owner: vjik
- License: bsd-3-clause
- Created: 2021-09-27T22:20:47.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-27T17:33:45.000Z (almost 3 years ago)
- Last Synced: 2023-03-26T16:17:53.234Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 77.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# [Database Populator for Codeception DB Module](https://github.com/vjik/codeception-db-populator) Demo Project
[![Build status](https://github.com/vjik/codeception-db-populator/workflows/build/badge.svg)](https://github.com/vjik/codeception-db-populator/actions?query=workflow%3Abuild)
[![Powered by Yii3](https://img.shields.io/badge/Powered_by-Yii3-green.svg?style=flat)](https://www.yiiframework.com/yii3-progress)
[![License](https://poser.pugx.org/vjik/codeception-db-populator/license)](/LICENSE)Minimal console application based on Yii3 for demonstration work with [Database Populator for Codeception](https://github.com/vjik/codeception-db-populator).
## Requirements
- PHP 8.0 or higher.
- MySQL databasee.MySQL configuration:
- host: `127.0.0.1`
- name: `dbpopulator`
- user: `root`
- password: `root`> Note: you can change MySQL configuration in `./.env` file that contain environment variables.
## Applying migrations
```shell
./yii migrate/up
```## Console commands
Author:
- `./yii author/create `
- `./yii author/delete `Category:
- `./yii category/create `
- `./yii category/delete `Post:
- `./yii post/create [-a|--author ] [-c|--category ]`
- `./yii post/delete `## Creating dumps for tests
Windows:
```shell
./tests/make-dumps.bat
```## Testing
Require MySQL database with configuration:
- host: `127.0.0.1`
- name: `dbpopulator_test`
- user: `root`
- password: `root`Require environment variable `APP_ENV` with value `test`.
To run tests:
```shell
./vendor/bin/codecept run
```> Note: in Windows you can run script `./tests/run.bat` that sets environment variable `APP_ENV` and run codeception.
## License
The Codeception Database Populator Demo Project is free software. It is released under the terms of the BSD License. Please see [`LICENSE`](./LICENSE.md) for more information.