Exemplo n.º 1
0
 /**
  * @expectedException \Zend\Service\LiveDocx\Exception
  */
 public function testLoginUsernamePasswordSoapClientException()
 {
     $mailMerge = new MailMerge();
     $mailMerge->setUsername('phpunitInvalidUsername');
     $mailMerge->setPassword('phpunitInvalidPassword');
     $mailMerge->setSoapClient(new SoapClient(self::ENDPOINT));
     $mailMerge->logIn();
 }
Exemplo n.º 2
0
        $duration = -1;
        $result = TEST_FAIL;
        $failed = true;
    }
    Helper::printCheckEnvironmentLine($counter, sprintf('[PREMIUM] Checking backend WSDL (%01.2fs)', $duration), $result);
    $counter++;
}
// -----------------------------------------------------------------------------
if (defined('DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_USERNAME') && defined('DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_PASSWORD') && defined('DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_WSDL') && false !== DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_USERNAME && false !== DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_PASSWORD && false !== DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_WSDL) {
    $errorMessage = null;
    try {
        $microtime = microtime(true);
        $mailMerge = new MailMerge();
        $mailMerge->setWSDL(DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_WSDL);
        $mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_USERNAME);
        $mailMerge->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_PASSWORD);
        $mailMerge->logIn();
        $duration = microtime(true) - $microtime;
        unset($mailMerge);
    } catch (Exception $e) {
        $duration = -1;
        $errorMessage = $e->getMessage();
    }
    if (is_null($errorMessage)) {
        $result = TEST_PASS;
    } else {
        $result = TEST_FAIL;
        $failed = true;
    }
    Helper::printCheckEnvironmentLine($counter, sprintf('[PREMIUM] Logging into backend service (%01.2fs)', $duration), $result);
    $counter++;