Skip to content

Commit b2a5983

Browse files
committed
test(core): update XObjectTemplateCompilerTest
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 9dc3c7d commit b2a5983

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

tests/Unit/XObjectTemplateCompilerTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,22 @@ public function testCompilerConstructorKeepsProvidedParserAndLayoutInstances():
129129
self::assertSame($htmlParser, $htmlParserProperty->getValue($compiler));
130130
self::assertSame($layoutEngine, $layoutEngineProperty->getValue($compiler));
131131
}
132+
133+
public function testCompilerConstructorKeepsProvidedContextInterpolatorInstance(): void
134+
{
135+
$contextInterpolatorClass = \LibreSign\XObjectTemplate\Html\HtmlContextInterpolator::class;
136+
$contextInterpolator = new $contextInterpolatorClass();
137+
$compiler = (new \ReflectionClass(XObjectTemplateCompiler::class))->newInstanceArgs([
138+
null,
139+
null,
140+
null,
141+
null,
142+
null,
143+
$contextInterpolator,
144+
]);
145+
146+
$contextInterpolatorProperty = new ReflectionProperty($compiler, 'contextInterpolator');
147+
148+
self::assertSame($contextInterpolator, $contextInterpolatorProperty->getValue($compiler));
149+
}
132150
}

0 commit comments

Comments
 (0)