/** * Accessor for plain text version of the page. * @return string Normalised text representation. * @access public */ function getContentAsText() { return $this->page->getText(); }
function testTextAccessor() { $response = new MockSimpleHttpResponse(); $response->setReturnValue('getContent', '<b>Some</b> "messy" HTML'); $page = new SimplePage($response); $this->assertEqual($page->getText(), 'Some "messy" HTML'); }