Created
October 31, 2013 10:13
-
-
Save ndamnjanovic/7247324 to your computer and use it in GitHub Desktop.
Tips when writing tests in Laravel 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TIP 1: Exception when performing many requests | |
----------------------------------------------------------------------------------------------- | |
If you have more than one $this->call() or $this->client->request(), inside one test method, | |
you may experience problems like: | |
{"error":{"type":"ErrorException","message":"Undefined variable: header","file":"/*,"line":1}} | |
or | |
Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException | |
You can solve this problem, if you do $this->client->restart(), before every next request that you're making. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment