Skip to content

Commit

Permalink
prove that options are passed to the viewBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
antograssiot committed Sep 4, 2015
1 parent ae8e7cb commit 5bbf227
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/TestCase/View/ViewVarsTraitTest.php
Expand Up @@ -134,7 +134,7 @@ public function testReadingViewOptions()
}

/**
* test setting $merge `false` overrides currect options.
* test setting $merge `false` overrides correct options.
*
* @return void
*/
Expand Down Expand Up @@ -176,6 +176,19 @@ public function testUptoDateViewVars()
$this->assertEquals($expected, $this->subject->createView()->viewVars);
}

/**
* 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
*
Expand Down

0 comments on commit 5bbf227

Please sign in to comment.