File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments