Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebBundle] Fixed issue in Mustache when a value is not provided for …
…a token.
- Loading branch information
1 parent
9313e26
commit c6f21e4
Showing
2 changed files
with
33 additions
and
3 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
25 changes: 25 additions & 0 deletions
25
tests/Symfony/Tests/Framework/WebBundle/Util/MustacheTest.php
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,25 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien.potencier@symfony-project.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Tests\Framework\WebBundle\Util; | ||
|
||
use Symfony\Framework\WebBundle\Util\Mustache; | ||
|
||
class MustacheTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
public function testRenderString() | ||
{ | ||
$template = 'Hi {{ you }}, my name is {{ me }}!'; | ||
$expected = 'Hi {{ you }}, my name is Kris!'; | ||
|
||
$this->assertEquals(Mustache::renderString($template, array('me' => 'Kris')), $expected, '::renderString() does not modify unknown parameters'); | ||
} | ||
} |