From: Devin Austin Date: Fri, 21 Jan 2011 00:52:58 +0000 (-0700) Subject: initial order loading tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd4d5fc7ff23227c04e77d21cf3379e9ef769700;p=dbsrgits%2FDBIx-Class.git initial order loading tests --- diff --git a/t/39load_namespaces_5.t b/t/39load_namespaces_5.t new file mode 100644 index 0000000..348c0bf --- /dev/null +++ b/t/39load_namespaces_5.t @@ -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 index 0000000..799cc4e --- /dev/null +++ b/t/lib/DBICNSTest/Result/MROOrder.pm @@ -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 index 0000000..511169c --- /dev/null +++ b/t/lib/DBICNSTest/ResultSet/MROOrder.pm @@ -0,0 +1,3 @@ +package DBICNSTest::ResultSet::MROOrder; +use base qw/DBIx::Class::ResultSet/; +1;