function test_setPageTitle() { $html = '<html><head>' . '</head><body>' . '</body></html>'; $page = new Page($html); $page->setPageTitle('some title'); $o = phpQuery::newDocument((string) $page); $this->assertEquals('some title', phpQuery::pq('title', $o)->html()); $html = '<html><head>' . '<title>page title</title>' . '</head><body>' . '</body></html>'; $page = new Page($html); $page->setPageTitle(''); $o = phpQuery::newDocument((string) $page); $this->assertEquals('', phpQuery::pq('title')->html()); }