/** * Prepares the environment before running a test. */ protected function setUp() { $this->_object = new Gravatar(); $this->_view = new View(); $this->_view->doctype()->setDoctype(strtoupper("XHTML1_STRICT")); $this->_object->setView($this->_view); if( isset($_SERVER['HTTPS'])) { unset ($_SERVER['HTTPS']); } }
/** * Test if doctype is HTML */ public function testGravatarHtmlDoctype() { $object = new Gravatar(); $view = new View(); $view->doctype()->setDoctype(strtoupper("HTML5")); $object->setView($view); $this->assertRegExp('/[^\\/]>$/', $this->helper->__invoke('*****@*****.**')->__toString()); }