MustacheTest.php 713 B

12345678910111213141516171819202122232425
  1. <?php
  2. /*
  3. * This file is part of the symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Tests\Framework\WebBundle\Util;
  11. use Symfony\Framework\WebBundle\Util\Mustache;
  12. class MustacheTest extends \PHPUnit_Framework_TestCase
  13. {
  14. public function testRenderString()
  15. {
  16. $template = 'Hi {{ you }}, my name is {{ me }}!';
  17. $expected = 'Hi {{ you }}, my name is Kris!';
  18. $this->assertEquals(Mustache::renderString($template, array('me' => 'Kris')), $expected, '::renderString() does not modify unknown parameters');
  19. }
  20. }