Skip to content

Commit

Permalink
Removing superflous i18n test and updating label test to only test la…
Browse files Browse the repository at this point in the history
…bels specifically added
  • Loading branch information
ScopeyNZ committed Jan 10, 2019
1 parent 4ee9720 commit a57c83c
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions tests/CommentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,52 +605,19 @@ public function testPermalink()
*/
public function testFieldLabels()
{
$locale = i18n::get_locale();
i18n::set_locale('fr');

/** @var Comment $comment */
$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();
$expected = array(
'Name' => 'Author Name',
'Comment' => 'Comment',
'Email' => 'Email',
'URL' => 'URL',
'Moderated' => 'Moderated?',
'IsSpam' => 'Spam?',
'AllowHtml' => 'Allow Html',
'SecretToken' => 'Secret Token',
'Depth' => 'Depth',
'Author' => 'Author Member',
'ParentComment' => 'Parent Comment',
'ChildComments' => 'Child Comments',
'Moderated' => 'Moderated?',
'ParentTitle' => 'Parent',
'Created' => 'Date posted',
'Parent' => 'Parent'
);
foreach ($expected as $key => $value) {
$this->assertEquals($value, $labels[$key]);
Expand Down

0 comments on commit a57c83c

Please sign in to comment.