mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Merge branch 'master' into 2.5
Conflicts: lib/Cake/VERSION.txt
This commit is contained in:
commit
430ef88118
6 changed files with 14 additions and 9 deletions
|
@ -882,7 +882,7 @@ class ModelTask extends BakeTask {
|
|||
* @return array
|
||||
*/
|
||||
public function listAll($useDbConfig = null) {
|
||||
$this->_tables = (array)$this->getAllTables($useDbConfig);
|
||||
$this->_tables = $this->getAllTables($useDbConfig);
|
||||
|
||||
$this->_modelNames = array();
|
||||
$count = count($this->_tables);
|
||||
|
@ -961,6 +961,7 @@ class ModelTask extends BakeTask {
|
|||
$this->err(__d('cake_console', 'Your database does not have any tables.'));
|
||||
return $this->_stop();
|
||||
}
|
||||
sort($tables);
|
||||
return $tables;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ App::uses('ProjectTask', 'Console/Command/Task');
|
|||
App::uses('DbConfigTask', 'Console/Command/Task');
|
||||
App::uses('Model', 'Model');
|
||||
App::uses('Controller', 'Controller');
|
||||
App::uses('AppController', 'Controller');
|
||||
|
||||
/**
|
||||
* Test View Task Comment Model
|
||||
|
|
|
@ -448,7 +448,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$this->CakeEmail->replyTo('replyto@cakephp.org', 'ReplyTo CakePHP');
|
||||
$this->CakeEmail->readReceipt('readreceipt@cakephp.org', 'ReadReceipt CakePHP');
|
||||
$this->CakeEmail->returnPath('returnpath@cakephp.org', 'ReturnPath CakePHP');
|
||||
$this->CakeEmail->to('to@cakephp.org', 'To CakePHP');
|
||||
$this->CakeEmail->to('to@cakephp.org', 'To, CakePHP');
|
||||
$this->CakeEmail->cc('cc@cakephp.org', 'Cc CakePHP');
|
||||
$this->CakeEmail->bcc('bcc@cakephp.org', 'Bcc CakePHP');
|
||||
$this->CakeEmail->addTo('to2@cakephp.org', 'To2 CakePHP');
|
||||
|
@ -459,7 +459,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$this->assertSame($this->CakeEmail->replyTo(), array('replyto@cakephp.org' => 'ReplyTo CakePHP'));
|
||||
$this->assertSame($this->CakeEmail->readReceipt(), array('readreceipt@cakephp.org' => 'ReadReceipt CakePHP'));
|
||||
$this->assertSame($this->CakeEmail->returnPath(), array('returnpath@cakephp.org' => 'ReturnPath CakePHP'));
|
||||
$this->assertSame($this->CakeEmail->to(), array('to@cakephp.org' => 'To CakePHP', 'to2@cakephp.org' => 'To2 CakePHP'));
|
||||
$this->assertSame($this->CakeEmail->to(), array('to@cakephp.org' => 'To, CakePHP', 'to2@cakephp.org' => 'To2 CakePHP'));
|
||||
$this->assertSame($this->CakeEmail->cc(), array('cc@cakephp.org' => 'Cc CakePHP', 'cc2@cakephp.org' => 'Cc2 CakePHP'));
|
||||
$this->assertSame($this->CakeEmail->bcc(), array('bcc@cakephp.org' => 'Bcc CakePHP', 'bcc2@cakephp.org' => 'Bcc2 CakePHP'));
|
||||
|
||||
|
@ -468,7 +468,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$this->assertSame($headers['Reply-To'], 'ReplyTo CakePHP <replyto@cakephp.org>');
|
||||
$this->assertSame($headers['Disposition-Notification-To'], 'ReadReceipt CakePHP <readreceipt@cakephp.org>');
|
||||
$this->assertSame($headers['Return-Path'], 'ReturnPath CakePHP <returnpath@cakephp.org>');
|
||||
$this->assertSame($headers['To'], 'To CakePHP <to@cakephp.org>, To2 CakePHP <to2@cakephp.org>');
|
||||
$this->assertSame($headers['To'], '"To, CakePHP" <to@cakephp.org>, To2 CakePHP <to2@cakephp.org>');
|
||||
$this->assertSame($headers['Cc'], 'Cc CakePHP <cc@cakephp.org>, Cc2 CakePHP <cc2@cakephp.org>');
|
||||
$this->assertSame($headers['Bcc'], 'Bcc CakePHP <bcc@cakephp.org>, Bcc2 CakePHP <bcc2@cakephp.org>');
|
||||
}
|
||||
|
|
|
@ -252,6 +252,9 @@ class InflectorTest extends CakeTestCase {
|
|||
$result = Inflector::slug('posts/view/한국어/page:1/sort:asc');
|
||||
$expected = 'posts_view_한국어_page_1_sort_asc';
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = Inflector::slug("non\xc2\xa0breaking\xc2\xa0space");
|
||||
$this->assertEquals('non_breaking_space', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -722,7 +722,7 @@ class RssHelperTest extends CakeTestCase {
|
|||
$item = array(
|
||||
'title' => 'Title',
|
||||
'dc:creator' => 'Alex',
|
||||
'xy:description' => 'descriptive words'
|
||||
'dc:description' => 'descriptive words'
|
||||
);
|
||||
$attributes = array(
|
||||
'namespace' => array(
|
||||
|
@ -745,11 +745,11 @@ class RssHelperTest extends CakeTestCase {
|
|||
),
|
||||
'Alex',
|
||||
'/dc:creator',
|
||||
'xy:description' => array(
|
||||
'dc:description' => array(
|
||||
'xmlns:dc' => 'http://link.com'
|
||||
),
|
||||
'descriptive words',
|
||||
'/xy:description',
|
||||
'/dc:description',
|
||||
'/item'
|
||||
);
|
||||
$this->assertTags($result, $expected, true);
|
||||
|
|
|
@ -542,8 +542,8 @@ class Inflector {
|
|||
$quotedReplacement = preg_quote($replacement, '/');
|
||||
|
||||
$merge = array(
|
||||
'/[^\s\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]/mu' => ' ',
|
||||
'/\\s+/' => $replacement,
|
||||
'/[^\s\p{Zs}\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]/mu' => ' ',
|
||||
'/[\s\p{Zs}]+/mu' => $replacement,
|
||||
sprintf('/^[%s]+|[%s]+$/', $quotedReplacement, $quotedReplacement) => '',
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue