Show
Ignore:
Timestamp:
07/02/08 21:59:58 (17 months ago)
Author:
bchoate
Message:

Test updates to skip when appropriate.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-41/t/53-grouptsync.t

    r1098 r2679  
    22 
    33use strict; 
    4 use MT::Author; 
     4use lib 't/lib', 'extlib', 'lib', '../lib', '../extlib'; 
    55use MT; 
    6 use strict; 
    7 use MT::Auth; 
     6use Test::More; 
    87 
    98my $number = 25; 
    109 
    11 use Test::More tests => 25; 
    12  
    13 use MT; 
    14  
    1510use vars qw( $DB_DIR $T_CFG ); 
    16 use lib 't/lib', 'extlib', 'lib', '../lib', '../extlib'; 
    17 use MT::Test qw(:db :data); 
     11use MT::Test; 
     12 
     13my $mt = MT->instance; 
     14 
     15if ( !$mt->component('enterprise') ) { 
     16    plan skip_all => "Enterprise pack is not installed."; 
     17} else { 
     18    plan tests => $number; 
     19} 
    1820 
    1921SKIP: { 
     
    2729} 
    2830 
    29 my $mt = MT->new( Config => $T_CFG ) or die MT->errstr; 
     31MT::Test->import( qw(:db :data) ); 
     32 
     33require MT::Author; 
     34require MT::Auth; 
     35require MT::Auth::LDAP; 
     36 
    3037if (!MT::ConfigMgr->instance->LDAPUserIdAttribute) { 
    3138    print "Set LDAPUserIdAttribute directive or this test will fail.\n"; 
     
    180187} 
    181188     
    182 use MT::Auth; 
    183 use MT::Auth::LDAP; 
    184  
    185189sub ldapadd_user { 
    186190    my (%opt) = @_;