public function testCheckCreditorIdentifier() { // Valid $this->assertSame('DE98ZZZ09999999999', SepaUtilities::checkCreditorIdentifier('DE98ZZZ09999999999')); // Invalid by wrong checksum $this->assertFalse(SepaUtilities::checkCreditorIdentifier('DE98ZZZ09999999998')); // Invalid by not allowed character $this->assertFalse(SepaUtilities::checkCreditorIdentifier('DE98ZZÄ09999999998')); // Valid but bad formatting $this->assertSame('DE98ZZZ09999999999', SepaUtilities::checkCreditorIdentifier('d e98 Z ZZ 09 99 9999999')); // Valid, ignoring the middlepart $this->assertSame('DE98ABC09999999999', SepaUtilities::checkCreditorIdentifier('DE98abc09999999999')); }