Beispiel #1
0
 public function testConstructor()
 {
     $params = array('ssl' => true, 'error' => 'errorMsg', 'xhtml' => true);
     $options = array('theme' => 'black', 'lang' => 'no');
     $ip = '127.0.0.1';
     $reCaptcha = new Zend_Service_ReCaptcha($this->_publicKey, $this->_privateKey, $params, $options, $ip);
     $_params = $reCaptcha->getParams();
     $_options = $reCaptcha->getOptions();
     $this->assertSame($this->_publicKey, $reCaptcha->getPublicKey());
     $this->assertSame($this->_privateKey, $reCaptcha->getPrivateKey());
     $this->assertSame($params['ssl'], $_params['ssl']);
     $this->assertSame($params['error'], $_params['error']);
     $this->assertSame($params['xhtml'], $_params['xhtml']);
     $this->assertSame($options['theme'], $_options['theme']);
     $this->assertSame($options['lang'], $_options['lang']);
     $this->assertSame($ip, $reCaptcha->getIp());
 }