Move get_tables from Meta/Class into Meta/Asset. s/getTables/meta->get_tables/;

This commit is contained in:
Colin Kuskie 2010-01-04 15:34:24 -08:00
parent b72e3a1cd1
commit ce3edcf743
8 changed files with 74 additions and 38 deletions

View file

@ -128,6 +128,12 @@ use WebGUI::Test;
my $object2 = __PACKAGE__->new(tableName => 'notAsset');
::is $object2->tableName, 'asset', 'tableName ignored in constructor';
::cmp_deeply(
[ __PACKAGE__->meta->get_tables ],
[qw/asset/],
'get_tables works for a simple asset'
);
}
{
@ -188,6 +194,18 @@ use WebGUI::Test;
'checking inheritance of properties by name, insertion order'
);
::cmp_deeply(
[ WGT::Class::AlsoAsset->meta->get_tables ],
[qw/asset/],
'get_tables: checking inheritance'
);
::cmp_deeply(
[ WGT::Class::Asset::Snippet->meta->get_tables ],
[qw/asset snippet/],
'get_tables: checking inheritance on subclass'
);
}
{
@ -214,10 +232,4 @@ use WebGUI::Test;
'checking inheritance of properties by name, insertion order with an overridden property'
);
cmp_deeply(
[WGT::Class::Asset::NotherOne->meta->get_tables],
[qw/asset snippet/],
'get_tables returns both tables'
);
}