assertEquals($body, $node->getNode('body')); } public static function provideTests(): iterable { $tests = []; $body = new TextNode('foo', 1); $node = new SandboxNode($body, 1); $tests[] = [$node, <<sandbox->isSandboxed()) { \$this->sandbox->enableSandbox(); } try { yield "foo"; } finally { if (!\$alreadySandboxed) { \$this->sandbox->disableSandbox(); } } EOF ]; return $tests; } }