From 456aeefb18ae864471404068977344d18cb80243 Mon Sep 17 00:00:00 2001 From: allejo Date: Sat, 10 Feb 2018 01:49:54 -0800 Subject: [PATCH] Fix UTF-8 in queries. I hope. Maybe. --- src/Database.php | 3 +++ tests/features/match.feature | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Database.php b/src/Database.php index 11c6b040..6955f55d 100644 --- a/src/Database.php +++ b/src/Database.php @@ -137,6 +137,9 @@ public static function getInstance() ]; } + $config['charset'] = 'utf8'; + $config['collation'] = 'utf8_unicode_ci'; + Service::setQueryBuilderConfig($config); } diff --git a/tests/features/match.feature b/tests/features/match.feature index a3ffb600..d4647eee 100644 --- a/tests/features/match.feature +++ b/tests/features/match.feature @@ -10,18 +10,18 @@ Feature: Matches Scenario: Enter match - Invalid data Given I am an admin - And there is a team called "Inimitable habitues" + And there is a team called "Inimitable habitués" And there is a player called "uncherished" - And a new user called "Wildcat" joins "Inimitable habitues" - And a new user called "unmercifuL" joins "Inimitable habitues" + And a new user called "Wildcat" joins "Inimitable habitués" + And a new user called "unmercifuL" joins "Inimitable habitués" When I go to "/matches/enter" - And I select "Inimitable habitues" from "form_first_team_team" - And I select "Inimitable habitues" from "form_second_team_team" + And I select "Inimitable habitués" from "form_first_team_team" + And I select "Inimitable habitués" from "form_second_team_team" And I fill in "form_first_team_participants_player" with "uncherished, ..., , ,,, ,,,, Wildcat, uNmErCIFUl" And I press "Enter" Then I should see "You can't report a match where a team played against itself!" And I should see "This value should not be blank." - And I should see "uncherished is not a member of Inimitable habitues" + And I should see "uncherished is not a member of Inimitable habitués" And I should see "There is no player called \"...\"" And the "form_first_team_participants_player" field should contain "uncherished, ..., Wildcat, unmercifuL" But I should not see "The match was created successfully"