Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (19 sloc) 762 Bytes
BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
use strict;
use warnings;
use Test::More;
use DBICTest;
my $warnings;
eval {
local $SIG{__WARN__} = sub { $warnings .= shift };
package DBICTest::Schema;
use base qw/DBIx::Class::Schema/;
__PACKAGE__->load_classes;
};
ok(!$@, 'Loaded all loadable classes') or diag $@;
like($warnings, qr/Failed to load DBICTest::Schema::NoSuchClass. Can't find source_name method. Is DBICTest::Schema::NoSuchClass really a full DBIC result class?/, 'Warned about broken result class');
my $source_a = DBICTest::Schema->source('Artist');
isa_ok($source_a, 'DBIx::Class::ResultSource::Table');
my $rset_a = DBICTest::Schema->resultset('Artist');
isa_ok($rset_a, 'DBIx::Class::ResultSet');
done_testing;
Something went wrong with that request. Please try again.