From: Peter Rabbitson Date: Sat, 16 May 2009 07:33:24 +0000 (+0000) Subject: Add default resultclass/resultsetclass to the entire test schema, as I am tired of... X-Git-Tag: v0.08103~77 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=660cf1be74795a5a5784f413741816413a724c1a;p=dbsrgits%2FDBIx-Class.git Add default resultclass/resultsetclass to the entire test schema, as I am tired of typing extra shit for debugging purposes --- diff --git a/t/66relationship.t b/t/66relationship.t index a7f8771..65093c4 100644 --- a/t/66relationship.t +++ b/t/66relationship.t @@ -62,10 +62,10 @@ is( $big_flop_cd->title, 'Big Flop', 'create_related ok' ); } my( $rs_from_list ) = $artist->search_related_rs('cds'); -is( ref($rs_from_list), 'DBIx::Class::ResultSet', 'search_related_rs in list context returns rs' ); +isa_ok( $rs_from_list, 'DBIx::Class::ResultSet', 'search_related_rs in list context returns rs' ); ( $rs_from_list ) = $artist->cds_rs(); -is( ref($rs_from_list), 'DBIx::Class::ResultSet', 'relation_rs in list context returns rs' ); +isa_ok( $rs_from_list, 'DBIx::Class::ResultSet', 'relation_rs in list context returns rs' ); # count_related is( $artist->count_related('cds'), 4, 'count_related ok' ); diff --git a/t/83cache.t b/t/83cache.t index 63de0d3..45f50c1 100644 --- a/t/83cache.t +++ b/t/83cache.t @@ -83,7 +83,7 @@ $artist = $rs->first; $rs->reset(); # make sure artist contains a related resultset for cds -is( ref $artist->{related_resultsets}->{cds}, 'DBIx::Class::ResultSet', 'artist has a related_resultset for cds' ); +isa_ok( $artist->{related_resultsets}{cds}, 'DBIx::Class::ResultSet', 'artist has a related_resultset for cds' ); # check if $artist->cds->get_cache is populated is( scalar @{$artist->cds->get_cache}, 3, 'cache for artist->cds contains correct number of records'); diff --git a/t/96multi_create.t b/t/96multi_create.t index 20b8c88..9cd754f 100644 --- a/t/96multi_create.t +++ b/t/96multi_create.t @@ -362,16 +362,16 @@ lives_ok ( sub { }); - ok( $cd_result && ref $cd_result eq 'DBICTest::CD', "Got Good CD Class"); + isa_ok( $cd_result, 'DBICTest::CD', "Got Good CD Class"); ok( $cd_result->title eq "TestOneCD1", "Got Expected Title"); my $tracks = $cd_result->tracks; - ok( ref $tracks eq "DBIx::Class::ResultSet", "Got Expected Tracks ResultSet"); + isa_ok( $tracks, 'DBIx::Class::ResultSet', 'Got Expected Tracks ResultSet'); foreach my $track ($tracks->all) { - ok( $track && ref $track eq 'DBICTest::Track', 'Got Expected Track Class'); + isa_ok( $track, 'DBICTest::Track', 'Got Expected Track Class'); } }, 'First create_related pass'); @@ -391,17 +391,17 @@ lives_ok ( sub { }); - ok( $cd_result && ref $cd_result eq 'DBICTest::CD', "Got Good CD Class"); + isa_ok( $cd_result, 'DBICTest::CD', "Got Good CD Class"); ok( $cd_result->title eq "TestOneCD2", "Got Expected Title"); ok( $cd_result->notes eq 'I can haz liner notes?', 'Liner notes'); my $tracks = $cd_result->tracks; - ok( ref $tracks eq "DBIx::Class::ResultSet", "Got Expected Tracks ResultSet"); + isa_ok( $tracks, 'DBIx::Class::ResultSet', "Got Expected Tracks ResultSet"); foreach my $track ($tracks->all) { - ok( $track && ref $track eq 'DBICTest::Track', 'Got Expected Track Class'); + isa_ok( $track, 'DBICTest::Track', 'Got Expected Track Class'); } }, 'second create_related with same arguments'); diff --git a/t/lib/DBICTest/BaseResult.pm b/t/lib/DBICTest/BaseResult.pm new file mode 100644 index 0000000..78de2a1 --- /dev/null +++ b/t/lib/DBICTest/BaseResult.pm @@ -0,0 +1,14 @@ +package #hide from pause + DBICTest::BaseResult; + +use strict; +use warnings; + +use base qw/DBIx::Class/; +use DBICTest::BaseResultSet; + +__PACKAGE__->load_components (qw/Core/); +__PACKAGE__->table ('bogus'); +__PACKAGE__->resultset_class ('DBICTest::BaseResultSet'); + +1; diff --git a/t/lib/DBICTest/BaseResultSet.pm b/t/lib/DBICTest/BaseResultSet.pm new file mode 100644 index 0000000..7269f30 --- /dev/null +++ b/t/lib/DBICTest/BaseResultSet.pm @@ -0,0 +1,9 @@ +package #hide from pause + DBICTest::BaseResultSet; + +use strict; +use warnings; + +use base qw/DBIx::Class::ResultSet/; + +1; diff --git a/t/lib/DBICTest/Schema/Artist.pm b/t/lib/DBICTest/Schema/Artist.pm index 959b4fc..b9794fe 100644 --- a/t/lib/DBICTest/Schema/Artist.pm +++ b/t/lib/DBICTest/Schema/Artist.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Artist; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('artist'); __PACKAGE__->source_info({ diff --git a/t/lib/DBICTest/Schema/ArtistUndirectedMap.pm b/t/lib/DBICTest/Schema/ArtistUndirectedMap.pm index c709572..1626787 100644 --- a/t/lib/DBICTest/Schema/ArtistUndirectedMap.pm +++ b/t/lib/DBICTest/Schema/ArtistUndirectedMap.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::ArtistUndirectedMap; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('artist_undirected_map'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Artwork.pm b/t/lib/DBICTest/Schema/Artwork.pm index 10e07ce..849096b 100644 --- a/t/lib/DBICTest/Schema/Artwork.pm +++ b/t/lib/DBICTest/Schema/Artwork.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Artwork; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('cd_artwork'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Artwork_to_Artist.pm b/t/lib/DBICTest/Schema/Artwork_to_Artist.pm index 0d832ca..0859080 100644 --- a/t/lib/DBICTest/Schema/Artwork_to_Artist.pm +++ b/t/lib/DBICTest/Schema/Artwork_to_Artist.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Artwork_to_Artist; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('artwork_to_artist'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/BindType.pm b/t/lib/DBICTest/Schema/BindType.pm index e92a777..5670f2f 100644 --- a/t/lib/DBICTest/Schema/BindType.pm +++ b/t/lib/DBICTest/Schema/BindType.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::BindType; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('bindtype_test'); diff --git a/t/lib/DBICTest/Schema/Bookmark.pm b/t/lib/DBICTest/Schema/Bookmark.pm index cac4841..bb32a14 100644 --- a/t/lib/DBICTest/Schema/Bookmark.pm +++ b/t/lib/DBICTest/Schema/Bookmark.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Bookmark; - use base 'DBIx::Class::Core'; + use base qw/DBICTest::BaseResult/; use strict; diff --git a/t/lib/DBICTest/Schema/BooksInLibrary.pm b/t/lib/DBICTest/Schema/BooksInLibrary.pm index 6c2d6aa..1f5d7ea 100644 --- a/t/lib/DBICTest/Schema/BooksInLibrary.pm +++ b/t/lib/DBICTest/Schema/BooksInLibrary.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::BooksInLibrary; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('books'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/CD.pm b/t/lib/DBICTest/Schema/CD.pm index 513dd65..ec6ab24 100644 --- a/t/lib/DBICTest/Schema/CD.pm +++ b/t/lib/DBICTest/Schema/CD.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::CD; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('cd'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/CD_to_Producer.pm b/t/lib/DBICTest/Schema/CD_to_Producer.pm index d8a9cc3..f0f14f0 100644 --- a/t/lib/DBICTest/Schema/CD_to_Producer.pm +++ b/t/lib/DBICTest/Schema/CD_to_Producer.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::CD_to_Producer; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('cd_to_producer'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Collection.pm b/t/lib/DBICTest/Schema/Collection.pm index 1c11dc6..e3df51f 100644 --- a/t/lib/DBICTest/Schema/Collection.pm +++ b/t/lib/DBICTest/Schema/Collection.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Collection; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('collection'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/CollectionObject.pm b/t/lib/DBICTest/Schema/CollectionObject.pm index d05ae5d..df43c9c 100644 --- a/t/lib/DBICTest/Schema/CollectionObject.pm +++ b/t/lib/DBICTest/Schema/CollectionObject.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::CollectionObject; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('collection_object'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Dummy.pm b/t/lib/DBICTest/Schema/Dummy.pm index 6bc51d6..2a8396d 100644 --- a/t/lib/DBICTest/Schema/Dummy.pm +++ b/t/lib/DBICTest/Schema/Dummy.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Dummy; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; use strict; use warnings; diff --git a/t/lib/DBICTest/Schema/Employee.pm b/t/lib/DBICTest/Schema/Employee.pm index 258cab9..9bf015a 100644 --- a/t/lib/DBICTest/Schema/Employee.pm +++ b/t/lib/DBICTest/Schema/Employee.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Employee; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->load_components(qw( Ordered )); diff --git a/t/lib/DBICTest/Schema/Encoded.pm b/t/lib/DBICTest/Schema/Encoded.pm index 9d09f31..7fd77dc 100644 --- a/t/lib/DBICTest/Schema/Encoded.pm +++ b/t/lib/DBICTest/Schema/Encoded.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Encoded; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; use strict; use warnings; diff --git a/t/lib/DBICTest/Schema/Event.pm b/t/lib/DBICTest/Schema/Event.pm index 0c02568..caecdc1 100644 --- a/t/lib/DBICTest/Schema/Event.pm +++ b/t/lib/DBICTest/Schema/Event.pm @@ -2,7 +2,7 @@ package DBICTest::Schema::Event; use strict; use warnings; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->load_components(qw/InflateColumn::DateTime/); diff --git a/t/lib/DBICTest/Schema/EventTZ.pm b/t/lib/DBICTest/Schema/EventTZ.pm index 1d5c06b..321b279 100644 --- a/t/lib/DBICTest/Schema/EventTZ.pm +++ b/t/lib/DBICTest/Schema/EventTZ.pm @@ -2,7 +2,7 @@ package DBICTest::Schema::EventTZ; use strict; use warnings; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->load_components(qw/InflateColumn::DateTime/); diff --git a/t/lib/DBICTest/Schema/EventTZDeprecated.pm b/t/lib/DBICTest/Schema/EventTZDeprecated.pm index 29695dd..8a9a11d 100644 --- a/t/lib/DBICTest/Schema/EventTZDeprecated.pm +++ b/t/lib/DBICTest/Schema/EventTZDeprecated.pm @@ -2,7 +2,7 @@ package DBICTest::Schema::EventTZDeprecated; use strict; use warnings; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->load_components(qw/InflateColumn::DateTime/); diff --git a/t/lib/DBICTest/Schema/FileColumn.pm b/t/lib/DBICTest/Schema/FileColumn.pm index cc425ee..82fcebd 100644 --- a/t/lib/DBICTest/Schema/FileColumn.pm +++ b/t/lib/DBICTest/Schema/FileColumn.pm @@ -3,7 +3,7 @@ DBICTest::Schema::FileColumn; use strict; use warnings; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; use File::Temp qw/tempdir/; __PACKAGE__->load_components(qw/InflateColumn::File/); diff --git a/t/lib/DBICTest/Schema/ForceForeign.pm b/t/lib/DBICTest/Schema/ForceForeign.pm index 82829b8..8e2daeb 100644 --- a/t/lib/DBICTest/Schema/ForceForeign.pm +++ b/t/lib/DBICTest/Schema/ForceForeign.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::ForceForeign; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('forceforeign'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/FourKeys.pm b/t/lib/DBICTest/Schema/FourKeys.pm index a1e23db..3fedb52 100644 --- a/t/lib/DBICTest/Schema/FourKeys.pm +++ b/t/lib/DBICTest/Schema/FourKeys.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::FourKeys; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('fourkeys'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/FourKeys_to_TwoKeys.pm b/t/lib/DBICTest/Schema/FourKeys_to_TwoKeys.pm index 6e86313..5387136 100644 --- a/t/lib/DBICTest/Schema/FourKeys_to_TwoKeys.pm +++ b/t/lib/DBICTest/Schema/FourKeys_to_TwoKeys.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::FourKeys_to_TwoKeys; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('fourkeys_to_twokeys'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Genre.pm b/t/lib/DBICTest/Schema/Genre.pm index db2ca9c..3b3675a 100644 --- a/t/lib/DBICTest/Schema/Genre.pm +++ b/t/lib/DBICTest/Schema/Genre.pm @@ -2,7 +2,7 @@ package DBICTest::Schema::Genre; use strict; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('genre'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Image.pm b/t/lib/DBICTest/Schema/Image.pm index 8df5add..16f94a9 100644 --- a/t/lib/DBICTest/Schema/Image.pm +++ b/t/lib/DBICTest/Schema/Image.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Image; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('images'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/LinerNotes.pm b/t/lib/DBICTest/Schema/LinerNotes.pm index 0c82588..5675f52 100644 --- a/t/lib/DBICTest/Schema/LinerNotes.pm +++ b/t/lib/DBICTest/Schema/LinerNotes.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::LinerNotes; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('liner_notes'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Link.pm b/t/lib/DBICTest/Schema/Link.pm index 5343122..bf6d623 100644 --- a/t/lib/DBICTest/Schema/Link.pm +++ b/t/lib/DBICTest/Schema/Link.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Link; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; use strict; use warnings; diff --git a/t/lib/DBICTest/Schema/LyricVersion.pm b/t/lib/DBICTest/Schema/LyricVersion.pm index d2f9769..2a409ab 100644 --- a/t/lib/DBICTest/Schema/LyricVersion.pm +++ b/t/lib/DBICTest/Schema/LyricVersion.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::LyricVersion; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('lyric_versions'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Lyrics.pm b/t/lib/DBICTest/Schema/Lyrics.pm index 3e4024e..268a553 100644 --- a/t/lib/DBICTest/Schema/Lyrics.pm +++ b/t/lib/DBICTest/Schema/Lyrics.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Lyrics; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('lyrics'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/NoPrimaryKey.pm b/t/lib/DBICTest/Schema/NoPrimaryKey.pm index 1edda61..cb79178 100644 --- a/t/lib/DBICTest/Schema/NoPrimaryKey.pm +++ b/t/lib/DBICTest/Schema/NoPrimaryKey.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::NoPrimaryKey; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('noprimarykey'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/OneKey.pm b/t/lib/DBICTest/Schema/OneKey.pm index 63356ac..bd0e148 100644 --- a/t/lib/DBICTest/Schema/OneKey.pm +++ b/t/lib/DBICTest/Schema/OneKey.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::OneKey; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('onekey'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Owners.pm b/t/lib/DBICTest/Schema/Owners.pm index acaf5ed..38aa025 100644 --- a/t/lib/DBICTest/Schema/Owners.pm +++ b/t/lib/DBICTest/Schema/Owners.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Owners; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('owners'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Producer.pm b/t/lib/DBICTest/Schema/Producer.pm index 26ecddb..c2fa611 100644 --- a/t/lib/DBICTest/Schema/Producer.pm +++ b/t/lib/DBICTest/Schema/Producer.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Producer; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('producer'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/SelfRef.pm b/t/lib/DBICTest/Schema/SelfRef.pm index ec715c7..edcfe6c 100644 --- a/t/lib/DBICTest/Schema/SelfRef.pm +++ b/t/lib/DBICTest/Schema/SelfRef.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::SelfRef; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('self_ref'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/SelfRefAlias.pm b/t/lib/DBICTest/Schema/SelfRefAlias.pm index e7ed491..2f7d105 100644 --- a/t/lib/DBICTest/Schema/SelfRefAlias.pm +++ b/t/lib/DBICTest/Schema/SelfRefAlias.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::SelfRefAlias; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('self_ref_alias'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/SequenceTest.pm b/t/lib/DBICTest/Schema/SequenceTest.pm index bea3f4b..b0fa515 100644 --- a/t/lib/DBICTest/Schema/SequenceTest.pm +++ b/t/lib/DBICTest/Schema/SequenceTest.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::SequenceTest; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('sequence_test'); __PACKAGE__->source_info({ diff --git a/t/lib/DBICTest/Schema/Serialized.pm b/t/lib/DBICTest/Schema/Serialized.pm index 687dcd1..92c210f 100644 --- a/t/lib/DBICTest/Schema/Serialized.pm +++ b/t/lib/DBICTest/Schema/Serialized.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Serialized; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('serialized'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Tag.pm b/t/lib/DBICTest/Schema/Tag.pm index b75c2ef..796616e 100644 --- a/t/lib/DBICTest/Schema/Tag.pm +++ b/t/lib/DBICTest/Schema/Tag.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Tag; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('tags'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Track.pm b/t/lib/DBICTest/Schema/Track.pm index ee07f5e..4966800 100644 --- a/t/lib/DBICTest/Schema/Track.pm +++ b/t/lib/DBICTest/Schema/Track.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::Track; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->load_components(qw/InflateColumn::DateTime Ordered/); __PACKAGE__->table('track'); diff --git a/t/lib/DBICTest/Schema/TreeLike.pm b/t/lib/DBICTest/Schema/TreeLike.pm index 365571d..a5413d1 100644 --- a/t/lib/DBICTest/Schema/TreeLike.pm +++ b/t/lib/DBICTest/Schema/TreeLike.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::TreeLike; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('treelike'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm b/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm index 89d8e0a..1ee8409 100644 --- a/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm +++ b/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::TwoKeyTreeLike; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('twokeytreelike'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/TwoKeys.pm b/t/lib/DBICTest/Schema/TwoKeys.pm index 69af2e6..bfb6c42 100755 --- a/t/lib/DBICTest/Schema/TwoKeys.pm +++ b/t/lib/DBICTest/Schema/TwoKeys.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::TwoKeys; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('twokeys'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/TypedObject.pm b/t/lib/DBICTest/Schema/TypedObject.pm index 6498add..50c5e44 100644 --- a/t/lib/DBICTest/Schema/TypedObject.pm +++ b/t/lib/DBICTest/Schema/TypedObject.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::TypedObject; -use base qw/DBIx::Class::Core/; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('typed_object'); __PACKAGE__->add_columns( diff --git a/t/lib/DBICTest/Schema/Year1999CDs.pm b/t/lib/DBICTest/Schema/Year1999CDs.pm index 580ed33..4aea122 100644 --- a/t/lib/DBICTest/Schema/Year1999CDs.pm +++ b/t/lib/DBICTest/Schema/Year1999CDs.pm @@ -2,7 +2,7 @@ package # hide from PAUSE DBICTest::Schema::Year1999CDs; ## Used in 104view.t -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; use DBIx::Class::ResultSource::View; __PACKAGE__->table_class('DBIx::Class::ResultSource::View'); diff --git a/t/lib/DBICTest/Schema/Year2000CDs.pm b/t/lib/DBICTest/Schema/Year2000CDs.pm index 5293c69..ebc4395 100644 --- a/t/lib/DBICTest/Schema/Year2000CDs.pm +++ b/t/lib/DBICTest/Schema/Year2000CDs.pm @@ -2,7 +2,7 @@ package # hide from PAUSE DBICTest::Schema::Year2000CDs; ## Used in 104view.t -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; use DBIx::Class::ResultSource::View; __PACKAGE__->table_class('DBIx::Class::ResultSource::View'); diff --git a/t/resultset_class.t b/t/resultset_class.t index 078c57b..f43a71e 100644 --- a/t/resultset_class.t +++ b/t/resultset_class.t @@ -11,7 +11,7 @@ plan tests => 5; use DBICTest; -is(DBICTest::Schema->source('Artist')->resultset_class, 'DBIx::Class::ResultSet', 'default resultset class'); +is(DBICTest::Schema->source('Artist')->resultset_class, 'DBICTest::BaseResultSet', 'default resultset class'); ok(!Class::Inspector->loaded('DBICNSTest::ResultSet::A'), 'custom resultset class not loaded'); DBICTest::Schema->source('Artist')->resultset_class('DBICNSTest::ResultSet::A'); ok(Class::Inspector->loaded('DBICNSTest::ResultSet::A'), 'custom resultset class loaded automatically');