Exemplo n.º 1
0
 /**
  * Generates partials to add to the layout
  * This is a placeholder incase we want to add in the future
  *
  * @return string
  */
 protected function generatePartials()
 {
     $partials = $this->handlebars->getPartials();
     foreach ($partials as $name => $partial) {
         $partials[$name] = sprintf(self::BLOCK_OPTIONS_HASH_KEY_VALUE, $name, "'" . str_replace("'", '\\\'', $partial) . "'");
     }
     return $this->prettyPrint(self::BLOCK_OPTIONS_OPEN) . $this->prettyPrint('\\r\\t') . implode($this->prettyPrint(',\\r\\t'), $partials) . $this->prettyPrint(self::BLOCK_OPTIONS_CLOSE);
 }
Exemplo n.º 2
0
 /**
  * @covers Cradle\Handlebars\HandlebarsHandler::getPartials
  */
 public function testGetPartials()
 {
     $partials = $this->object->getPartials();
     $this->assertTrue(is_array($partials));
 }