highly extensible, highly enjoyable, BDD testing framework for PHP.
Peridot is able to safely use $this inside of test closures because of scopes. Scopes allow us to place state on a test without conflicts.
Scopes also allow mixing in behavior to tests via a powerful concept called child scopes. Consider the following:
By mixing the WebDriverScope in to our test's scopes, we have made the following possible in our tests:
Scopes are a powerful concept, and one that should be used liberally to simplify your tests. You can use them to easily include helpers and behavior for your tests, whether that is across the entire suite, or for a few select tests.