Updating branch to current revision
[catagits/Catalyst-Runtime.git] / trunk / t / aggregate / unit_core_component_mro.t
diff --git a/trunk/t/aggregate/unit_core_component_mro.t b/trunk/t/aggregate/unit_core_component_mro.t
new file mode 100644 (file)
index 0000000..8e9a064
--- /dev/null
@@ -0,0 +1,29 @@
+use Test::More tests => 1;
+use strict;
+use warnings;
+
+{
+  package MyApp::Component;
+  use Test::More;
+
+  sub COMPONENT {
+    fail 'This no longer gets dispatched to';
+  }
+
+  package MyApp::MyComponent;
+
+  use base 'Catalyst::Component', 'MyApp::Component';
+
+}
+
+my $warn = '';
+{
+  local $SIG{__WARN__} = sub {
+    $warn .= $_[0];
+  };
+  MyApp::MyComponent->COMPONENT('MyApp');
+}
+
+like($warn, qr/after Catalyst::Component in MyApp::Component/,
+    'correct warning thrown');
+