Interface TemplateInterface
Interface TemplateInterface specifices templates for default and negated messages when formatting match results.
Template variables are wrapped in curly braces: {{expected}}, {{actual}}.
Available variables are:
{{expected}} {{actual}}
Direct known implementers
Peridot\Leo\Matcher\Template\ArrayTemplatePackage: Peridot\Leo\Matcher\Template
Code: $this->setDefaultTemplate("Expected {{expected}}, got {{actual}}");
Endcode
Located at Matcher/Template/TemplateInterface.php
public
array
getTemplateVars( )
Return the template variables assigned to the template.
Return the template variables assigned to the template.
Returns
array
public
mixed
setTemplateVars( array $vars )
Set the template vars assigned to the template.
Set the template vars assigned to the template.
Parameters
- $vars
Returns
mixed
public
string
getDefaultTemplate( )
Set the default template, that is the template for a failed match without negation.
Set the default template, that is the template for a failed match without negation.
Returns
string
public
mixed
setDefaultTemplate( string $template )
Set the default template that is used when negation is not specified.
Set the default template that is used when negation is not specified.
Parameters
- $template
Returns
mixed
public
string
getNegatedTemplate( )
Return the template used for a failed negated match.
Return the template used for a failed negated match.
Returns
string
public
mixed
setNegatedTemplate( string $template )
Set the template used for a failed negated match.
Set the template used for a failed negated match.
Parameters
- $template
Returns
mixed