Behat/Mink — pull request #347 by neochief (2013-06-05 13:14:19+00:00)
Title: __wakeup() should reset session list, since they are most likely outdated.

Here's the scenario where you get this problem:
1. You run the parallel test suite (either with gearman or with SG runner).
2. In your client class, you get the test results as a bunch of serialized event classes, which also have references to Mink, which makes it serialized as well.
3. Parallel workers end their Mink sessions just fine, but then unserialized Mink instance in client, which have references to the same sessions, throw exceptions during their __destruct() stage, because they can't stop sessions, which are already finished.

The solution is to just strip session list in Mink during unserialization.