Class ArrayTemplate
ArrayTemplate uses an array to specify default and negated templates. An ArrayTemplate is constructed with array keys.
- Peridot\Leo\Matcher\Template\ArrayTemplate implements Peridot\Leo\Matcher\Template\TemplateInterface
Namespace: Peridot\Leo\Matcher\Template
Package: Peridot\Leo\Matcher\Template
Code:
Endcode
Located at Matcher/Template/ArrayTemplate.php
Package: Peridot\Leo\Matcher\Template
Code:
$template = new ArrayTemplate([ 'default' => "Expected {{actual}} to be {{expected}}", 'negated' => "Expected {{actual}} not to be {{expected}} ]);
Endcode
Located at Matcher/Template/ArrayTemplate.php
public
|
|
public
string
|
#
getDefaultTemplate( )
Set the default template, that is the template for a failed match without negation. |
public
mixed
|
#
setDefaultTemplate( string $default )
Set the default template that is used when negation is not specified. |
public
string
|
|
public
mixed
|
|
public
array
|
|
public
mixed
|
protected
string
|
$default
|
#
''
|
protected
string
|
$negated
|
#
''
|
protected
array
|
$vars
|
#
[]
|