Created
December 11, 2009 16:53
-
-
Save perlDreamer/254339 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
package WGT::Class::AlsoAsset; | |
use WebGUI::Definition::Asset; | |
attribute tableName => 'asset'; | |
property 'property1' => (); | |
property 'property2' => (); | |
property 'property3' => (); | |
package WGT::Class::Asset::Snippet; | |
use WebGUI::Definition::Asset; | |
extends 'WGT::Class::AlsoAsset'; | |
attribute tableName => 'snippet'; | |
property 'property10' => (); | |
property 'property11' => (); | |
package main; | |
foreach my $attr(WGT::Class::Asset::Snippet->meta->get_all_attributes) { | |
diag join ' ', $attr->insertion_order, $attr->name; | |
} | |
cmp_deeply( | |
WGT::Class::Asset::Snippet->getProperties, | |
[qw/property1 property2 property3 property10 property11/], | |
'checking inheritance of properties by name, insertion order' | |
); | |
cmp_deeply( | |
WGT::Class::Asset::Snippet->meta->get_property_list, | |
[qw/property3 property4 property1 property2/], | |
'checking inheritance of properties by name, insertion order' | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment