Пример #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 $expected
  * @param null|array $properties
  * @dataProvider providerProcess
  */
 public function testProcess($expected, $properties = null)
 {
     $this->snippet->setCacheable(false);
     $result = $this->snippet->process($properties);
     $this->assertEquals($expected, $result, 'After processing the snippet, the expected result was different than the actual result.');
 }