当前位置: 首页>>代码示例>>PHP>>正文


PHP Bank::getValidationType方法代码示例

本文整理汇总了PHP中Bank::getValidationType方法的典型用法代码示例。如果您正苦于以下问题:PHP Bank::getValidationType方法的具体用法?PHP Bank::getValidationType怎么用?PHP Bank::getValidationType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bank的用法示例。


在下文中一共展示了Bank::getValidationType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ignoreTestCase

 /**
  * Return true for known false positives.
  *
  * @return true
  */
 public function ignoreTestCase(Bank $bank, $account)
 {
     // http://sourceforge.net/p/kontocheck/bugs/11/
     if ($bank->getBankID() == "80063508") {
         return true;
     }
     // http://sourceforge.net/p/kontocheck/bugs/12/
     if ($bank->getValidationType() == "90") {
         return true;
     }
     return parent::ignoreTestCase($bank, $account);
 }
开发者ID:bmdevel,项目名称:bav,代码行数:17,代码来源:KontocheckTestAPI.php

示例2: ignoreTestCase

 /**
  * Return true for known false positives.
  *
  * Version 1.45 has many false positives.
  *
  * @return true
  */
 public function ignoreTestCase(Bank $bank, $account)
 {
     if ($account == 0) {
         return true;
     }
     /* In version 1.45 those do differ:
      *
      * bank: 28570092  method: 63  account: 5  bav: valid  kc: valid  ktoblzcheck: invalid
      * bank: 76026000  method: C7  account: 5  bav: valid  kc: valid  ktoblzcheck: invalid
      * bank: 30022000  method: 08  account: 5  bav: invalid  kc: invalid  ktoblzcheck: valid
      * bank: 80063508  method: 09  account: 30  bav: valid  ktoblzcheck: invalid
      * bank: 22230023  method: 68  account: 26  bav: invalid  kc: invalid  ktoblzcheck: valid
      * AccountNumberCheck::check: Specified method 'E1' is unknown
      * bank: 36050105  method: 78  account: 30  bav: invalid  kc: invalid  ktoblzcheck: valid
      */
     $falsePositives = array("63", "C7", "08", "09", "68", "E1", "78");
     if (in_array($bank->getValidationType(), array($falsePositives))) {
         return true;
     }
     return parent::ignoreTestCase($bank, $account);
 }
开发者ID:bmdevel,项目名称:bav,代码行数:28,代码来源:KtoblzcheckTestAPI.php

示例3: build

 /**
  * Builds a validator for a bank.
  *
  * @return Validator
  * @see Bank::getValidationType()
  * @see Bank::getValidator()
  */
 public function build(Bank $bank)
 {
     $class = sprintf('%s\\Validator%s', __NAMESPACE__, $bank->getValidationType());
     return new $class($bank);
 }
开发者ID:bmdevel,项目名称:bav,代码行数:12,代码来源:ValidatorFactory.php

示例4: getErrorMessage

 /**
  * @param Bank $bank
  * @param String $account
  * @param array $results
  * @return String
  */
 private function getErrorMessage(Bank $bank, $account, array $results)
 {
     $resultTranslation = array(TestAPIResult::VALID => "valid", TestAPIResult::INVALID => "invalid", TestAPIResult::ERROR => "error");
     $message = "bank: {$bank->getBankID()}  method: {$bank->getValidationType()}  account: {$account}";
     foreach ($results as $result) {
         $message .= "  {$result->getTestAPI()->getName()}: " . $resultTranslation[$result->getResult()];
         if ($result instanceof TestAPIErrorResult) {
             $message .= " {$result->getMessage()}";
         }
     }
     return $message;
 }
开发者ID:bmdevel,项目名称:bav,代码行数:18,代码来源:CrossProjectTest.php

示例5: testNullIsInvalid

 /**
  * 0 - 0000000000 should always be invalid
  *
  * @param String $validatorType
  * @throws ClassFileIOException
  * @throws MissingClassException
  * @dataProvider provideBanks
  */
 public function testNullIsInvalid(Bank $bank)
 {
     for ($length = 0; $length <= 10; $length++) {
         $account = str_pad("0", $length, "0", STR_PAD_LEFT);
         $this->assertFalse($bank->isValid($account), "{$bank->getBankID()}/{$bank->getValidationType()} {$account} should be invalid.");
     }
 }
开发者ID:bmdevel,项目名称:bav,代码行数:15,代码来源:ValidatorTest.php


注:本文中的Bank::getValidationType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。