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')); }
/** * @param string $environment * * @return self $this */ public function setEnvironment($environment) { $this->pug->setCustomOption('environment', $environment); return $this; }
/** * 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'); }