Browse files

Adding test for lazy loading helpers in views

  • Loading branch information...
1 parent f009e96 commit c270e7ffda72c7ec3e3474abf413236d30c4cd05 @lorenzo lorenzo committed Mar 27, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 lib/Cake/Test/Case/View/ViewTest.php
View
14 lib/Cake/Test/Case/View/ViewTest.php
@@ -797,6 +797,20 @@ public function testLoadHelpers() {
$this->assertInstanceOf('FormHelper', $View->Form, 'Object type is wrong.');
}
+
+/**
+ * test lazy loading helpers
+ *
+ * @return void
+ */
+ public function testLazyLoadHelpers() {
+ $View = new View($this->PostsController);
+
+ $View->helpers = array();
+ $this->assertInstanceOf('HtmlHelper', $View->Html, 'Object type is wrong.');
+ $this->assertInstanceOf('FormHelper', $View->Form, 'Object type is wrong.');
+ }
+
/**
* test the correct triggering of helper callbacks
*

0 comments on commit c270e7f

Please sign in to comment.