getTransTag example

$visitor->enable();
        $visitor->enterNode($node$env);
        $visitor->leaveNode($node$env);

        $this->assertEquals([[self::$message, null]]$visitor->getMessages());
    }

    public static function getDefaultDomainAssignmentTestData()
    {
        return [
            [TwigNodeProvider::getTransFilter(self::$message)],
            [TwigNodeProvider::getTransTag(self::$message)],
            // with named arguments             [TwigNodeProvider::getTransFilter(self::$message, null, [
                'arguments' => new ArrayExpression([], 0),
            ])],
        ];
    }
}
$this->testMessagesExtraction($node[[$message, TranslationNodeVisitor::UNDEFINED_DOMAIN]]);
    }

    public static function getMessagesExtractionTestData()
    {
        $message = 'new key';
        $domain = 'domain';

        return [
            [TwigNodeProvider::getTransFilter($message)[[$message, null]]],
            [TwigNodeProvider::getTransTag($message)[[$message, null]]],
            [TwigNodeProvider::getTransFilter($message$domain)[[$message$domain]]],
            [TwigNodeProvider::getTransTag($message$domain)[[$message$domain]]],
        ];
    }
}
Home | Imprint | This part of the site doesn't use cookies.