Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nbrowserkit/nbrowserkit
Implementation of Symfony's BrowserKit for Nette applications.
https://github.com/nbrowserkit/nbrowserkit
nette nette-tester symfony-browserkit
Last synced: 3 months ago
JSON representation
Implementation of Symfony's BrowserKit for Nette applications.
- Host: GitHub
- URL: https://github.com/nbrowserkit/nbrowserkit
- Owner: NBrowserKit
- Created: 2015-07-19T16:41:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-27T14:18:30.000Z (almost 5 years ago)
- Last Synced: 2024-10-12T15:21:16.144Z (3 months ago)
- Topics: nette, nette-tester, symfony-browserkit
- Language: PHP
- Size: 53.7 KB
- Stars: 2
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# NBrowserKit
[![Build Status](https://travis-ci.org/NBrowserKit/NBrowserKit.svg?branch=master)](https://travis-ci.org/NBrowserKit/NBrowserKit)
[![Current version](https://img.shields.io/packagist/v/vaclav-sir/n-browser-kit.svg)](https://packagist.org/packages/vaclav-sir/n-browser-kit)This package implements [Symfony's BrowserKit](https://github.com/symfony/BrowserKit) Client for use with a [Nette](http://nette.org/) application.
## Usage
```php
$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](http://symfony.com/doc/current/book/testing.html#functional-tests).
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](http://tester.nette.org/) library. You can run them easily from the command line:
```bash
composer install --dev
vendor/bin/tester tests```