From c6d6882f4ad0ec3cd618d9d41ac99174f9c3ec27 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 24 Sep 2009 21:34:34 -0500 Subject: [PATCH] starting on a test kid for the new cache library --- t/Cache.t | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 t/Cache.t diff --git a/t/Cache.t b/t/Cache.t new file mode 100644 index 000000000..e526e7085 --- /dev/null +++ b/t/Cache.t @@ -0,0 +1,49 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2009 Plain Black Corporation. +#------------------------------------------------------------------- +# Please read the legal notices (docs/legal.txt) and the license +# (docs/license.txt) that came with this distribution before using +# this software. +#------------------------------------------------------------------ +# http://www.plainblack.com info@plainblack.com +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Cache; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +plan tests => 3; # Increment this number for each test you create + +#---------------------------------------------------------------------------- + +my $cache = WebGUI::Cache->new($session); +isa_ok($cache, 'WebGUI::Cache'); +is($cache->parseKey("andy"), $session->config->getFilename.":andy", "parseKey single key"); +is($cache->parseKey(["andy","red"]), $session->config->getFilename.":andy:red", "parseKey composite key"); + + + + +#---------------------------------------------------------------------------- +# Cleanup +END { + +} +#vim:ft=perl