From 83e8d7ca127b4d8210061e90f3a2a53a5c2729bf Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 10 Dec 2009 19:49:28 -0800 Subject: [PATCH] More tests. --- t/Definition.t | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/t/Definition.t b/t/Definition.t index c6df91b60..e73d2cf07 100644 --- a/t/Definition.t +++ b/t/Definition.t @@ -26,6 +26,9 @@ my $called_getProperties; property 'property1' => ( arbitrary_key => 'arbitrary_value', ); + property 'property2' => ( + nother_key => 'nother_value', + ); # attributes create methods ::can_ok +__PACKAGE__, 'attribute1'; @@ -41,6 +44,12 @@ my $called_getProperties; # can retreive property metadata ::is +__PACKAGE__->getProperty('property1')->form->{'arbitrary_key'}, 'arbitrary_value', 'arbitrary keys mapped into the form attribute'; + ::cmp_deeply( + +__PACKAGE__->getProperties, + [qw/property1 property2/], + 'getProperties works as a class method' + ); + } { @@ -74,7 +83,13 @@ my $called_getProperties; ::cmp_deeply( $object->meta->get_property_list, [qw/property2 property1/], - 'get_property_list returns properties in insertion order' + '->meta->get_property_list returns properties in insertion order' + ); + + ::cmp_deeply( + $object->getProperties, + [qw/property2 property1/], + 'getProperties is an alias for ->meta->get_property_list' ); }