/** * Test cases for testBuild() * * @return string[][] * @see testBuild() */ public function provideTestBuild() { $cases = array(); $files = ClassFile::getClassFiles(__DIR__ . '/../../classes/validator/validators/'); foreach ($files as $class) { if (!preg_match('~^Validator([A-Z0-9]{2})$~', $class->getName(), $matchType)) { continue; } $type = $matchType[1]; $cases[] = array($type); } return $cases; }
/** * @return Array */ public function provideBanks() { $this->setUp(); $banks = array(); $files = ClassFile::getClassFiles(__DIR__ . '/../../classes/validator/validators/'); foreach ($files as $class) { if (!preg_match('~^Validator([A-Z0-9]{2})$~', $class->getName(), $matchType)) { continue; } $validatorType = $matchType[1]; $bank = array_key_exists($validatorType, self::$knownBanks) ? self::$knownBanks[$validatorType] : new Bank(self::$dataBackend, 12345678, $validatorType); $banks[] = array($bank); self::$implementedBanks[$validatorType] = $bank; } return $banks; }