mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 16:22:20 +02:00
✅ Make unit tests working
This commit is contained in:
@@ -619,7 +619,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
|
||||
return null === $this->transformationFailure;
|
||||
}
|
||||
|
||||
public function getTransformationFailure(): ?Exception\TransformationFailedException
|
||||
public function getTransformationFailure(): ?TransformationFailedException
|
||||
{
|
||||
return $this->transformationFailure;
|
||||
}
|
||||
@@ -750,7 +750,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
|
||||
$child = $this->config->getFormFactory()->createNamed($child, $type, null, $options);
|
||||
}
|
||||
} elseif ($child->getConfig()->getAutoInitialize()) {
|
||||
throw new RuntimeException(sprintf('Automatic initialization is only supported on root forms. You should set the "auto_initialize" option to false on the field "%s".', $child->getName()));
|
||||
throw new RuntimeException(\sprintf('Automatic initialization is only supported on root forms. You should set the "auto_initialize" option to false on the field "%s".', $child->getName()));
|
||||
}
|
||||
|
||||
$this->children[$child->getName()] = $child;
|
||||
@@ -812,7 +812,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
|
||||
return $this->children[$name];
|
||||
}
|
||||
|
||||
throw new OutOfBoundsException(sprintf('Child "%s" does not exist.', $name));
|
||||
throw new OutOfBoundsException(\sprintf('Child "%s" does not exist.', $name));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -945,7 +945,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
|
||||
$value = $transformer->transform($value);
|
||||
}
|
||||
} catch (TransformationFailedException $exception) {
|
||||
throw new TransformationFailedException(sprintf('Unable to transform data for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());
|
||||
throw new TransformationFailedException(\sprintf('Unable to transform data for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());
|
||||
}
|
||||
|
||||
return $value;
|
||||
@@ -965,7 +965,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
|
||||
$value = $transformers[$i]->reverseTransform($value);
|
||||
}
|
||||
} catch (TransformationFailedException $exception) {
|
||||
throw new TransformationFailedException(sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());
|
||||
throw new TransformationFailedException(\sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());
|
||||
}
|
||||
|
||||
return $value;
|
||||
@@ -992,7 +992,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
|
||||
$value = $transformer->transform($value);
|
||||
}
|
||||
} catch (TransformationFailedException $exception) {
|
||||
throw new TransformationFailedException(sprintf('Unable to transform value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());
|
||||
throw new TransformationFailedException(\sprintf('Unable to transform value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());
|
||||
}
|
||||
|
||||
return $value;
|
||||
@@ -1014,7 +1014,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
|
||||
$value = $transformers[$i]->reverseTransform($value);
|
||||
}
|
||||
} catch (TransformationFailedException $exception) {
|
||||
throw new TransformationFailedException(sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());
|
||||
throw new TransformationFailedException(\sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
||||
Reference in New Issue
Block a user