Question: I have some test under features directory. But when I try to run `behat` I get the following error:

```
$ ls
behat.yml  features

$ behat
PHP Warning:  Module 'memcache' already loaded in Unknown on line 0
PHP Warning:  require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory in $HOME/workspace/ums/api/trunk/tests/functional/features/bootstrap/FeatureContext.php on line 24
PHP Fatal error:  require_once(): Failed opening required 'PHPUnit/Autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in $HOME/workspace/ums/api/trunk/tests/functional/features/bootstrap/FeatureContext.php on line 24

```

Since PHPUnit is no longer available to install using PEAR, I finally use [Composer](https://getcomposer.org/). So have my PHPUnit libraries installed under 

```
$ sudo find / -name  PHPUnit
/HOME/.composer/vendor/phpunit/phpunit/PHPUnit
/HOME/.composer/vendor/phpunit/phpunit-mock-objects/PHPUnit
/tmp/ZendFramework-1.11.0/library/Zend/Test/PHPUnit
/tmp/ZendFramework-1.11.0/tests/Zend/Test/PHPUnit
/usr/share/php/Zend/Test/PHPUnit
/usr/share/php/Zend-2.0/Test/PHPUnit

```

Which is the best way to set `include_path` without changing `php.ini` file and not use `set_include_path()` method in each `FeatureContext.php` example type class ?

Any help would be appreciated!

Answer: 
I ran into the same error using phpunit along with Behat, I did manage to overcome it with the following code:

```
require_once __DIR__.'/../../vendor/autoload.php';
require_once __DIR__.'/../../vendor/phpunit/phpunit/src/Framework/Assert/Functions.php';

```

Given that the 'bootstrap' folder is only one two folders away from the root of the project. Hopes it helps.

Usually I have PHPUnit installed globally (via composer) on my dev and test (CI server) machines so I wont run into any trouble when running the tests. Also, in order to have the auto completion properly working of my favorite IDE (PhpStorm) I include the library in the composer.json of the project as a dev requirement. In the case of a project that uses Behat and is developed by a team the best way is to include it in the project so no developer would run into trouble when running the test.
You want to use the autoloader that comes with composer. Try adding

```
require_once 'path/to/vendor/autoload.php'

```

before using PHPUnit