initial order loading tests
Devin Austin [Fri, 21 Jan 2011 00:52:58 +0000 (17:52 -0700)]
t/39load_namespaces_5.t [new file with mode: 0644]
t/lib/DBICNSTest/Result/MROOrder.pm [new file with mode: 0644]
t/lib/DBICNSTest/ResultSet/MROOrder.pm [new file with mode: 0644]

diff --git a/t/39load_namespaces_5.t b/t/39load_namespaces_5.t
new file mode 100644 (file)
index 0000000..348c0bf
--- /dev/null
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More;
+
+use lib qw(t/lib);
+use DBICTest; # do not remove even though it is not used
+
+my $warnings;
+eval {
+    local $SIG{__WARN__} = sub { $warnings .= shift };
+    package DBICNSTest;
+    use base qw/DBIx::Class::Schema/;
+    __PACKAGE__->load_namespaces;
+};
+my $source_mro_order = DBICNSTest->source('MROOrder');
+isa_ok($source_mro_order , 'DBIx::Class::ResultSource::Table');
+
+done_testing();
diff --git a/t/lib/DBICNSTest/Result/MROOrder.pm b/t/lib/DBICNSTest/Result/MROOrder.pm
new file mode 100644 (file)
index 0000000..799cc4e
--- /dev/null
@@ -0,0 +1,8 @@
+package DBICNSTest::Result::MROOrder;
+use base qw/DBIx::Class::Core/;
+use DBICNSTest::ResultSet::MROOrder;
+__PACKAGE__->table('mroorder');
+__PACKAGE__->add_columns('mroorder');
+__PACKAGE__->resultset_class ('DBICNSTest::ResultSet::MROOrder');
+__PACKAGE__->result_source_instance->inject_resultset_components(['+A::Useless', '+A::MoarUseless']);
+1;
diff --git a/t/lib/DBICNSTest/ResultSet/MROOrder.pm b/t/lib/DBICNSTest/ResultSet/MROOrder.pm
new file mode 100644 (file)
index 0000000..511169c
--- /dev/null
@@ -0,0 +1,3 @@
+package DBICNSTest::ResultSet::MROOrder;
+use base qw/DBIx::Class::ResultSet/;
+1;