Added tests for chained sqlt_deploy_hook()'s
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Track.pm
index a57fcb5..6360ca0 100644 (file)
@@ -4,7 +4,11 @@ package # hide from PAUSE
 use base qw/DBICTest::BaseResult/;
 use Carp qw/confess/;
 
-__PACKAGE__->load_components(qw/InflateColumn::DateTime Ordered/);
+__PACKAGE__->load_components(qw{
+    +DBICTest::DeployComponent
+    InflateColumn::DateTime
+    Ordered
+});
 
 __PACKAGE__->table('track');
 __PACKAGE__->add_columns(
@@ -90,4 +94,13 @@ __PACKAGE__->might_have (
   }
 );
 
+our $hook_cb;
+
+sub sqlt_deploy_hook {
+  my $class = shift;
+
+  $hook_cb->($class, @_) if $hook_cb;
+  $class->next::method(@_) if $class->next::can;
+}
+
 1;