capacity4dev/capacity4more — pull request #273 by zero2one (2014-12-05 10:29:20+00:00)
Title: Cleanup behat tests

Split of the big FeatureContext class in smaller parts by putting them in Traits.
This makes it easier to merge several branches that added/updated tests.

### Usage
* Put the custom context methods in Traits (located in the `FeatureContex` subfolder).
* Group them by functionality (Activity, Discussion, Document, …).
* Add new Traits to the FeatureContext by adding them to the requires list:
```
// Split FeatureContext in smaller chunks.
require __DIR__ . '/FeatureContext/Activity.php';
require __DIR__ . '/FeatureContext/Debug.php';
require __DIR__ . '/FeatureContext/Discussion.php';
require __DIR__ . '/FeatureContext/Document.php';
require __DIR__ . '/FeatureContext/Field.php';
require __DIR__ . '/FeatureContext/File.php';
require __DIR__ . '/FeatureContext/Group.php';
require __DIR__ . '/FeatureContext/GroupDashboard.php';
require __DIR__ . '/FeatureContext/Highlights.php';
require __DIR__ . '/FeatureContext/Node.php';
require __DIR__ . '/FeatureContext/NodeJs.php';
require __DIR__ . '/FeatureContext/Overview.php';
require __DIR__ . '/FeatureContext/PageAccess.php';
require __DIR__ . '/FeatureContext/QuickPost.php';
require __DIR__ . '/FeatureContext/Search.php';
require __DIR__ . '/FeatureContext/User.php';
require __DIR__ . '/FeatureContext/Wait.php';
```

* Add new Traits to the FeatureContext class by adding them to the use list:
```
/**
* Split context file in smaller parts to make merging easier.
*/
use FeatureContext\Activity;
use FeatureContext\Debug;
use FeatureContext\Discussion;
use FeatureContext\Document;
use FeatureContext\Field;
use FeatureContext\File;
use FeatureContext\Group;
use FeatureContext\GroupDashboard;
use FeatureContext\Highlights;
use FeatureContext\Node;
use FeatureContext\NodeJs;
use FeatureContext\Overview;
use FeatureContext\PageAccess;
use FeatureContext\QuickPost;
use FeatureContext\Search;
use FeatureContext\User;
use FeatureContext\Wait;
```

### Warning:
The Traits are namespaced:
```
namespace FeatureContext;
```

This means that the usage of any not-namespace object (Exception, EntityQuery), in those traits, needs to be prefixed with a single backslash:
```
throw new \Exception('…');

$query = new \entityFieldQuery();
```