mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Removing superflous i18n test and updating label test to only test labels specifically added
This commit is contained in:
parent
4ee9720081
commit
a57c83c121
@ -605,52 +605,19 @@ class CommentsTest extends FunctionalTest
|
|||||||
*/
|
*/
|
||||||
public function testFieldLabels()
|
public function testFieldLabels()
|
||||||
{
|
{
|
||||||
$locale = i18n::get_locale();
|
|
||||||
i18n::set_locale('fr');
|
|
||||||
|
|
||||||
/** @var Comment $comment */
|
/** @var Comment $comment */
|
||||||
$comment = $this->objFromFixture(Comment::class, 'firstComA');
|
$comment = $this->objFromFixture(Comment::class, 'firstComA');
|
||||||
|
|
||||||
$labels = $comment->FieldLabels();
|
|
||||||
$expected = array(
|
|
||||||
'Name' => 'Nom de l\'Auteur',
|
|
||||||
'Comment' => 'Commentaire',
|
|
||||||
'Email' => 'Email',
|
|
||||||
'URL' => 'URL',
|
|
||||||
'Moderated' => 'Modéré?',
|
|
||||||
'IsSpam' => 'Spam?',
|
|
||||||
'AllowHtml' => 'Allow Html',
|
|
||||||
'SecretToken' => 'Secret Token',
|
|
||||||
'Depth' => 'Depth',
|
|
||||||
'Author' => 'Author Member',
|
|
||||||
'ParentComment' => 'Parent Comment',
|
|
||||||
'ChildComments' => 'Child Comments',
|
|
||||||
'ParentTitle' => 'Parent',
|
|
||||||
'Created' => 'Date de publication',
|
|
||||||
'Parent' => 'Parent'
|
|
||||||
);
|
|
||||||
i18n::set_locale($locale);
|
|
||||||
foreach ($expected as $key => $value) {
|
|
||||||
$this->assertEquals($value, $labels[$key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$labels = $comment->FieldLabels();
|
$labels = $comment->FieldLabels();
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'Name' => 'Author Name',
|
'Name' => 'Author Name',
|
||||||
'Comment' => 'Comment',
|
'Comment' => 'Comment',
|
||||||
'Email' => 'Email',
|
'Email' => 'Email',
|
||||||
'URL' => 'URL',
|
'URL' => 'URL',
|
||||||
'Moderated' => 'Moderated?',
|
|
||||||
'IsSpam' => 'Spam?',
|
'IsSpam' => 'Spam?',
|
||||||
'AllowHtml' => 'Allow Html',
|
'Moderated' => 'Moderated?',
|
||||||
'SecretToken' => 'Secret Token',
|
|
||||||
'Depth' => 'Depth',
|
|
||||||
'Author' => 'Author Member',
|
|
||||||
'ParentComment' => 'Parent Comment',
|
|
||||||
'ChildComments' => 'Child Comments',
|
|
||||||
'ParentTitle' => 'Parent',
|
'ParentTitle' => 'Parent',
|
||||||
'Created' => 'Date posted',
|
'Created' => 'Date posted',
|
||||||
'Parent' => 'Parent'
|
|
||||||
);
|
);
|
||||||
foreach ($expected as $key => $value) {
|
foreach ($expected as $key => $value) {
|
||||||
$this->assertEquals($value, $labels[$key]);
|
$this->assertEquals($value, $labels[$key]);
|
||||||
|
Loading…
Reference in New Issue
Block a user