public function testSettingTemplates() { $x = new ValidationException(); $x->configure('bar'); $x->setTemplate('foo'); $this->assertEquals('foo', $x->getTemplate()); }
private function overwriteExceptionParams(ValidationException $exception) { $params = []; foreach ($exception->getParams() as $key => $value) { if (in_array($key, ['template', 'translator'])) { continue; } $params[$key] = $this->baseKey; } $exception->configure($this->comparedKey, $params); return $exception; }