Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / 107obj_result_class.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
91fe73bc 3package ResultClassInflator;
4
5sub new { bless {}, __PACKAGE__ }
6
71;
8
9package main;
10
11use strict;
12use warnings;
13
14use Test::More tests => 6;
15use Test::Exception;
c0329273 16
91fe73bc 17use DBICTest;
18
19my $schema = DBICTest->init_schema();
20
21my $source = $schema->source('CD');
22
23lives_ok {
24 $source->result_class('ResultClassInflator');
25 is($source->result_class => 'ResultClassInflator', "result_class gives us back class");
26 is($source->get_component_class('result_class') => 'ResultClassInflator',
27 "and so does get_component_class");
28
29 } 'Result class still works with class';
30lives_ok {
31 my $obj = ResultClassInflator->new();
32 $source->result_class($obj);
33 is($source->result_class => $obj, "result_class gives us back obj");
34 is($source->get_component_class('result_class') => $obj, "and so does get_component_class");
35 } 'Result class works with object';
36
37done_testing;