|
|
@@ -134,7 +134,7 @@ class ViewVarsTraitTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * test setting $merge `false` overrides currect options.
|
|
|
+ * test setting $merge `false` overrides correct options.
|
|
|
*
|
|
|
* @return void
|
|
|
*/
|
|
|
@@ -177,6 +177,19 @@ class ViewVarsTraitTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * test that options are passed to the view builder when using createView().
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function testViewOptionsGetsToBuilder()
|
|
|
+ {
|
|
|
+ $this->subject->passedArgs = 'test';
|
|
|
+ $this->subject->createView();
|
|
|
+ $result = $this->subject->viewbuilder()->options();
|
|
|
+ $this->assertEquals(['passedArgs' => 'test'], $result);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* test createView() throws exception if view class cannot be found
|
|
|
*
|
|
|
* @expectedException \Cake\View\Exception\MissingViewException
|