/** * @depends testInitialState * @return null */ public function testSetTitle() { $headTag = $this->head->getHeadTag(); $titleTag = $headTag->getTitle(); $this->assertTrue($titleTag->isEmpty()); $block1 = 'title 1'; $block2 = 'title 2'; $block3 = 'title 3'; $block4 = 'title 4'; $this->assertSame($this->head, $this->head->setTitle($block1)); $this->assertEquals($block1, $titleTag->getContent(0)); $this->assertSame($this->head, $this->head->setTitle($block2)); $this->assertEquals($block2, $titleTag->getContent(1)); $this->assertSame($this->head, $this->head->setTitle($block3, 'prepend')); $this->assertEquals($block3, $titleTag->getContent(0)); $this->assertSame($this->head, $this->head->setTitle($block4, 'replace')); $this->assertEquals($block4, $titleTag->getContent(0)); $this->assertEquals(array($block4), $titleTag->getContent()); }