https://github.com/wavevision/nette-tests
🧰 PHPUnit extension for testing @nette applications
https://github.com/wavevision/nette-tests
nette nette-tests phpunit testing
Last synced: 24 days ago
JSON representation
🧰 PHPUnit extension for testing @nette applications
- Host: GitHub
- URL: https://github.com/wavevision/nette-tests
- Owner: wavevision
- License: mit
- Archived: true
- Created: 2019-10-10T09:40:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-19T18:26:28.000Z (over 2 years ago)
- Last Synced: 2024-12-20T08:30:35.855Z (10 months ago)
- Topics: nette, nette-tests, phpunit, testing
- Language: PHP
- Homepage:
- Size: 714 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Nette Tests
[](https://github.com/wavevision/nette-tests/actions/workflows/ci.yml)
[](https://coveralls.io/github/wavevision/nette-tests?branch=master)
[](https://github.com/phpstan/phpstan)
[PHPUnit](https://github.com/sebastianbergmann/phpunit/) extension for testing [Nette](https://github.com/nette/nette)
applications.
## Install
```
composer require --dev wavevision/nette-tests
```
## Configuration
Add callback for creating `Nette\Configurator` to [bootstrap](tests/app/tests/bootstrap.php) for tests.
## Features
* [DI container](tests/app/tests/Models/ExampleModelTest.php) in tests, allow
services [injects](tests/app/tests/Models/ExampleModelTest.php) in tests
* [presenter](tests/app/tests/Presenters/ExamplePresenterTest.php) testing
* [form](tests/app/tests/Presenters/FormPresenterTest.php) submit testing
### Presenter mapping
This testing suite lets you use your presenter classes to resolve `:Module:Presenter:action` mapping. This is achieved
using [nepada/presenter-mapping](https://github.com/nepada/presenter-mapping) extension which is registered in your
tests DIC as `presenterMapping`.
If your tested app uses this extension for presenter mapping as well, **make sure you register it in your config with
the same name**.
## Learn
See [this great talk](https://www.youtube.com/watch?v=E1r0EhTkWn4) by [Jakub Filla](https://github.com/jfilla) to learn
basic concepts of this extension.
