With Fluid 2.12, we introduced the ability to provide arbitrary
ViewHelper arguments to TagBasedViewHelpers. Consequently,
we deprecated the method registerTagAttribute(), which is no
longer necessary due to the mentioned change.
However, the implementations differed until now: The previous
implementation ignored empty strings for tag attributes, while
the new implementation added such input as empty attribute
to the resulting tag. We now check for empty strings and null
and only add attributes to the tag if it passes those tests. Also,
attribute values are converted to string.
This patch adds tests to ensure that the behavior is consistent,
both for registered and unregistered tag attributes. It also ensures
that the inline syntax behaves identically to the tag syntax.
With Fluid 2.12, we introduced the ability to provide arbitrary ViewHelper arguments to TagBasedViewHelpers. Consequently, we deprecated the method registerTagAttribute(), which is no longer necessary due to the mentioned change.
However, the implementations differed until now: The previous implementation ignored empty strings for tag attributes, while the new implementation added such input as empty attribute to the resulting tag. We now check for empty strings and null and only add attributes to the tag if it passes those tests. Also, attribute values are converted to string.
This patch adds tests to ensure that the behavior is consistent, both for registered and unregistered tag attributes. It also ensures that the inline syntax behaves identically to the tag syntax.