laravel/framework — pull request #5365 by tomzx (2014-08-07 01:11:52+00:00)
Title: Add reset methods to container, application, dispatcher and view in order to reduce memory leak during tests

The primary goal of this change is to reduce the amount of memory leak occurring while running tests using the TestCase class.

The following is a before/after of running a simple testcase with $this->assertTrue(true); with varying iteration counts (number of tests). Time is in seconds, memory usage is in MB. Compared is running the test using the TestCase class vs the PHPUnit_Framework_TestCase.

```
before
testcase	phpunit
it	time	memory	time	memory
50	1,8	23	0,2	3,25
500	14,4	172,75	0,3	4,25
5000	225,6	1632	1,7	14,25

after
testcase	phpunit
it	time	memory	time	memory
50	1,5	9	0,2	3,25
500	11,7	14	0,3	4,25
5000	119,4	58	1,7	14,25
```