Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Test::RedisDB(3)      User Contributed Perl Documentation     Test::RedisDB(3)

NAME
       Test::RedisDB - start redis-server for testing

SYNOPSIS
	   use Test::RedisDB;

	   my $test_server = Test::RedisDB->new;
	   my $redis = $test_server->redisdb_client;
	   $redis->set('foo', 1);
	   my $res = $redis->get('foo');

DESCRIPTION
       This module allows you to start an instance of redis-server for testing
       your modules that use RedisDB.

METHODS
   $class->new(%options)
       start a new redis-server	instance, return Test::RedisDB object tied to
       this instance. Accepts the following options:

       password

       server should require a password	to connect

   $self->start
       start the server. You only need to call this method if you stopped the
       server using the	stop method

   $self->stop
       stop the	server

   $self->host
       return hostname or address, at the moment always	'localhost'

   $self->port
       return port number on which server accept connections

   $self->redisdb_client(%options)
       return a	new RedisDB client object connected to the test	server,
       %options	passed to RedisDB constructor

   $self->url
       return URL for the server

AUTHOR
       Pavel Shaydo, "<zwon at cpan.org>"

LICENSE	AND COPYRIGHT
       Copyright 2011-2016 Pavel Shaydo.

       This program is free software; you can redistribute it and/or modify it
       under the terms of either: the GNU General Public License as published
       by the Free Software Foundation;	or the Artistic	License.

       See http://dev.perl.org/licenses/ for more information.

perl v5.32.0			  2016-11-16		      Test::RedisDB(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | AUTHOR | LICENSE AND COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Test::RedisDB&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help