HelperTest.php 823 B

12345678910111213141516171819202122232425262728293031323334
  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\Components\Templating\Helper;
  11. require_once __DIR__.'/../../../bootstrap.php';
  12. use Symfony\Components\Templating\Helper\Helper;
  13. class HelperTest extends \PHPUnit_Framework_TestCase
  14. {
  15. public function testGetSetCharset()
  16. {
  17. $helper = new ProjectTemplateHelper();
  18. $helper->setCharset('ISO-8859-1');
  19. $this->assertTrue('ISO-8859-1' === $helper->getCharset(), '->setCharset() sets the charset set related to this helper');
  20. }
  21. }
  22. class ProjectTemplateHelper extends Helper
  23. {
  24. public function getName()
  25. {
  26. return 'foo';
  27. }
  28. }