Пример #1
0
 public function testEngineOptions()
 {
     $jade = new Jade(array('terse' => false, 'indentChar' => '@'));
     $compiler = new Compiler($jade);
     $jade->setCustomOption('foo', 'bar');
     $this->assertFalse($compiler->getOption('terse'));
     $this->assertSame('@', $compiler->getOption('indentChar'));
     $this->assertSame('bar', $compiler->getOption('foo'));
 }
Пример #2
0
 /**
  * @param  string $environment
  *
  * @return self   $this
  */
 public function setEnvironment($environment)
 {
     $this->pug->setCustomOption('environment', $environment);
     return $this;
 }
Пример #3
0
 /**
  * setCustomOption test
  */
 public function testSetCustomOption()
 {
     $jade = new Jade();
     $jade->setCustomOption('i-do-not-exists', 'right');
     $this->assertSame($jade->getOption('i-do-not-exists'), 'right', 'getOption should return custom setting');
 }