NAME

OpenGuides::Test - Methods to help test OpenGuides applications.

DESCRIPTION

Provides methods to help when writing tests for OpenGuides. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers.

SYNOPSIS

use OpenGuides;
use OpenGuides::Test;

my $config = OpenGuides::Test->make_basic_config;
$config->default_language( "nl" );

my $guide = OpenGuides->new( config => $config );

OpenGuides::Test->write_data(
                              guide      => $guide,
                              node       => "Crabtree Tavern",
                              os_x       => 523465,
                              os_y       => 177490,
                              categories => "Pubs",
                            );

METHODS

make_basic_config
my $config = OpenGuides::Test->make_basic_config;
$config->default_language( "nl" );

Makes an OpenGuides::Config object with needed fields pre-filled. You can mess with it as you like then.

write_data
my $config = OpenGuides::Test->make_basic_config;
my $guide = OpenGuides->new( config => $config );

OpenGuides::Test->write_data(
                              guide      => $guide,
                              node       => "Crabtree Tavern",
                              os_x       => 523465,
                              os_y       => 177490,
                              categories => "Pubs\r\nPub Food",
                            );

You can supply values for the following keys: content, categories, locales, os_x, os_y, osie_x, osie_y, latitude, longitude. You should supply them exactly as they would come from a CGI form, eg lines in a textarea are separated by \r\n.

AUTHOR

The OpenGuides Project (openguides-dev@openguides.org)

COPYRIGHT

Copyright (C) 2004 The OpenGuides Project.  All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.