I used WP_Mock
for a long time, until I built Brain Monkey to overcome some problems I found working with it.
Using Brain Monkey you can:
use Brain\Monkey\Functions;
Functions::when('get_adjacent_post')->alias(function() {
// mock here...
});
or
Functions::expect('get_adjacent_post')
->atLeast()
->once()
->with( true, '', true, 'topic' )
->andReturnUsing(function( $in_same_term, $excluded_terms, $previous ) {
// mock here
});
This latter syntax comes from Mockery.
Brain Monkey, just like WP_Mock, has an API to also mock WordPress hooks.