Ejemplo n.º 1
0
 /**
  * @depends	testInitialState
  * @return	null
  */
 public function testAddMetaTag()
 {
     $tag1 = $this->factory->createMetaTag('author', 'robert');
     $this->assertEquals(array(), $this->head->getMetaTags());
     $this->assertSame($this->head, $this->head->addMetaTag($tag1));
     $expected = array($tag1);
     $this->assertEquals($expected, $this->head->getMetaTags());
     $tag2 = $this->factory->createMetaTag(null, null, null, 'UTF-8');
     $this->assertSame($this->head, $this->head->addMetaTag($tag2));
     $expected = array($tag1, $tag2);
     $this->assertEquals($expected, $this->head->getMetaTags());
     $tag3 = $this->factory->createMetaTag(null, 'text/html', 'Content-Type', 'UTF-8');
     $this->assertSame($this->head, $this->head->addMetaTag($tag3));
     $expected = array($tag1, $tag2, $tag3);
     $this->assertEquals($expected, $this->head->getMetaTags());
 }