mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-30494 grade: provided a failure string to gives people experiencing UTF character test failures a starting point for fixing the problem
This commit is contained in:
parent
58800b7c36
commit
39ee0ced4a
@ -131,11 +131,13 @@ class grading_manager_test extends UnitTestCase {
|
||||
|
||||
public function test_tokenize() {
|
||||
|
||||
$UTFfailuremessage = 'A test using UTF-8 characters has failed. Consider updating PHP and PHP\'s PCRE or INTL extensions (MDL-30494)';
|
||||
|
||||
$needle = " šašek, \n\n \r a král; \t";
|
||||
$tokens = testable_grading_manager::tokenize($needle);
|
||||
$this->assertEqual(2, count($tokens));
|
||||
$this->assertTrue(in_array('šašek', $tokens));
|
||||
$this->assertTrue(in_array('král', $tokens));
|
||||
$this->assertEqual(2, count($tokens), $UTFfailuremessage);
|
||||
$this->assertTrue(in_array('šašek', $tokens), $UTFfailuremessage);
|
||||
$this->assertTrue(in_array('král', $tokens), $UTFfailuremessage);
|
||||
|
||||
$needle = ' " šašek a král " ';
|
||||
$tokens = testable_grading_manager::tokenize($needle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user