{"repo":"laravel/browser-kit-testing","free":true,"listed":false,"github":"https://github.com/laravel/browser-kit-testing","clone":"git clone https://github.com/laravel/browser-kit-testing.git","description":"Provides backwards compatibility for BrowserKit testing in the latest Laravel release.","language":"PHP","stars":515,"topics":["laravel","testing"],"license":"MIT","category":"dev-tools","readme_excerpt":"Laravel BrowserKit Testing Introduction Laravel BrowserKit Testing provides a very fluent API for making HTTP requests to your application, examining the output, and even filling out forms. Official Documentation Installation First, install this package: composer require laravel/browser-kit-testing --dev Next, modify your application's base TestCase class to extend Laravel\\BrowserKitTesting\\TestCase instead of Illuminate\\Foundation\\Testing\\TestCase : No other modifications to your tests should be necessary. Usage To get started with a simple example, take a look at the test defined below: The visit method makes a GET request into the application. The see method asserts that we should see the given text in the response returned by the application. The dontSee method asserts that the given text is not returned in the application response. This is the most basic application test available in Laravel. You may also use the 'visitRoute' method to make a 'GET' request via a named route: Interacting With Your Application Of course, you can do much more than simply assert that text appears in a given response. Let's take a look at some examples of clicking links and filling out forms: Interacting With Links In this test, we will make a request to the application, \"click\" a link in the returned response, and then assert that we landed on a given URI. For example, let's assume there is a link in our response that has a text value of \"About Us\": Now, let's write a test that clicks the li","default_branch":null,"files":null,"tree":[],"storefront":"/r/laravel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/laravel/browser-kit-testing/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}