HelperTest.php 781 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.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\Component\Templating\Tests\Helper;
  11. use Symfony\Component\Templating\Helper\Helper;
  12. class HelperTest extends \PHPUnit_Framework_TestCase
  13. {
  14. public function testGetSetCharset()
  15. {
  16. $helper = new ProjectTemplateHelper();
  17. $helper->setCharset('ISO-8859-1');
  18. $this->assertTrue('ISO-8859-1' === $helper->getCharset(), '->setCharset() sets the charset set related to this helper');
  19. }
  20. }
  21. class ProjectTemplateHelper extends Helper
  22. {
  23. public function getName()
  24. {
  25. return 'foo';
  26. }
  27. }