Exemplo n.º 1
0
 public function testHtmlContent()
 {
     $theme = Theme::load('test');
     $content = Content::load($theme, 'html-content.htm');
     $this->assertEquals('<a href="#">Stephen Saucier</a> changed his profile picture &mdash; <small>7 hrs ago</small></div>', $content->markup);
     $this->assertEquals('<a href="#">Stephen Saucier</a> changed his profile picture &mdash; <small>7 hrs ago</small></div>', $content->parsedMarkup);
 }
Exemplo n.º 2
0
 public function onSave()
 {
     if (!$this->checkEditor()) {
         return;
     }
     $fileName = post('file');
     $template = Content::load($this->getTheme(), $fileName);
     $template->fill(['markup' => post('content')]);
     $template->save();
 }