Permalink
Browse files

adding a test to show that merging can be disabled using `'HelperName…

…' => false`
  • Loading branch information...
1 parent 1d3986f commit beb85d6d11a9e05a7b07a79e49bd5a16244dc8b1 @dereuromark committed Jul 31, 2012
Showing with 19 additions and 0 deletions.
  1. +19 −0 lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php
@@ -207,6 +207,25 @@ public function testHelperOrderPrecedence() {
$this->assertSame($expected, $Controller->helpers, 'Order is incorrect.');
}
+/**
+ * Test that merging can be disabled using `'HelperName' => false`
+ *
+ * @return void
+ */
+ public function testHelperDisabledMerge() {
+ $Controller = new MergeVariablesController();
+ $Controller->helpers = array('Html' => false, 'Custom', 'Foo' => array('something'));
+ $Controller->constructClasses();
+
+ $expected = array(
+ 'Html' => false,
+ 'MergeVar' => array('format' => 'html', 'terse'),
+ 'Custom' => null,
+ 'Foo' => array('something')
+ );
+ $this->assertSame($expected, $Controller->helpers, 'Order is incorrect.');
+ }
+
/**
* test merging of vars with plugin
*

0 comments on commit beb85d6

Please sign in to comment.