Example #1
0
 /**
  * @covers Cradle\Handlebars\HandlebarsHandler::i
  */
 public function testI()
 {
     $actual = HandlebarsHandler::i();
     $this->assertInstanceOf('Cradle\\Handlebars\\HandlebarsHandler', $actual);
 }
 /**
  * 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);
 }
Example #3
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     //reset the helpers and partials after every test
     HandlebarsHandler::i()->reset();
 }