How to get Wp_Mock (https://github.com/10up/wp_mock) set up inside Codeception (https://github.com/codeception/codeception):
Have a composer.json file inside the /tests/
directory (which is itself inside the plugin or theme directory);
Then follow the manual (https://github.com/10up/wp_mock#installation):
$ composer require --dev 10up/wp_mock:dev-master
Inside /tests/unit/_bootstrap.php include the Composer autoloader:
require_once __DIR__ . '/../vendor/autoload.php';
If it doesn't work you can add something to output a dummy test string inside /vendor/autoload.php
:
print_r('test');
... and run your Codeception tests:
$ codecept run unit
The 'test' should show up somewhere in the output. If it doesn't then you're not including the file properly inside your _bootstrap.php
; play with it unti you get the string showing up when the Codeception tests are run.