Skip to content

Commit

Permalink
fix fragile test.
Browse files Browse the repository at this point in the history
- CI's env LANG is en, local env LANG is ja.
  • Loading branch information
uzulla committed Mar 19, 2021
1 parent 7fb0585 commit 9782de9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/Helper/SampleDataGenerator/GenerateSampleCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ public function generateSampleCategories(string $blog_id, $parent_id = 0, int $n
$errors = $categories_model->validate($insert_data, $data);

if (count($errors) > 0) {
if (/*"Same name exists in the same hierarchy"*/"同一階層に同じ名前が存在しています" === ($errors['name'] ?? false)) {
// if set same category name (because low randomness) continue.
if (
"Same name exists in the same hierarchy" === ($errors['name'] ?? false) ||
"同一階層に同じ名前が存在しています" === ($errors['name'] ?? false)
) {
continue;
}

Expand Down

0 comments on commit 9782de9

Please sign in to comment.