IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2006, 5:29:19 PM (20 years ago)
Author:
jhoblitt
Message:

change Nebulous::Server instantiate objects (init -> new) instead of working with class data
add a DESTROY method to Nebulous::Server to tear down the database connection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/t/09_server_is_valid_class_id.t

    r5498 r10546  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 09_server_is_valid_class_id.t,v 1.1 2005-11-10 21:31:26 jhoblitt Exp $
     5# $Id: 09_server_is_valid_class_id.t,v 1.2 2006-12-08 03:29:19 jhoblitt Exp $
    66
    77use strict;
     
    1616use Test::Nebulous;
    1717
    18 my $neb = "Nebulous::Server";
    19 
    20 $neb->init(
     18my $neb = Nebulous::Server->new(
    2119    dsn         => "DBI:mysql:database=test:host=localhost",
    2220    dbuser      => "test",
     
    2422);
    2523
    26 *_is_valid_class_id = \&Nebulous::Server::_is_valid_class_id;
    27 
    2824Test::Nebulous->setup;
    2925
    3026# 0 is the default and is guarenteed to exist
    31 ok( _is_valid_class_id( 0 ), "default class id");
     27ok( $neb->_is_valid_class_id( 0 ), "default class id");
    3228
    3329Test::Nebulous->setup;
    3430
    3531# the test setup adds class id 1
    36 ok( _is_valid_class_id( 1 ), "custom class id");
     32ok( $neb->_is_valid_class_id( 1 ), "custom class id");
    3733
    3834Test::Nebulous->setup;
    3935
    40 is( _is_valid_class_id( 99 ), undef, "invalid class id");
     36is( $neb->_is_valid_class_id( 99 ), undef, "invalid class id");
    4137
    4238Test::Nebulous->cleanup;
Note: See TracChangeset for help on using the changeset viewer.