Exemplo n.º 1
0
 public function testCheckBIC()
 {
     // Valid
     $this->assertSame('ASDFGHJ0', SepaUtilities::checkBIC('ASDFGHJ0'));
     // Valid, but bad formatting
     $this->assertSame('ASDFGHJ0', SepaUtilities::checkBIC('A SdFG Hj0'));
     // Invalid (0 (zero) changed to O (oh)
     $this->assertFalse(SepaUtilities::checkBIC('ASDFGHJO'));
     // options
     $this->assertSame('ASDFGHJ0XXX', SepaUtilities::checkBIC('ASDFGHJ0', array('forceLongBic' => true)));
     $this->assertSame('ASDFGHJ0ABC', SepaUtilities::checkBIC('ASDFGHJ0ABC', array('forceLongBic' => true)));
     $this->assertSame('ASDFGHJ0ABC', SepaUtilities::checkBIC('ASDFGHJ0', array('forceLongBic' => true, 'forceLongBicStr' => 'ABC')));
     $this->assertSame('ASDFGHJ0XXX', SepaUtilities::checkBIC('ASDFGHJ0XXX', array('forceLongBic' => true, 'forceLongBicStr' => 'ABC')));
 }