Skip to content

Commit

Permalink
added unit test for with tag
Browse files Browse the repository at this point in the history
  • Loading branch information
agopaul authored and speedmax committed Aug 11, 2010
1 parent dcdce3a commit 2a73322
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/tags_spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,15 @@ function should_provide_variable_loop_in_for_block() {
expects($rs)->should_be('odd2odd4odd');
}
}

class Describe_with_tag extends SimpleSpec {

function should_return_nested_items() {
$context = array('granfather'=> array('father'=> array('child'=> 'mike')));
$rs = h2o('{% with granfather.father.child as child %}{{ child }}{% endwith %}')->render($context);
expects($rs)->should_be('mike');
}

}

?>

0 comments on commit 2a73322

Please sign in to comment.