public function testGetContent() { $storage = new StringStorage('foo'); $this->assertInstanceOf('Symfony\\Component\\Templating\\Storage\\Storage', $storage, 'StringStorage is an instance of Storage'); $storage = new StringStorage('foo'); $this->assertEquals('foo', $storage->getContent(), '->getContent() returns the content of the template'); }
public function load(TemplateReferenceInterface $template) { if (isset($this->templates[$template->getLogicalName()])) { $storage = new StringStorage($this->templates[$template->getLogicalName()]); return 'string:' . $storage->getContent(); } return false; }