示例#1
0
 /**
  * Prepare the element and get the static openTo path if needed
  *
  * @return void|string
  */
 public function prepareElement()
 {
     $this->snippetArray['openTo'] = '/';
     if (!empty($this->snippetArray['static'])) {
         $file = $this->snippet->get('static_file');
         $this->snippetArray['openTo'] = dirname($file) . '/';
     }
     return $this->snippetArray['openTo'];
 }
示例#2
0
 /**
  * @param string $content
  * @dataProvider providerSetContent
  * @depends testGetContent
  */
 public function testSetContent($content)
 {
     $this->snippet->setContent($content);
     $this->assertEquals($content, $this->snippet->get('snippet'));
 }