Ejemplo n.º 1
0
 /**
  * Set html5 mode
  * @param bool $state
  * @return $this
  */
 public function html5($state)
 {
     if (method_exists($this->doc, 'setHtml5')) {
         $this->doc->setHtml5((bool) $state);
     }
     return $this;
 }
 /**
  * We test both at once
  *
  * @return  void
  */
 public function testIsAndSetHtml5()
 {
     // Check true
     $this->object->setHtml5(true);
     $this->assertThat($this->object->isHtml5(), $this->isTrue(), 'JDocumentHtml::setHtml5(true) did not work');
     // Check false
     $this->object->setHtml5(false);
     $this->assertThat($this->object->isHtml5(), $this->isFalse(), 'JDocumentHtml::setHtml5(false) did not work');
     // Check non-boolean
     $this->object->setHtml5('non boolean');
     $this->assertThat($this->object->isHtml5(), $this->logicalNot($this->equalTo('non boolean')), "JDocumentHtml::setHtml5('non boolean') did not work");
 }
Ejemplo n.º 3
0
 /**
  * @testdox  Test the default return for setHtml5
  */
 public function testTheDefaultReturnForSetHtml5()
 {
     $this->assertNull($this->object->setHtml5(true));
 }