Skip to content

Commit

Permalink
Test set and get vars by View\Simple
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Jul 27, 2016
1 parent c58d716 commit 0d55a36
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/integration/Mvc/View/SimpleCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@
*/
class SimpleCest
{
public function testSetVars(IntegrationTester $I)
{
$I->wantToTest('Set and get View vars');

$view = new Simple;
$view->setViewsDir(PATH_DATA . 'views/');

$I->assertNull($view->getVar('some_var'));
$some_var = time();
$view->setParamToView('some_var', $some_var);


$I->assertNull($view->getVar('another_var'));
$another_var = uniqid();
$view->setVar('another_var', $another_var);

$I->assertEquals($some_var, $view->getVar('some_var'));
$I->assertEquals($another_var, $view->getVar('another_var'));
}

public function testRenderWithCache(IntegrationTester $I)
{
$I->wantToTest('Render by using simple view with cache');
Expand Down

0 comments on commit 0d55a36

Please sign in to comment.