mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
commit
8573c15575
7 changed files with 56 additions and 67 deletions
|
@ -71,7 +71,10 @@ before_script:
|
|||
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.3" ]] ; then pecl install timezonedb ; fi
|
||||
- sh -c "if [ '$PHPCS' = '1' ]; then composer require 'cakephp/cakephp-codesniffer:1.*'; fi"
|
||||
- sh -c "if [ '$PHPCS' = '1' ]; then vendors/bin/phpcs --config-set installed_paths vendors/cakephp/cakephp-codesniffer; fi"
|
||||
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- |
|
||||
if [[ ${TRAVIS_PHP_VERSION} != "7.3" ]]; then
|
||||
echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
||||
fi
|
||||
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]] ; then echo "yes" | pecl install apcu-5.1.3 || true; fi
|
||||
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "5" ]] ; then echo "yes" | pecl install apcu-4.0.11 || true; fi
|
||||
- echo -e "extension = apcu.so\napc.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
|
|
|
@ -224,7 +224,7 @@ class ModelTask extends BakeTask {
|
|||
if (!array_key_exists('id', $fields)) {
|
||||
$primaryKey = $this->findPrimaryKey($fields);
|
||||
}
|
||||
|
||||
$displayField = null;
|
||||
if ($knownToExist) {
|
||||
$displayField = $tempModel->hasField(array('name', 'title'));
|
||||
if (!$displayField) {
|
||||
|
|
|
@ -891,7 +891,7 @@ class App {
|
|||
/**
|
||||
* Increases the PHP "memory_limit" ini setting by the specified amount
|
||||
* in kilobytes
|
||||
*
|
||||
*
|
||||
* @param string $additionalKb Number in kilobytes
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -146,7 +146,7 @@ class Permission extends AppModel {
|
|||
case -1:
|
||||
return false;
|
||||
case 0:
|
||||
continue;
|
||||
break;
|
||||
case 1:
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -380,25 +380,12 @@ class ExtractTaskTest extends CakeTestCase {
|
|||
|
||||
$this->Task->execute();
|
||||
$result = file_get_contents($this->path . DS . 'default.pot');
|
||||
|
||||
$pattern = preg_quote('#Model/PersisterOne.php:validation for field title#', '\\');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = preg_quote('#Model/PersisterOne.php:validation for field body#', '\\');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post title is required"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "You may enter up to %s chars \(minimum is %s chars\)"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post body is required"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post body is super required"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$this->assertContains('Model/PersisterOne.php:validation for field title', $result);
|
||||
$this->assertContains('Model/PersisterOne.php:validation for field body', $result);
|
||||
$this->assertContains('msgid "Post title is required"', $result);
|
||||
$this->assertContains('msgid "You may enter up to %s chars (minimum is %s chars)"', $result);
|
||||
$this->assertContains('msgid "Post body is required"', $result);
|
||||
$this->assertContains('msgid "Post body is super required"', $result);
|
||||
$this->assertContains('msgid "double \\"quoted\\" validation"', $result, 'Strings with quotes not handled correctly');
|
||||
$this->assertContains("msgid \"single 'quoted' validation\"", $result, 'Strings with quotes not handled correctly');
|
||||
}
|
||||
|
@ -429,21 +416,11 @@ class ExtractTaskTest extends CakeTestCase {
|
|||
|
||||
$this->Task->execute();
|
||||
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
|
||||
|
||||
$pattern = preg_quote('#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field title#', '\\');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = preg_quote('#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field body#', '\\');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post title is required"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post body is required"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post body is super required"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
$this->assertContains('Plugin/TestPlugin/Model/TestPluginPost.php:validation for field title', $result);
|
||||
$this->assertContains('Plugin/TestPlugin/Model/TestPluginPost.php:validation for field body', $result);
|
||||
$this->assertContains('msgid "Post title is required"', $result);
|
||||
$this->assertContains('msgid "Post body is required"', $result);
|
||||
$this->assertContains('msgid "Post body is super required"', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -468,24 +445,12 @@ class ExtractTaskTest extends CakeTestCase {
|
|||
|
||||
$this->Task->execute();
|
||||
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
|
||||
|
||||
$pattern = preg_quote('#Model/TestPluginPost.php:validation for field title#', '\\');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = preg_quote('#Model/TestPluginPost.php:validation for field body#', '\\');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post title is required"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post body is required"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post body is super required"#';
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field title#';
|
||||
$this->assertNotRegExp($pattern, $result);
|
||||
$this->assertContains('Model/TestPluginPost.php:validation for field title', $result);
|
||||
$this->assertContains('Model/TestPluginPost.php:validation for field body', $result);
|
||||
$this->assertContains('msgid "Post title is required"', $result);
|
||||
$this->assertContains('msgid "Post body is required"', $result);
|
||||
$this->assertContains('msgid "Post body is super required"', $result);
|
||||
$this->assertNotContains('Plugin/TestPlugin/Model/TestPluginPost.php:validation for field title', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7623,26 +7623,47 @@ class MultibyteTest extends CakeTestCase {
|
|||
$expected = 'ԀԂԄԆԈԊԌԎԐԒ';
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$string = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև';
|
||||
$result = mb_strtoupper($string);
|
||||
$expected = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև';
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ';
|
||||
$result = mb_strtoupper($string);
|
||||
$expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ';
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ';
|
||||
$result = mb_strtoupper($string);
|
||||
$expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ';
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$string = 'ωkå';
|
||||
$result = mb_strtoupper($string);
|
||||
$expected = 'ΩKÅ';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testUsingMbStrtoupperArmenian method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testUsingMbStrtoupperArmenian() {
|
||||
$string = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև';
|
||||
$result = mb_strtoupper($string);
|
||||
$expected = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testUsingMbStrtoupperDiacritic method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testUsingMbStrtoupperDiacritic() {
|
||||
$string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ';
|
||||
$result = mb_strtoupper($string);
|
||||
$expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testUsingMbStrtoupperLigatures method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testUsingMbStrtoupperLigatures() {
|
||||
$string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ';
|
||||
$result = mb_strtoupper($string);
|
||||
$expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ';
|
||||
|
|
|
@ -252,7 +252,7 @@ class Debugger {
|
|||
}
|
||||
|
||||
$data = compact(
|
||||
'level', 'error', 'code', 'description', 'file', 'path', 'line', 'context'
|
||||
'level', 'error', 'code', 'description', 'file', 'line', 'context'
|
||||
);
|
||||
echo $self->outputError($data);
|
||||
|
||||
|
|
Loading…
Reference in a new issue