Test::Mock::MongoDB::MongoClient - mock module for MongoDB::MongoClient class.
You can get test mock object like so:
use Test::Mock::MongoDB qw( any ); my $mock = Test::Mock::MongoDB->new; my $m_client = $mock->get_client;
Current module mocks MongoDB::MongoClient class.
By default mocks methods new() and get_database(). Or skips this method if skip_init passed as true.
new()
get_database()
skip_init
cono <cono@cpan.org>
Copyright 2014 - cono
Artistic v2.0
Test::Mock::MongoDB
To install Test::Mock::MongoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Mock::MongoDB
CPAN shell
perl -MCPAN -e shell install Test::Mock::MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.