StringLoaderTest.php 645 B

12345678910111213141516171819202122232425
  1. <?php
  2. /*
  3. * This file is part of Mustache.php.
  4. *
  5. * (c) 2010-2014 Justin Hileman
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * @group unit
  12. */
  13. class Mustache_Test_Loader_StringLoaderTest extends PHPUnit_Framework_TestCase
  14. {
  15. public function testLoadTemplates()
  16. {
  17. $loader = new Mustache_Loader_StringLoader;
  18. $this->assertEquals('foo', $loader->load('foo'));
  19. $this->assertEquals('{{ bar }}', $loader->load('{{ bar }}'));
  20. $this->assertEquals("\n{{! comment }}\n", $loader->load("\n{{! comment }}\n"));
  21. }
  22. }