Added two calls to PHPUnit_Framework_TestResult::endTestSuite() from PHPUnit_Framework_TestSuite::run() to make sure test suites are ended properly when an exception (e.g. PHPUnit_Framework_SkippedTestError) in a test's setUpBeforeClass() method
When one test creates a mock object, sets staticExpectation and throws an unexpected exception afterwards, the state of the mock object class, which is saved in a static member variable, is not cleaned up before invoking the next test. This can cause the next test which sets another staticExpectation on the same class to fail.

See https://github.com/sebastianbergmann/phpunit/issues/1143 for more details and an example test that demonstrates this issue.

The fix is to clean up the mock objects' state after each test is run or an exception is caught.
Merge pull request #1145 from HappyRay/cleanupMockObjectState

The state in mocked static objects is not cleaned up when an exception is caught by PHPUnit
Merge pull request #1008 from michieldewit/3.7

Added two calls to PHPUnit_Framework_TestResult::endTestSuite() from PHP...
Move comment to right position
I cannot find any usage of ext/simplexml or ext/tokenizer in PHPUnit itself
The ctype extension is required
ext/json is not really optional
Merge branch '3.7' into 4.0
Merge branch '4.0' into 4.1
Merge branch '4.1'