In PHP 7.3+, call the built-in function mb_strtoupper() to skip failed tests

This commit is contained in:
Koji Tanaka 2019-04-28 21:00:45 +09:00
parent c8a9c61f27
commit cf39119151
2 changed files with 12 additions and 3 deletions

View file

@ -43,9 +43,6 @@ matrix:
- php: 7.2
env: DB=mysql PHPUNIT=5.7.19
- php: 7.3
env: DB=mysql PHPUNIT=5.7.19
allow_failures:
- php: 7.3
env: DB=mysql PHPUNIT=5.7.19
exclude:

View file

@ -7640,6 +7640,10 @@ class MultibyteTest extends CakeTestCase {
* @return void
*/
public function testUsingMbStrtoupperArmenian() {
if (extension_loaded('mbstring') && version_compare(PHP_VERSION, '7.3', '>=')) {
$this->markTestSkipped('PHP7.3+ built-in function mb_strtoupper() behaves slightly different from Multibyte::strtoupper()');
}
$string = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև';
$result = mb_strtoupper($string);
$expected = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև';
@ -7652,6 +7656,10 @@ class MultibyteTest extends CakeTestCase {
* @return void
*/
public function testUsingMbStrtoupperDiacritic() {
if (extension_loaded('mbstring') && version_compare(PHP_VERSION, '7.3', '>=')) {
$this->markTestSkipped('PHP7.3+ built-in function mb_strtoupper() behaves slightly different from Multibyte::strtoupper()');
}
$string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ';
$result = mb_strtoupper($string);
$expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ';
@ -7664,6 +7672,10 @@ class MultibyteTest extends CakeTestCase {
* @return void
*/
public function testUsingMbStrtoupperLigatures() {
if (extension_loaded('mbstring') && version_compare(PHP_VERSION, '7.3', '>=')) {
$this->markTestSkipped('PHP7.3+ built-in function mb_strtoupper() behaves slightly different from Multibyte::strtoupper()');
}
$string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ';
$result = mb_strtoupper($string);
$expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ';