/**
  * Tests public pad creation
  **/
 private function _createPublicPad($protocol, $server, $port, $apiKey, $suffix, $text, $responseStub)
 {
     // Browser should be called only once
     $browserMock = $this->_createBrowserMock(array(array($this->once(), $this->logicalAnd($this->stringStartsWith($protocol . '://' . $server . ':' . $port . '/api/1.2.1/createPad?apikey=' . $apiKey . '&padID='), $this->stringEndsWith($suffix . '&text=' . $text)), $this->returnValue($responseStub))));
     $etherpad = new Client($protocol, $server, $port, $apiKey);
     $etherpad->setBrowser($browserMock);
     return $etherpad->createPad($suffix, $text);
 }