Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding in a test case for lazy filter inheritance.

  • Loading branch information...
commit 93f7d7b5addd37d4c3b6acad02c303dd22270081 1 parent c7416ab
Joe Beeson joebeeson authored jails committed
10 tests/cases/util/collection/FiltersTest.php
View
@@ -63,6 +63,16 @@ public function testLazyApply() {
$result = $class::filteredMethod();
$this->assertEqual($expected, $result);
}
+
+ public function testLazyApplyInheritance() {
+ $class = 'lithium\tests\mocks\util\MockFilters';
+ $child = 'lithium\tests\mocks\util\MockFiltersExtended';
+ Filters::apply($class, 'filteredMethod', function($self, $params, $chain) {
+ return md5($chain->next($self, $params, $chain));
+ });
+ $this->assertEqual(md5('Working?'), $child::filteredMethod());
+ }
+
}
?>
7 tests/mocks/util/MockFiltersExtended.php
View
@@ -0,0 +1,7 @@
+<?php
+
+ namespace lithium\tests\mocks\util;
+
+ class MockFiltersExtended extends MockFilters {
+
+ }
Please sign in to comment.
Something went wrong with that request. Please try again.