2007-02-23 06:31:32 +01:00
|
|
|
# Before `make install' is performed this script should be runnable with
|
|
|
|
# `make test'. After `make install' it should work as `perl Lemonldap-NG-Portal.t'
|
|
|
|
|
|
|
|
#########################
|
|
|
|
|
|
|
|
# change 'tests => 1' to 'tests => last_test_to_print';
|
|
|
|
|
2009-02-19 09:06:59 +01:00
|
|
|
package My::Portal;
|
|
|
|
|
|
|
|
use Test::More tests => 3;
|
2007-04-15 14:44:29 +02:00
|
|
|
BEGIN { use_ok('Lemonldap::NG::Portal::CDA') }
|
2009-02-19 09:06:59 +01:00
|
|
|
our @ISA = ('Lemonldap::NG::Portal::CDA');
|
2007-02-23 06:31:32 +01:00
|
|
|
|
2009-02-19 09:06:59 +01:00
|
|
|
# skipping SharedConf::getConf
|
|
|
|
sub getConf {
|
|
|
|
return Lemonldap::NG::Portal::Simple::getConf(@_);
|
|
|
|
}
|
|
|
|
|
|
|
|
# CGI Environment
|
|
|
|
$ENV{SCRIPT_NAME} = '/test.pl';
|
|
|
|
$ENV{SCRIPT_FILENAME} = '/tmp/test.pl';
|
|
|
|
$ENV{REQUEST_METHOD} = 'GET';
|
|
|
|
$ENV{REQUEST_URI} = '/';
|
|
|
|
$ENV{QUERY_STRING} = '';
|
|
|
|
|
|
|
|
ok(
|
|
|
|
$p = My::Portal->new(
|
|
|
|
{
|
|
|
|
globalStorage => 'Apache::Session::File',
|
|
|
|
domain => 'example.com',
|
|
|
|
cookieName => 'lemonldap',
|
|
|
|
}
|
|
|
|
),
|
|
|
|
'Portal object'
|
|
|
|
);
|
2007-02-23 06:31:32 +01:00
|
|
|
|
2009-06-15 16:13:09 +02:00
|
|
|
ok( $p->{cda}, 'CDA is set' );
|
2007-02-23 06:31:32 +01:00
|
|
|
|