Skip to content

Instantly share code, notes, and snippets.

@ndamnjanovic
Created October 31, 2013 10:13
Show Gist options
  • Save ndamnjanovic/7247324 to your computer and use it in GitHub Desktop.
Save ndamnjanovic/7247324 to your computer and use it in GitHub Desktop.

Revisions

  1. ndamnjanovic created this gist Oct 31, 2013.
    10 changes: 10 additions & 0 deletions writing_test_tips
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    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.