vaclav-sir / n-browser-kit
Implementation of Symfony's BrowserKit for Nette applications.
Installs: 22 865
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: ~7.1
- nette/application: ^3.0
- nette/bootstrap: ^3.0
- nette/caching: ^3.0
- nette/di: ^3.0
- nette/http: ^3.0
- symfony/browser-kit: ^5.0
- tracy/tracy: ^2.6
Requires (Dev)
- mockery/mockery: ^0.9.4 | ^1.0
- nette/tester: ^1.3 | ^2.0
Suggests
- symfony/css-selector: To use CSS selectors with DomCrawler.
This package is auto-updated.
Last update: 2020-01-27 14:18:35 UTC
README
This package implements Symfony's BrowserKit Client for use with a Nette application.
Usage
$client = new Client; $client->setContainer($container); $client->request('GET', '/'); Assert::same(200, $client->getResponse()->getStatusCode()); Assert::contains('Hello World', $client->getResponse()->getContent());
You can find more examples in The Symfony Book.
Example of usage with Nette and Nette Tester: https://github.com/VaclavSir/NBrowserKit-example
Running Tests
Tests for this package are written using Nette Tester library. You can run them easily from the command line:
composer install --dev vendor/bin/tester tests