https://github.com/codeception/laravel-module-tests
Tests for Laravel Module
https://github.com/codeception/laravel-module-tests
Last synced: 6 months ago
JSON representation
Tests for Laravel Module
- Host: GitHub
- URL: https://github.com/codeception/laravel-module-tests
- Owner: Codeception
- Created: 2020-12-26T14:14:48.000Z (about 5 years ago)
- Default Branch: 9.x
- Last Pushed: 2025-01-14T18:04:16.000Z (12 months ago)
- Last Synced: 2025-06-23T01:24:08.965Z (6 months ago)
- Language: PHP
- Size: 442 KB
- Stars: 5
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Codeception Laravel Module Tests
[](https://github.com/Codeception/laravel-module-tests)
Minimal site containing functional tests for [Codeception Module Laravel](https://github.com/Codeception/module-laravel).
## Usage
The main purpose of this project is to verify the proper functioning of the `Codeception Module Laravel` in a minimal Laravel installation.
You can use it to contribute new features or propose changes in the module and verify that nothing is broken in the process.
If that's your goal, be sure to follow [the contribution guides](https://github.com/Codeception/module-laravel/blob/main/CONTRIBUTING.md) for the module.
You can also **fork it** and use it to reproduce a bug or unexpected behavior for analysis.
If that's your case, just add a link to your fork next to the description of your issue in the module's repository.
Lastly, if you just want to see the module in action and run the tests yourself on your local machine just:
1. Clone the repo:
```shell
git clone https://github.com/Codeception/laravel-module-tests.git
```
2. Install Composer dependencies:
```shell
composer update
```
3. Create your `.env` file from the `.env.testing` file.
4. Create the database file: `database/database.sqlite`.
5. Update database schema and load seeders:
```shell
php artisan migrate --seed
```
Then, go to the project directory and run:
```shell
vendor/bin/codecept run Functional
```
### Navigate the application locally through a web browser
If for any reason you want to run the Laravel app in a browser, you should compile the assets:
```shell
yarn install
yarn run dev
```
### Create Unit Suite or Acceptance Suite
To create [Unit Tests](https://codeception.com/docs/05-UnitTests) or [Acceptance Tests](https://codeception.com/docs/03-AcceptanceTests), you need to create the corresponding suite first:
```shell
vendor/bin/codecept generate:suite Unit
vendor/bin/codecept generate:suite Acceptance
```
> Credits to [Jan-Henk Gerritsen](https://github.com/janhenkgerritsen) for his work on [janhenkgerritsen/codeception-laravel5-sample](https://github.com/janhenkgerritsen/codeception-laravel5-sample), which served as the inspiration for this project.