Skip to content

Commit

Permalink
Merge pull request #38 from cesargb/master
Browse files Browse the repository at this point in the history
Nueva traducción y tests para json
  • Loading branch information
IsraelOrtuno authored Jan 31, 2019
2 parents 8d5f000 + 9b1b021 commit 1b9df57
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"Reset Password": "Reestablecer contraseña",
"Reset Password Notification": "Aviso para reestablecer contraseña",
"You are receiving this email because we received a password reset request for your account.": "Estás recibiendo este email porque se ha solicitado un cambio de contraseña para tu cuenta.",
"This password reset link will expire in :count minutes.": "Este enlace para restablecer la contraseña caduca en :count minutos.",
"If you did not request a password reset, no further action is required.": "Si no has solicitado un cambio de contraseña, puedes ignorar o eliminar este e-mail.",
"Regards": "Saludos",
"Whoops!": "¡Ups!",
Expand Down
26 changes: 26 additions & 0 deletions tests/lang/EsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,30 @@ public function tenemos_traduccion_para_plantilla()
'Nombre'
);
}

/** @test */
public function formato_json_correcto()
{
$fileJson = join(DIRECTORY_SEPARATOR, array(
dirname(__FILE__),
'..',
'..',
'resources',
'lang',
'es.json'
));

$jsonData = file_get_contents($fileJson);

$this->assertJson($jsonData);

$traductions = json_decode($jsonData, true);

foreach ($traductions as $key => $traduction) {
$this->assertEquals(
__($key),
$traduction
);
}
}
}

0 comments on commit 1b9df57

Please sign in to comment.