Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…' => false`
  • Loading branch information...
commit beb85d6d11a9e05a7b07a79e49bd5a16244dc8b1 1 parent 1d3986f
@dereuromark authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php
View
19 lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php
@@ -208,6 +208,25 @@ public function testHelperOrderPrecedence() {
}
/**
+ * 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
*
* @return void
Please sign in to comment.
Something went wrong with that request. Please try again.