Exemple #1
0
 public function testSettingAndGettingLocale()
 {
     $validator = new Validator\Iban();
     $validator->setLocale('de_DE');
     $this->assertEquals('de_DE', $validator->getLocale());
     $this->setExpectedException('Zend\\Validator\\Exception\\InvalidArgumentException', 'IBAN validation');
     $validator->setLocale('de_QA');
 }
Exemple #2
0
 public function testSettingAndGettingLocale()
 {
     $validator = new Validator\Iban();
     try {
         $validator->setLocale('de_QA');
         $this->fail();
     } catch (Validator\Exception $e) {
         $this->assertContains('IBAN validation', $e->getMessage());
     }
     $validator->setLocale('de_DE');
     $this->assertEquals('de_DE', $validator->getLocale());
 }