Fix merge conflict resolution

This commit is contained in:
Fabien Potencier
2026-09-14 14:14:21 +02:00
parent 6123bfe4ee
commit c4146f8ba2
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -895,7 +895,8 @@ class SandboxTest extends TestCase
public function testSandboxAppliesThePolicyToTemplateMethods(): void
{
$template = $this->getEnvironment(true, [], ['index' => 'foo'])->load('index')->unwrap();
$twig = $this->getEnvironment(true, [], ['index' => 'foo']);
$template = $twig->load('index')->unwrap($twig);
$policy = new SecurityPolicy();
$this->expectException(SecurityNotAllowedMethodError::class);
+3 -3
View File
@@ -210,14 +210,14 @@ class TemplateTest extends TestCase
'dynamic_parent' => '{% extends parent %}',
]));
$this->assertTrue($twig->load('no_parent')->unwrap()->hasFixedParent());
$this->assertTrue($twig->load('no_parent')->unwrap($twig)->hasFixedParent());
$constant = $twig->load('constant_parent')->unwrap();
$constant = $twig->load('constant_parent')->unwrap($twig);
$this->assertFalse($constant->hasFixedParent());
$constant->getParent([]);
$this->assertTrue($constant->hasFixedParent());
$dynamic = $twig->load('dynamic_parent')->unwrap();
$dynamic = $twig->load('dynamic_parent')->unwrap($twig);
$this->assertFalse($dynamic->hasFixedParent());
$dynamic->getParent(['parent' => 'no_parent']);
$this->assertFalse($dynamic->hasFixedParent());