-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
125 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
class GrandParentContext extends Mustache { | ||
public $grand_parent_id = 'grand_parent1'; | ||
public $parent_contexts = array(); | ||
|
||
public function __construct() { | ||
parent::__construct(); | ||
|
||
$this->parent_contexts[] = array('parent_id' => 'parent1', 'child_contexts' => array( | ||
array('child_id' => 'parent1-child1'), | ||
array('child_id' => 'parent1-child2') | ||
)); | ||
|
||
$parent2 = new stdClass(); | ||
$parent2->parent_id = 'parent2'; | ||
$parent2->child_contexts = array( | ||
array('child_id' => 'parent2-child1'), | ||
array('child_id' => 'parent2-child2') | ||
); | ||
|
||
$this->parent_contexts[] = $parent2; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
examples/grand_parent_context/grand_parent_context.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{grand_parent_id}} | ||
{{#parent_contexts}} | ||
{{grand_parent_id}} | ||
{{parent_id}} | ||
{{#child_contexts}} | ||
{{grand_parent_id}} | ||
{{parent_id}} | ||
{{child_id}} | ||
{{/child_contexts}} | ||
{{/parent_contexts}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
grand_parent1 | ||
grand_parent1 | ||
parent1 | ||
grand_parent1 | ||
parent1 | ||
parent1-child1 | ||
grand_parent1 | ||
parent1 | ||
parent1-child2 | ||
grand_parent1 | ||
parent2 | ||
grand_parent1 | ||
parent2 | ||
parent2-child1 | ||
grand_parent1 | ||
parent2 | ||
parent2-child2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit colors="true"> | ||
<testsuite name="Mustache"> | ||
<directory>./</directory> | ||
</testsuite> | ||
</phpunit> |
f6c4473
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset custom delimiters between successive calls to render()
PHPUnit config file and additional tests.