Esempio n. 1
0
 public function testGetSetCharset()
 {
     $helper = new SlotsHelper();
     $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, array($helper));
     $this->assertEquals('UTF-8', $engine->getCharset(), 'EngineInterface::getCharset() returns UTF-8 by default');
     $this->assertEquals('UTF-8', $helper->getCharset(), 'HelperInterface::getCharset() returns UTF-8 by default');
     $engine->setCharset('ISO-8859-1');
     $this->assertEquals('ISO-8859-1', $engine->getCharset(), 'EngineInterface::setCharset() changes the default charset to use');
     $this->assertEquals('ISO-8859-1', $helper->getCharset(), 'EngineInterface::setCharset() changes the default charset of helper');
 }
Esempio n. 2
0
 public function testGetSetCharset()
 {
     $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader);
     $this->assertEquals('UTF-8', $engine->getCharset(), '->getCharset() returns UTF-8 by default');
     $engine->setCharset('ISO-8859-1');
     $this->assertEquals('ISO-8859-1', $engine->getCharset(), '->setCharset() changes the default charset to use');
 }