public function testSetInternalMessages() { $v1 = new v\NumericValidator(); $v1->setErrorMessage('%custom%'); $v2 = new v\AlphaValidator(); $v2->setErrorMessage('%custom%'); $v = new ValidationChoice($v1, $v2); $v->addKeyValue('custom', 'this is test'); $v->setErrorMessage('%v1%'); $this->assertEquals('this is test', $v->getErrorMessage()); $v->setErrorMessage('%v2%'); $this->assertEquals('this is test', $v->getErrorMessage()); }