Skip to content

Commit 0a058a4

Browse files
committed
Add test for Arabic language
1 parent a592187 commit 0a058a4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/UniqueTranslationTest.php

+21
Original file line numberDiff line numberDiff line change
@@ -322,4 +322,25 @@ public function it_handles_backslashes_in_values()
322322

323323
$this->assertTrue($validation->passes());
324324
}
325+
326+
/** @test */
327+
public function it_handles_arabic_language()
328+
{
329+
Model::create([
330+
'slug' => ['ar' => 'جديد'],
331+
'name' => ['ar' => 'جديد'],
332+
]);
333+
334+
$rules = [
335+
'slug.*' => "{$this->rule}:{$this->table}",
336+
'name.*' => UniqueTranslationRule::for($this->table),
337+
];
338+
339+
$validation = Validator::make([
340+
'slug' => ['ar' => 'جديد'],
341+
'name' => ['ar' => 'جديد'],
342+
], $rules);
343+
344+
$this->assertTrue($validation->fails());
345+
}
325346
}

0 commit comments

Comments
 (0)