public function testMessyTitleContent() { $tag = new SimpleTitleTag(array()); $this->assertTrue($tag->expectEndTag()); $tag->addContent('<b>Hello</b>'); $tag->addContent('<em>World</em>'); $this->assertEqual($tag->getText(), 'HelloWorld'); }
function testStartValues() { $tag = new SimpleTitleTag(array("a" => "1", "b" => "")); $this->assertEqual($tag->getTagName(), "title"); $this->assertIdentical($tag->getAttribute("a"), "1"); $this->assertIdentical($tag->getAttribute("b"), true); $this->assertIdentical($tag->getAttribute("c"), false); $this->assertIdentical($tag->getContent(), ""); }
public function testStartValuesWithoutAdditionalContent() { $tag = new SimpleTitleTag(array('a' => '1', 'b' => '')); $this->assertEqual($tag->getTagName(), 'title'); $this->assertIdentical($tag->getAttribute('a'), '1'); $this->assertIdentical($tag->getAttribute('b'), ''); $this->assertIdentical($tag->getAttribute('c'), false); $this->assertIdentical($tag->getContent(), ''); }
function testTitleSetting() { $title = new SimpleTitleTag(array()); $title->addContent('Title'); $page = new SimplePage(new MockSimpleHttpResponse()); $page->AcceptTag($title); $this->assertEqual($page->getTitle(), 'Title'); }