Add test for gettext
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
parent
4bbe23f1df
commit
53f93afe0c
1
templates/test/gettext.phtml
Normal file
1
templates/test/gettext.phtml
Normal file
@ -0,0 +1 @@
|
||||
<?= __('Text');
|
||||
1
templates/test/gettext_twig.twig
Normal file
1
templates/test/gettext_twig.twig
Normal file
@ -0,0 +1 @@
|
||||
{% trans "Text" %}
|
||||
@ -109,4 +109,21 @@ class TemplateTest extends PMATestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for render
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testRenderGettext()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'Text',
|
||||
PMA\libraries\Template::get('test/gettext')->render()
|
||||
);
|
||||
$this->assertEquals(
|
||||
'Text',
|
||||
PMA\libraries\Template::get('test/gettext_twig')->render()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user