From: David Kamholz Date: Thu, 23 Nov 2006 00:02:14 +0000 (+0000) Subject: trivial test cleanup X-Git-Tag: v0.08010~150^2~126 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=11357d09a80364da23aefbb5650da15a768505a8;p=dbsrgits%2FDBIx-Class.git trivial test cleanup --- diff --git a/t/40resultsetmanager.t b/t/40resultsetmanager.t index e9f1dc0..8389291 100644 --- a/t/40resultsetmanager.t +++ b/t/40resultsetmanager.t @@ -17,7 +17,7 @@ BEGIN { use DBICTest::ResultSetManager; # uses Class::Inspector -my $schema = DBICTest::ResultSetManager->compose_namespace('DB', 'foo'); +my $schema = DBICTest::ResultSetManager->compose_namespace('DB'); my $rs = $schema->resultset('Foo'); ok( !DB::Foo->can('bar'), 'Foo class does not have bar method' ); diff --git a/t/lib/DBICTest/Schema/FourKeys.pm b/t/lib/DBICTest/Schema/FourKeys.pm index cdffa2f..6038c94 100644 --- a/t/lib/DBICTest/Schema/FourKeys.pm +++ b/t/lib/DBICTest/Schema/FourKeys.pm @@ -3,25 +3,25 @@ package # hide from PAUSE use base 'DBIx::Class::Core'; -DBICTest::Schema::FourKeys->table('fourkeys'); -DBICTest::Schema::FourKeys->add_columns( +__PACKAGE__->table('fourkeys'); +__PACKAGE__->add_columns( 'foo' => { data_type => 'integer' }, 'bar' => { data_type => 'integer' }, 'hello' => { data_type => 'integer' }, 'goodbye' => { data_type => 'integer' }, 'sensors' => { data_type => 'character' }, ); -DBICTest::Schema::FourKeys->set_primary_key(qw/foo bar hello goodbye/); +__PACKAGE__->set_primary_key(qw/foo bar hello goodbye/); -DBICTest::Schema::FourKeys->has_many( - 'fourkeys_to_twokeys', 'DBICTest::Schema::FourKeys_to_TwoKeys', { +__PACKAGE__->has_many( + 'fourkeys_to_twokeys', '__PACKAGE___to_TwoKeys', { 'foreign.f_foo' => 'self.foo', 'foreign.f_bar' => 'self.bar', 'foreign.f_hello' => 'self.hello', 'foreign.f_goodbye' => 'self.goodbye', }); -DBICTest::Schema::FourKeys->many_to_many( +__PACKAGE__->many_to_many( 'twokeys', 'fourkeys_to_twokeys', 'twokeys', ); diff --git a/t/lib/DBICTest/Schema/LinerNotes.pm b/t/lib/DBICTest/Schema/LinerNotes.pm index 168f311..0c82588 100644 --- a/t/lib/DBICTest/Schema/LinerNotes.pm +++ b/t/lib/DBICTest/Schema/LinerNotes.pm @@ -3,8 +3,8 @@ package # hide from PAUSE use base qw/DBIx::Class::Core/; -DBICTest::Schema::LinerNotes->table('liner_notes'); -DBICTest::Schema::LinerNotes->add_columns( +__PACKAGE__->table('liner_notes'); +__PACKAGE__->add_columns( 'liner_id' => { data_type => 'integer', }, @@ -13,8 +13,8 @@ DBICTest::Schema::LinerNotes->add_columns( size => 100, }, ); -DBICTest::Schema::LinerNotes->set_primary_key('liner_id'); -DBICTest::Schema::LinerNotes->belongs_to( +__PACKAGE__->set_primary_key('liner_id'); +__PACKAGE__->belongs_to( 'cd', 'DBICTest::Schema::CD', 'liner_id' ); diff --git a/t/lib/DBICTest/Schema/NoPrimaryKey.pm b/t/lib/DBICTest/Schema/NoPrimaryKey.pm index 1723390..1edda61 100644 --- a/t/lib/DBICTest/Schema/NoPrimaryKey.pm +++ b/t/lib/DBICTest/Schema/NoPrimaryKey.pm @@ -3,13 +3,13 @@ package # hide from PAUSE use base 'DBIx::Class::Core'; -DBICTest::Schema::NoPrimaryKey->table('noprimarykey'); -DBICTest::Schema::NoPrimaryKey->add_columns( +__PACKAGE__->table('noprimarykey'); +__PACKAGE__->add_columns( 'foo' => { data_type => 'integer' }, 'bar' => { data_type => 'integer' }, 'baz' => { data_type => 'integer' }, ); -DBICTest::Schema::NoPrimaryKey->add_unique_constraint(foo_bar => [ qw/foo bar/ ]); +__PACKAGE__->add_unique_constraint(foo_bar => [ qw/foo bar/ ]); 1; diff --git a/t/lib/DBICTest/Schema/OneKey.pm b/t/lib/DBICTest/Schema/OneKey.pm index 4cc2918..63356ac 100644 --- a/t/lib/DBICTest/Schema/OneKey.pm +++ b/t/lib/DBICTest/Schema/OneKey.pm @@ -3,8 +3,8 @@ package # hide from PAUSE use base 'DBIx::Class::Core'; -DBICTest::Schema::OneKey->table('onekey'); -DBICTest::Schema::OneKey->add_columns( +__PACKAGE__->table('onekey'); +__PACKAGE__->add_columns( 'id' => { data_type => 'integer', is_auto_increment => 1, @@ -16,7 +16,7 @@ DBICTest::Schema::OneKey->add_columns( data_type => 'integer', }, ); -DBICTest::Schema::OneKey->set_primary_key('id'); +__PACKAGE__->set_primary_key('id'); 1; diff --git a/t/lib/DBICTest/Schema/Serialized.pm b/t/lib/DBICTest/Schema/Serialized.pm index 41610da..687dcd1 100644 --- a/t/lib/DBICTest/Schema/Serialized.pm +++ b/t/lib/DBICTest/Schema/Serialized.pm @@ -3,11 +3,11 @@ package # hide from PAUSE use base 'DBIx::Class::Core'; -DBICTest::Schema::Serialized->table('serialized'); -DBICTest::Schema::Serialized->add_columns( +__PACKAGE__->table('serialized'); +__PACKAGE__->add_columns( 'id' => { data_type => 'integer' }, 'serialized' => { data_type => 'text' }, ); -DBICTest::Schema::Serialized->set_primary_key('id'); +__PACKAGE__->set_primary_key('id'); 1;