Merge 'DBIx-Class-current' into 'find_compat'
Daniel Westermann-Clark [Thu, 25 May 2006 23:00:39 +0000 (23:00 +0000)]
r9322@fortuna (orig r1831):  jguenther | 2006-05-25 17:12:00 -0400
Squashed an extraneous warning in 82cascade_copy.t and fixed up 26dumper.t
r9323@fortuna (orig r1832):  jguenther | 2006-05-25 17:17:57 -0400
Changed tests to use DBICTest->init_schema() instead of DBICTest::init_schema()

28 files changed:
t/19quotes.t
t/26dumper.t
t/31stats.t
t/64db.t
t/65multipk.t
t/66relationship.t
t/67pager.t
t/68inflate.t
t/68inflate_has_a.t
t/68inflate_serialize.t
t/69update.t
t/70auto.t
t/75limit.t
t/76joins.t
t/77join_count.t
t/78self_referencial.t
t/79uuid.t
t/80unique.t
t/81transactions.t
t/82cascade_copy.t
t/83cache.t
t/84serialize.t
t/85utf8.t
t/86might_have.t
t/87ordered.t
t/88result_set_column.t
t/89dbicadmin.t
t/cdbi-sweet-t/08pager.t

index 1275db1..be18f2d 100644 (file)
@@ -14,7 +14,7 @@ BEGIN {
 use lib qw(t/lib);
 
 use_ok('DBICTest');
-DBICTest::init_schema();
+DBICTest->init_schema();
 
 DBICTest->schema->storage->sql_maker->quote_char("'");
 DBICTest->schema->storage->sql_maker->name_sep('.');
index 6904fdc..ddb4a00 100644 (file)
@@ -10,27 +10,30 @@ use lib qw(t/lib);
 BEGIN {
     eval "use DBD::SQLite";
     plan $ENV{DATA_DUMPER_TEST}
-        ? ( tests => 3 )
+        ? ( tests => 2 )
         : ( skip_all => 'Set $ENV{DATA_DUMPER_TEST} to run this test' );
 }
 
 
 use_ok('DBICTest');
-use_ok('DBICTest::HelperRels');
 
-
-my $rs = DBICTest::CD->search(
-           { 'artist.name' => 'We Are Goth',
-             'liner_notes.notes' => 'Kill Yourself!' },
-           { join => [ qw/artist liner_notes/ ] });
+my $schema = DBICTest->init_schema();
+my $rs = $schema->resultset('CD')->search({
+  'artist.name' => 'We Are Goth',
+  'liner_notes.notes' => 'Kill Yourself!',
+}, {
+  join => [ qw/artist liner_notes/ ],
+});
 
 Dumper($rs);
 
-$rs = DBICTest::CD->search(
-           { 'artist.name' => 'We Are Goth',
-             'liner_notes.notes' => 'Kill Yourself!' },
-           { join => [ qw/artist liner_notes/ ] });
+$rs = $schema->resultset('CD')->search({
+  'artist.name' => 'We Are Goth',
+  'liner_notes.notes' => 'Kill Yourself!',
+}, {
+  join => [ qw/artist liner_notes/ ],
+});
 
-cmp_ok( $rs + 0, '==', 1, "Single record in after death with dumper");
+cmp_ok( $rs->count(), '==', 1, "Single record in after death with dumper");
 
 1;
index b358ef0..59aeb9e 100644 (file)
@@ -14,7 +14,7 @@ BEGIN {
 use lib qw(t/lib);
 
 use_ok('DBICTest');
-DBICTest::init_schema();
+DBICTest->init_schema();
 
 my $cbworks = 0;
 
index 5208614..d9c03aa 100644 (file)
--- a/t/64db.t
+++ b/t/64db.t
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 3;
 
index 5cea1fd..4499b49 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 4;
 
index 45ed343..dce68f7 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 32;
 
index 85b1e8d..267927d 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 12;
 
index 3906a02..b730253 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 eval { require DateTime };
 plan skip_all => "Need DateTime for inflation tests" if $@;
index 266585a..1346ce5 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 eval { require DateTime };
 plan skip_all => "Need DateTime for inflation tests" if $@;
index b51f961..5eed843 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 use Data::Dumper;
 
index 70d7038..3372b4f 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 BEGIN {
         eval "use DBD::SQLite";
index b108369..440c943 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 2;
 
index 98d3b64..0fc7e3a 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 BEGIN {
     eval "use DBD::SQLite";
index 069626a..c697254 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 use IO::File;
 
index 499b08f..f46ad04 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 eval "use DBD::SQLite";
 plan skip_all => 'needs DBD::SQLite for testing' if $@;
index 5759aca..640cbc2 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 # this test will check to see if you can have 2 columns
 # in the same class pointing at the same other class
index 04fcca6..1a3061d 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 eval 'use Data::UUID ; 1'
   or plan skip_all => 'Install Data::UUID run this test';
index 9d7634c..30767d2 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 34;
 
index c9d9c62..847963e 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 39;
 
index e5048a1..26b8425 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 4;
 my $artist = $schema->resultset('Artist')->find(1);
@@ -14,7 +14,7 @@ my $artist_cds = $artist->search_related('cds');
 my $cover_band;
 
 {
-  no warnings 'redefine';
+  no warnings qw(redefine once);
   local *DBICTest::Artist::result_source_instance = \&DBICTest::Schema::Artist::result_source_instance;
 
   $cover_band = $artist->copy;
index 39f782a..78113b3 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 my $queries;
 $schema->storage->debugcb( sub{ $queries++ } );
index d79acba..a8cedf0 100644 (file)
@@ -6,7 +6,7 @@ use lib qw(t/lib);
 use DBICTest;
 use Storable;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 1;
 
index c0f39ed..562efb4 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 eval 'use Encode ; 1'
     or plan skip_all => 'Install Encode run this test';
index 1d4af78..81cbf84 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 my $queries;
 #$schema->storage->debugfh(IO::File->new('t/var/temp.trace', 'w'));
index 1e4f33a..b1d484c 100644 (file)
@@ -6,7 +6,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 321;
 
index 5ed86d4..936a0a7 100644 (file)
@@ -5,7 +5,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 plan tests => 8; 
 
index a411eb7..0b1d1f5 100644 (file)
@@ -6,7 +6,7 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
 eval 'require JSON';
 plan skip_all => 'Install JSON to run this test' if ($@);
index e105932..71ccaed 100644 (file)
@@ -16,7 +16,7 @@ BEGIN {
 use lib 't/lib';
 
 use_ok('DBICTest');
-DBICTest::init_schema();
+DBICTest->init_schema();
 
 DBICTest::CD->load_components(qw/CDBICompat::Pager/);