Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function addMeta($meta, $value = null)
 {
     if (null === $value) {
         $this->_doc->addCustomTag($meta);
     } else {
         $this->_doc->setMetadata($meta, $value);
     }
 }
Ejemplo n.º 2
0
 /**
  * @param string|array $metaRows
  * @return $this
  */
 public function meta($metaRows)
 {
     if (is_array($metaRows)) {
         foreach ($metaRows as $metaRow) {
             $this->meta($metaRow);
         }
     } else {
         $data = $this->doc->getHeadData();
         if (!in_array($metaRows, $data['custom'])) {
             $this->doc->addCustomTag($metaRows);
         }
     }
     return $this;
 }
 /**
  * Test...
  *
  * @return  void
  */
 public function testAddCustomTag()
 {
     $this->object->addCustomTag("\t  <script>var html5 = true;</script>\r\n");
     $this->assertThat(in_array('<script>var html5 = true;</script>', $this->object->_custom), $this->isTrue(), 'JDocumentHtml::addCustomTag did not work');
 }
Ejemplo n.º 4
0
 /**
  * @testdox  Test that addCustomTag returns an instance of $this
  */
 public function testEnsureAddCustomTagReturnsThisObject()
 {
     $this->assertSame($this->object, $this->object->addCustomTag("\t  <script>var html5 = true;</script>\r\n"));
 }