install_script 'script/dbicadmin';
-tests "t/*.t t/*/*.t";
+tests_recursive 't';
# re-build README and require CDBI modules for testing if we're in a checkout
}
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
use Film;
}
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 6);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
INIT { @Film::Threat::ISA = qw/Film/; }
}
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
use Lazy;
}
#local $SIG{__WARN__} = sub { };
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
use Film;
use Director;
}
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
use Actor;
Actor->has_a(Film => 'Film');
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 13);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
sub create_trigger2 { ::ok(1, "Running create trigger 2"); }
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 50);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Actor;
use Film;
Film->has_many(actors => 'Actor');
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 23);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
sub valid_rating {
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 22);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
use Blurb;
INIT {
#local $SIG{__WARN__} =
#sub { like $_[0], qr/clashes with built-in method/, $_[0] };
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
require Film;
require Actor;
require Director;
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 5);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
require Film;
require Order;
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 41);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
use Director;
@YA::Film::ISA = 'Film';
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 20);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
use Actor;
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 37);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
my $it_class = "DBIx::Class::ResultSet";
eval { require Time::Piece::MySQL };
plan skip_all => "Need Time::Piece::MySQL for this test" if $@;
-eval { require 't/testlib/Log.pm' };
+eval { require 't/cdbi/testlib/Log.pm' };
plan skip_all => "Need MySQL for this test" if $@;
plan tests => 2;
-use Test::More;\r
-\r
-BEGIN {\r
- eval "use DBIx::Class::CDBICompat;";\r
- plan $@ ? (skip_all => 'Class::Trigger and DBIx::ContextualFetch required') : (tests=> 2);\r
-}\r
-\r
-use strict;\r
-\r
-use lib 't/testlib';\r
-use Actor;\r
-use ActorAlias;\r
-Actor->has_many( aliases => [ 'ActorAlias' => 'alias' ] );\r
-\r
-my $first = Actor->create( { Name => 'First' } );\r
-my $second = Actor->create( { Name => 'Second' } );\r
-\r
-ActorAlias->create( { actor => $first, alias => $second } );\r
-\r
-my @aliases = $first->aliases;\r
-\r
-is( scalar @aliases, 1, 'proper number of aliases' );\r
-is( $aliases[ 0 ]->name, 'Second', 'proper alias' );\r
-\r
-\r
+use Test::More;
+
+BEGIN {
+ eval "use DBIx::Class::CDBICompat;";
+ plan $@ ? (skip_all => 'Class::Trigger and DBIx::ContextualFetch required') : (tests=> 2);
+}
+
+use strict;
+
+use lib 't/cdbi/testlib';
+use Actor;
+use ActorAlias;
+Actor->has_many( aliases => [ 'ActorAlias' => 'alias' ] );
+
+my $first = Actor->create( { Name => 'First' } );
+my $second = Actor->create( { Name => 'Second' } );
+
+ActorAlias->create( { actor => $first, alias => $second } );
+
+my @aliases = $first->aliases;
+
+is( scalar @aliases, 1, 'proper number of aliases' );
+is( $aliases[ 0 ]->name, 'Second', 'proper alias' );
+
+
}
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
use Film;
use Director;
}
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
: (tests => 6);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
require Film;
sub Film::accessor_name_for {
-use strict;\r
-use Test::More;\r
-\r
-BEGIN {\r
- eval "use DBIx::Class::CDBICompat;";\r
- if ($@) {\r
- plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required');\r
- next;\r
- }\r
- eval "use DBD::SQLite";\r
- plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 6);\r
-}\r
-\r
-use lib 't/testlib';\r
-use Film;\r
-\r
-my @film = (\r
- Film->create({ Title => 'Film 1' }),\r
- Film->create({ Title => 'Film 2' }),\r
- Film->create({ Title => 'Film 3' }),\r
- Film->create({ Title => 'Film 4' }),\r
- Film->create({ Title => 'Film 5' }),\r
-);\r
-\r
-# first page\r
-my ( $pager, $it ) = Film->page(\r
- {},\r
- { rows => 3,\r
- page => 1 }\r
-);\r
-\r
-is( $pager->entries_on_this_page, 3, "entries_on_this_page ok" );\r
-\r
-is( $pager->next_page, 2, "next_page ok" );\r
-\r
-is( $it->next->title, "Film 1", "iterator->next ok" );\r
-\r
-$it->next;\r
-$it->next;\r
-\r
-is( $it->next, undef, "next past end of page ok" );\r
-\r
-# second page\r
-( $pager, $it ) = Film->page( \r
- {},\r
- { rows => 3,\r
- page => 2 }\r
-);\r
-\r
-is( $pager->entries_on_this_page, 2, "entries on second page ok" );\r
-\r
-is( $it->next->title, "Film 4", "second page first title ok" );\r
+use strict;
+use Test::More;
+
+BEGIN {
+ eval "use DBIx::Class::CDBICompat;";
+ if ($@) {
+ plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required');
+ next;
+ }
+ eval "use DBD::SQLite";
+ plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 6);
+}
+
+use lib 't/cdbi/testlib';
+use Film;
+
+my @film = (
+ Film->create({ Title => 'Film 1' }),
+ Film->create({ Title => 'Film 2' }),
+ Film->create({ Title => 'Film 3' }),
+ Film->create({ Title => 'Film 4' }),
+ Film->create({ Title => 'Film 5' }),
+);
+
+# first page
+my ( $pager, $it ) = Film->page(
+ {},
+ { rows => 3,
+ page => 1 }
+);
+
+is( $pager->entries_on_this_page, 3, "entries_on_this_page ok" );
+
+is( $pager->next_page, 2, "next_page ok" );
+
+is( $it->next->title, "Film 1", "iterator->next ok" );
+
+$it->next;
+$it->next;
+
+is( $it->next, undef, "next past end of page ok" );
+
+# second page
+( $pager, $it ) = Film->page(
+ {},
+ { rows => 3,
+ page => 2 }
+);
+
+is( $pager->entries_on_this_page, 2, "entries on second page ok" );
+
+is( $it->next->title, "Film 4", "second page first title ok" );
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 7);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
Film->create_test_film;
plan tests => 19;
}
-my $DB = "t/testdb";
+my $DB = "t/var/cdbi_testdb";
unlink $DB if -e $DB;
my @DSN = ("dbi:SQLite:dbname=$DB", '', '', { AutoCommit => 0 });
-#!/usr/bin/perl -w
-
use Test::More;
use strict;
}
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
use Film;
}
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
use Test::Warn;
: ('no_plan');
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
my $waves = Film->insert({
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
}
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
use Film;
}
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
}
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
}
{
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Director;
# Test that has_many() will load the foreign class.
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 2);
}
-use lib 't/testlib';
+use lib 't/cdbi/testlib';
use Film;
Film->create({
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
}
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
require Film;
}
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
}
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
use Film;
}
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
}
INIT {
- use lib 't/testlib';
+ use lib 't/cdbi/testlib';
use Film;
}
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
-#!/usr/bin/perl -w
-
use strict;
use Test::More;
use Test::Exception;
package # hide from PAUSE
Actor;
-BEGIN { unshift @INC, './t/testlib'; }
-
use strict;
use warnings;
-package # hide from PAUSE \r
- ActorAlias;\r
-\r
-BEGIN { unshift @INC, './t/testlib'; }\r
-\r
-use strict;\r
-use warnings;\r
-\r
-use base 'DBIx::Class::Test::SQLite';\r
-\r
-__PACKAGE__->set_table( 'ActorAlias' );\r
-\r
-__PACKAGE__->columns( Primary => 'id' );\r
-__PACKAGE__->columns( All => qw/ actor alias / );\r
-__PACKAGE__->has_a( actor => 'Actor' );\r
-__PACKAGE__->has_a( alias => 'Actor' );\r
-\r
-sub create_sql {\r
- return qq{\r
- id INTEGER PRIMARY KEY,\r
- actor INTEGER,\r
- alias INTEGER\r
- }\r
-}\r
-\r
-1;\r
-\r
+package # hide from PAUSE
+ ActorAlias;
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class::Test::SQLite';
+
+__PACKAGE__->set_table( 'ActorAlias' );
+
+__PACKAGE__->columns( Primary => 'id' );
+__PACKAGE__->columns( All => qw/ actor alias / );
+__PACKAGE__->has_a( actor => 'Actor' );
+__PACKAGE__->has_a( alias => 'Actor' );
+
+sub create_sql {
+ return qq{
+ id INTEGER PRIMARY KEY,
+ actor INTEGER,
+ alias INTEGER
+ }
+}
+
+1;
+
package # hide from PAUSE
Binary;
-BEGIN { unshift @INC, './t/testlib'; }
-
use strict;
use base 'PgBase';
package # hide from PAUSE
Blurb;
-BEGIN { unshift @INC, './t/testlib'; }
-
use strict;
use base 'DBIx::Class::Test::SQLite';
package # hide from PAUSE
Director;
-BEGIN { unshift @INC, './t/testlib'; }
-
use strict;
use base 'DBIx::Class::Test::SQLite';
package # hide from PAUSE
Film;
-BEGIN { unshift @INC, './t/testlib'; }
use base 'DBIx::Class::Test::SQLite';
use strict;
package # hide from PAUSE
Lazy;
-BEGIN { unshift @INC, './t/testlib'; }
use base 'DBIx::Class::Test::SQLite';
use strict;
package # hide from PAUSE
Log;
-BEGIN { unshift @INC, './t/testlib'; }
use base 'MyBase';
use strict;
package # hide from PAUSE
MyFilm;
-BEGIN { unshift @INC, './t/testlib'; }
use base 'MyBase';
use MyStarLink;
package # hide from PAUSE
MyFoo;
-BEGIN { unshift @INC, './t/testlib'; }
use base 'MyBase';
use strict;
package # hide from PAUSE
MyStar;
-BEGIN { unshift @INC, './t/testlib'; }
use base 'MyBase';
use strict;
package # hide from PAUSE
MyStarLink;
-BEGIN { unshift @INC, './t/testlib'; }
use base 'MyBase';
use strict;
package # hide from PAUSE
MyStarLinkMCPK;
-BEGIN { unshift @INC, './t/testlib'; }
use base 'MyBase';
use MyStar;
package # hide from PAUSE
Order;
-BEGIN { unshift @INC, './t/testlib'; }
-
use strict;
use base 'DBIx::Class::Test::SQLite';