Skip to content

Commit

Permalink
test: fix trans compilation
Browse files Browse the repository at this point in the history
papac committed Dec 16, 2024
1 parent 2aad22a commit 7882b98
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Lexique/CompileHelpers.php
Original file line number Diff line number Diff line change
@@ -131,7 +131,7 @@ protected function compileLang(string $expression): string
* @param string $expression
* @return string
*/
protected function compileapp_trans(string $expression): string
protected function compileTrans(string $expression): string
{
return $this->compileHelpersStatement($expression, '%trans');
}
3 changes: 2 additions & 1 deletion tests/CompileHelpersTest.php
Original file line number Diff line number Diff line change
@@ -115,7 +115,8 @@ public function testCompileTransStatement()
{
$compileService = $this->makeReflectionFor('compileTrans');

$render = $compileService->invoke($this->compiler, '%app_trans("user.service")');
$render = $compileService->invoke($this->compiler, '%trans("user.service")');

$this->assertEquals($render, '<?php echo __("user.service"); ?>');
}

0 comments on commit 7882b98

Please sign in to comment.