public function testWhitelist() { $factory = new AccountFactory(); $this->assertSame(BankNames::BANK_PLUSGIRO, $factory->createAccount('58056201')->getBankName(), 'When plusgiro is ENABLED 58056201 is considerad a valid plusgiro account'); $factory->whitelistFormats([BankNames::FORMAT_BANKGIRO]); $this->assertSame(BankNames::BANK_BANKGIRO, $factory->createAccount('58056201')->getBankName(), 'When plusgiro is DISABLED 58056201 is considerad a valid bankgiro account'); }
/** * Create plusgiro account object using number * * @param string $number * @return PlusGiro * @throws Exception\UnableToCreateAccountException If unable to create */ public function createAccount($number) { return parent::createAccount($number); }