mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merge branch '2.x' into 2.next
This commit is contained in:
commit
e8d63725d8
157 changed files with 344 additions and 188 deletions
|
@ -23,6 +23,8 @@
|
|||
* (if memcached extension compiled with --enable-igbinary)
|
||||
* Compressed keys can also be incremented/decremented
|
||||
*
|
||||
* This cache engine requires at least ext/memcached version 2.0
|
||||
*
|
||||
* @package Cake.Cache.Engine
|
||||
*/
|
||||
class MemcachedEngine extends CacheEngine {
|
||||
|
|
|
@ -748,13 +748,12 @@ class CakeRequest implements ArrayAccess {
|
|||
* @return mixed Either false on no header being set or the value of the header.
|
||||
*/
|
||||
public static function header($name) {
|
||||
$name = strtoupper(str_replace('-', '_', $name));
|
||||
$httpName = 'HTTP_' . $name;
|
||||
$httpName = 'HTTP_' . strtoupper(str_replace('-', '_', $name));
|
||||
if (isset($_SERVER[$httpName])) {
|
||||
return $_SERVER[$httpName];
|
||||
}
|
||||
// Work around Apache issues where 'Authorization' is not
|
||||
// passed to PHP.
|
||||
// Use the provided value, in some configurations apache will
|
||||
// pass Authorization with no prefix and in Titlecase.
|
||||
if (isset($_SERVER[$name])) {
|
||||
return $_SERVER[$name];
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ App::uses('Cache', 'Cache');
|
|||
App::uses('MemcacheEngine', 'Cache/Engine');
|
||||
|
||||
/**
|
||||
* Class TestMemcacheEngine
|
||||
* TestMemcacheEngine
|
||||
*
|
||||
* @package Cake.Test.Case.Cache.Engine
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ App::uses('Cache', 'Cache');
|
|||
App::uses('MemcachedEngine', 'Cache/Engine');
|
||||
|
||||
/**
|
||||
* Class TestMemcachedEngine
|
||||
* TestMemcachedEngine
|
||||
*
|
||||
* @package Cake.Test.Case.Cache.Engine
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
App::uses('IniReader', 'Configure');
|
||||
|
||||
/**
|
||||
* Class IniReaderTest
|
||||
* IniReaderTest
|
||||
*
|
||||
* @package Cake.Test.Case.Configure
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
App::uses('PhpReader', 'Configure');
|
||||
|
||||
/**
|
||||
* Class PhpReaderTest
|
||||
* PhpReaderTest
|
||||
*
|
||||
* @package Cake.Test.Case.Configure
|
||||
*/
|
||||
|
|
|
@ -23,7 +23,7 @@ App::uses('Shell', 'Console');
|
|||
App::uses('CommandTask', 'Console/Command/Task');
|
||||
|
||||
/**
|
||||
* Class TestStringOutput
|
||||
* TestStringOutput
|
||||
*
|
||||
* @package Cake.Test.Case.Console.Command
|
||||
*/
|
||||
|
@ -38,7 +38,7 @@ class TestStringOutput extends ConsoleOutput {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class CommandListShellTest
|
||||
* CommandListShellTest
|
||||
*
|
||||
* @package Cake.Test.Case.Console.Command
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,7 @@ App::uses('Shell', 'Console');
|
|||
App::uses('CommandTask', 'Console/Command/Task');
|
||||
|
||||
/**
|
||||
* Class TestCompletionStringOutput
|
||||
* TestCompletionStringOutput
|
||||
*
|
||||
* @package Cake.Test.Case.Console.Command
|
||||
*/
|
||||
|
@ -40,7 +40,7 @@ class TestCompletionStringOutput extends ConsoleOutput {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class CompletionShellTest
|
||||
* CompletionShellTest
|
||||
*
|
||||
* @package Cake.Test.Case.Console.Command
|
||||
*/
|
||||
|
|
|
@ -39,7 +39,7 @@ if (!$imported) {
|
|||
define('ARTICLE_MODEL_CREATED', true);
|
||||
|
||||
/**
|
||||
* Class BakeArticle
|
||||
* BakeArticle
|
||||
*/
|
||||
class BakeArticle extends Model {
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ App::uses('ShellDispatcher', 'Console');
|
|||
App::uses('TestShell', 'Console/Command');
|
||||
|
||||
/**
|
||||
* Class TestTestShell
|
||||
* TestTestShell
|
||||
*
|
||||
* @package Cake.Test.Case.Console.Command
|
||||
*/
|
||||
|
@ -37,7 +37,7 @@ class TestTestShell extends TestShell {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class TestShellTest
|
||||
* TestShellTest
|
||||
*
|
||||
* @package Cake.Test.Case.Console.Command
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
App::uses('ConsoleOptionParser', 'Console');
|
||||
|
||||
/**
|
||||
* Class ConsoleOptionParserTest
|
||||
* ConsoleOptionParserTest
|
||||
*
|
||||
* @package Cake.Test.Case.Console
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
App::uses('ConsoleOutput', 'Console');
|
||||
|
||||
/**
|
||||
* Class ConsoleOutputTest
|
||||
* ConsoleOutputTest
|
||||
*
|
||||
* @package Cake.Test.Case.Console
|
||||
*/
|
||||
|
|
|
@ -20,7 +20,7 @@ App::uses('ConsoleOptionParser', 'Console');
|
|||
App::uses('HelpFormatter', 'Console');
|
||||
|
||||
/**
|
||||
* Class HelpFormatterTest
|
||||
* HelpFormatterTest
|
||||
*
|
||||
* @package Cake.Test.Case.Console
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@ class DbConfigAliasedTask extends Shell {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class TaskCollectionTest
|
||||
* TaskCollectionTest
|
||||
*
|
||||
* @package Cake.Test.Case.Console
|
||||
*/
|
||||
|
|
|
@ -23,7 +23,7 @@ App::uses('CakeRequest', 'Network');
|
|||
App::uses('CakeResponse', 'Network');
|
||||
|
||||
/**
|
||||
* Class ActionsAuthorizeTest
|
||||
* ActionsAuthorizeTest
|
||||
*
|
||||
* @package Cake.Test.Case.Controller.Component.Auth
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ App::uses('CakeRequest', 'Network');
|
|||
App::uses('CakeResponse', 'Network');
|
||||
|
||||
/**
|
||||
* Class ControllerAuthorizeTest
|
||||
* ControllerAuthorizeTest
|
||||
*
|
||||
* @package Cake.Test.Case.Controller.Component.Auth
|
||||
*/
|
||||
|
|
|
@ -23,7 +23,7 @@ App::uses('CakeRequest', 'Network');
|
|||
App::uses('CakeResponse', 'Network');
|
||||
|
||||
/**
|
||||
* Class CrudAuthorizeTest
|
||||
* CrudAuthorizeTest
|
||||
*
|
||||
* @package Cake.Test.Case.Controller.Component.Auth
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
App::uses('ConsoleLog', 'Log/Engine');
|
||||
|
||||
/**
|
||||
* Class TestConsoleLog
|
||||
* TestConsoleLog
|
||||
*
|
||||
* @package Cake.Test.Case.Log.Engine
|
||||
*/
|
||||
|
@ -28,7 +28,7 @@ class TestConsoleLog extends ConsoleLog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class TestCakeLog
|
||||
* TestCakeLog
|
||||
*
|
||||
* @package Cake.Test.Case.Log.Engine
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@ App::uses('DatabaseSession', 'Model/Datasource/Session');
|
|||
App::uses('CacheSession', 'Model/Datasource/Session');
|
||||
|
||||
/**
|
||||
* Class TestCakeSession
|
||||
* TestCakeSession
|
||||
*
|
||||
* @package Cake.Test.Case.Model.Datasource
|
||||
*/
|
||||
|
@ -38,7 +38,7 @@ class TestCakeSession extends CakeSession {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class TestCacheSession
|
||||
* TestCacheSession
|
||||
*
|
||||
* @package Cake.Test.Case.Model.Datasource
|
||||
*/
|
||||
|
@ -51,7 +51,7 @@ class TestCacheSession extends CacheSession {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class TestDatabaseSession
|
||||
* TestDatabaseSession
|
||||
*
|
||||
* @package Cake.Test.Case.Model.Datasource
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,7 @@ App::uses('MockDataSource', 'Model/Datasource');
|
|||
require_once dirname(dirname(__FILE__)) . DS . 'models.php';
|
||||
|
||||
/**
|
||||
* Class MockPDO
|
||||
* MockPDO
|
||||
*
|
||||
* @package Cake.Test.Case.Model.Datasource
|
||||
*/
|
||||
|
@ -42,7 +42,7 @@ class MockPDO extends PDO {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class MockDataSource
|
||||
* MockDataSource
|
||||
*
|
||||
* @package Cake.Test.Case.Model.Datasource
|
||||
*/
|
||||
|
@ -50,7 +50,7 @@ class MockDataSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class DboTestSource
|
||||
* DboTestSource
|
||||
*
|
||||
* @package Cake.Test.Case.Model.Datasource
|
||||
*/
|
||||
|
@ -81,7 +81,7 @@ class DboTestSource extends DboSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class DboSecondTestSource
|
||||
* DboSecondTestSource
|
||||
*
|
||||
* @package Cake.Test.Case.Model.Datasource
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@ App::uses('CacheSession', 'Model/Datasource/Session');
|
|||
class_exists('CakeSession');
|
||||
|
||||
/**
|
||||
* Class CacheSessionTest
|
||||
* CacheSessionTest
|
||||
*
|
||||
* @package Cake.Test.Case.Model.Datasource.Session
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ App::uses('DatabaseSession', 'Model/Datasource/Session');
|
|||
class_exists('CakeSession');
|
||||
|
||||
/**
|
||||
* Class SessionTestModel
|
||||
* SessionTestModel
|
||||
*
|
||||
* @package Cake.Test.Case.Model.Datasource.Session
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
require_once dirname(__FILE__) . DS . 'ModelTestBase.php';
|
||||
|
||||
/**
|
||||
* Class ModelCrossSchemaHabtmTest
|
||||
* ModelCrossSchemaHabtmTest
|
||||
*
|
||||
* @package Cake.Test.Case.Model
|
||||
*/
|
||||
|
|
|
@ -421,6 +421,20 @@ class ModelDeleteTest extends BaseModelTest {
|
|||
$this->assertTrue($result, 'deleteAll returned false when all no records matched conditions. %s');
|
||||
}
|
||||
|
||||
/**
|
||||
* testDeleteAll diamond operator method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testDeleteAllDiamondOperator() {
|
||||
$this->loadFixtures('Article');
|
||||
$article = new Article();
|
||||
|
||||
$result = $article->deleteAll(array('Article.id <>' => 1));
|
||||
$this->assertTrue($result);
|
||||
$this->assertFalse($article->exists(2));
|
||||
}
|
||||
|
||||
/**
|
||||
* testDeleteAllUnknownColumn method
|
||||
*
|
||||
|
|
|
@ -21,7 +21,7 @@ App::uses('Xml', 'Utility');
|
|||
App::uses('CakeRequest', 'Network');
|
||||
|
||||
/**
|
||||
* Class TestCakeRequest
|
||||
* TestCakeRequest
|
||||
*
|
||||
* @package Cake.Test.Case.Network
|
||||
*/
|
||||
|
@ -55,7 +55,7 @@ class TestCakeRequest extends CakeRequest {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class CakeRequestTest
|
||||
* CakeRequestTest
|
||||
*/
|
||||
class CakeRequestTest extends CakeTestCase {
|
||||
|
||||
|
@ -1147,13 +1147,14 @@ class CakeRequestTest extends CakeTestCase {
|
|||
$_SERVER['HTTP_X_THING'] = '';
|
||||
$_SERVER['HTTP_HOST'] = 'localhost';
|
||||
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-ca) AppleWebKit/534.8+ (KHTML, like Gecko) Version/5.0 Safari/533.16';
|
||||
$_SERVER['AUTHORIZATION'] = 'foobar';
|
||||
$_SERVER['Authorization'] = 'foobar';
|
||||
$request = new CakeRequest('/', false);
|
||||
|
||||
$this->assertEquals($_SERVER['HTTP_HOST'], $request->header('host'));
|
||||
$this->assertEquals($_SERVER['HTTP_USER_AGENT'], $request->header('User-Agent'));
|
||||
$this->assertSame('', $request->header('X-thing'));
|
||||
$this->assertEquals($_SERVER['AUTHORIZATION'], $request->header('Authorization'));
|
||||
$this->assertEquals($_SERVER['Authorization'], $request->header('Authorization'));
|
||||
$this->assertFalse($request->header('authorization'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,7 +18,7 @@ App::uses('CakeResponse', 'Network');
|
|||
App::uses('CakeRequest', 'Network');
|
||||
|
||||
/**
|
||||
* Class CakeResponseTest
|
||||
* CakeResponseTest
|
||||
*
|
||||
* @package Cake.Test.Case.Network
|
||||
*/
|
||||
|
|
|
@ -20,7 +20,7 @@ App::uses('HttpSocket', 'Network/Http');
|
|||
App::uses('BasicAuthentication', 'Network/Http');
|
||||
|
||||
/**
|
||||
* class TestSslHttpSocket
|
||||
* TestSslHttpSocket
|
||||
*
|
||||
* @package Cake.Test.Case.Network.Http
|
||||
*/
|
||||
|
|
|
@ -20,7 +20,7 @@ App::uses('HttpSocket', 'Network/Http');
|
|||
App::uses('DigestAuthentication', 'Network/Http');
|
||||
|
||||
/**
|
||||
* Class DigestHttpSocket
|
||||
* DigestHttpSocket
|
||||
*
|
||||
* @package Cake.Test.Case.Network.Http
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@ App::uses('CakeEvent', 'Event');
|
|||
App::uses('CakeResponse', 'Network');
|
||||
|
||||
/**
|
||||
* Class AssetDispatcherTest
|
||||
* AssetDispatcherTest
|
||||
*
|
||||
* @package Cake.Test.Case.Routing.Filter
|
||||
*/
|
||||
|
|
|
@ -65,7 +65,7 @@ if (!class_exists('AppController', false)) {
|
|||
if (!class_exists('PostsController')) {
|
||||
|
||||
/**
|
||||
* Class PostsController
|
||||
* PostsController
|
||||
*
|
||||
* @package Cake.Test.Case.TestSuite
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ App::uses('HtmlCoverageReport', 'TestSuite/Coverage');
|
|||
App::uses('CakeBaseReporter', 'TestSuite/Reporter');
|
||||
|
||||
/**
|
||||
* Class HtmlCoverageReportTest
|
||||
* HtmlCoverageReportTest
|
||||
*
|
||||
* @package Cake.Test.Case.TestSuite
|
||||
*/
|
||||
|
|
|
@ -1166,6 +1166,10 @@ class CakeTimeTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testListTimezones() {
|
||||
$this->skipIf(
|
||||
version_compare(PHP_VERSION, '5.4.0', '<='),
|
||||
'This test requires newer libicu which is in php5.4+'
|
||||
);
|
||||
$return = CakeTime::listTimezones();
|
||||
$this->assertTrue(isset($return['Asia']['Asia/Bangkok']));
|
||||
$this->assertEquals('Bangkok', $return['Asia']['Asia/Bangkok']);
|
||||
|
|
|
@ -109,28 +109,86 @@ class FolderTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testInPath() {
|
||||
$path = dirname(dirname(__FILE__));
|
||||
$inside = dirname($path) . DS;
|
||||
// "/Test/test_app/"
|
||||
$basePath = CAKE . 'Test' . DS . 'test_app' . DS;
|
||||
$Base = new Folder($basePath);
|
||||
|
||||
$Folder = new Folder($path);
|
||||
$result = $Base->pwd();
|
||||
$this->assertEquals($basePath, $result);
|
||||
|
||||
$result = $Folder->pwd();
|
||||
$this->assertEquals($path, $result);
|
||||
// is "/" in "/Test/test_app/"
|
||||
$result = $Base->inPath(realpath(DS), true);
|
||||
$this->assertFalse($result, true);
|
||||
|
||||
$result = Folder::isSlashTerm($inside);
|
||||
// is "/Test/test_app/" in "/Test/test_app/"
|
||||
$result = $Base->inPath($basePath, true);
|
||||
$this->assertTrue($result);
|
||||
|
||||
$result = $Folder->realpath('Test/');
|
||||
$this->assertEquals($path . DS . 'Test' . DS, $result);
|
||||
|
||||
$result = $Folder->inPath('Test' . DS);
|
||||
// is "/Test/test_app" in "/Test/test_app/"
|
||||
$result = $Base->inPath(mb_substr($basePath, 0, -1), true);
|
||||
$this->assertTrue($result);
|
||||
|
||||
$result = $Folder->inPath(DS . 'non-existing' . $inside);
|
||||
// is "/Test/test_app/sub" in "/Test/test_app/"
|
||||
$result = $Base->inPath($basePath . 'sub', true);
|
||||
$this->assertTrue($result);
|
||||
|
||||
// is "/Test" in "/Test/test_app/"
|
||||
$result = $Base->inPath(dirname($basePath), true);
|
||||
$this->assertFalse($result);
|
||||
|
||||
$result = $Folder->inPath($path . DS . 'Model', true);
|
||||
// is "/Test/other/(...)Test/test_app" in "/Test/test_app/"
|
||||
$result = $Base->inPath(TMP . 'tests' . DS . 'other' . DS . $basePath, true);
|
||||
$this->assertFalse($result);
|
||||
|
||||
// is "/Test/test_app/" in "/"
|
||||
$result = $Base->inPath(realpath(DS));
|
||||
$this->assertTrue($result);
|
||||
|
||||
// is "/Test/test_app/" in "/Test/test_app/"
|
||||
$result = $Base->inPath($basePath);
|
||||
$this->assertTrue($result);
|
||||
|
||||
// is "/Test/test_app/" in "/Test/test_app"
|
||||
$result = $Base->inPath(mb_substr($basePath, 0, -1));
|
||||
$this->assertTrue($result);
|
||||
|
||||
// is "/Test/test_app/" in "/Test"
|
||||
$result = $Base->inPath(dirname($basePath));
|
||||
$this->assertTrue($result);
|
||||
|
||||
// is "/Test/test_app/" in "/Test/test_app/sub"
|
||||
$result = $Base->inPath($basePath . 'sub');
|
||||
$this->assertFalse($result);
|
||||
|
||||
// is "/other/Test/test_app/" in "/Test/test_app/"
|
||||
$VirtualBase = new Folder();
|
||||
$VirtualBase->path = '/other/Test/test_app';
|
||||
$result = $VirtualBase->inPath('/Test/test_app/');
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for the testInPathInvalidPathArgument test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inPathInvalidPathArgumentDataProvider() {
|
||||
return array(
|
||||
array(''),
|
||||
array('relative/path/'),
|
||||
array('unknown://stream-wrapper')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider inPathInvalidPathArgumentDataProvider
|
||||
* @param string $path
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage The $path argument is expected to be an absolute path.
|
||||
*/
|
||||
public function testInPathInvalidPathArgument($path) {
|
||||
$Folder = new Folder();
|
||||
$Folder->inPath($path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
App::uses('Hash', 'Utility');
|
||||
|
||||
/**
|
||||
* Class HashTest
|
||||
* HashTest
|
||||
*
|
||||
* @package Cake.Utility
|
||||
*/
|
||||
|
@ -1360,6 +1360,38 @@ class HashTest extends CakeTestCase {
|
|||
$this->assertEquals($sorted, $b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test sort() with locale option.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testSortLocale() {
|
||||
// get the current locale
|
||||
$oldLocale = setlocale(LC_COLLATE, '0');
|
||||
|
||||
$updated = setlocale(LC_COLLATE, 'de_DE.utf8');
|
||||
$this->skipIf($updated === false, 'Could not set locale to de_DE.utf8, skipping test.');
|
||||
|
||||
$items = array(
|
||||
array('Item' => array('entry' => 'Übergabe')),
|
||||
array('Item' => array('entry' => 'Ostfriesland')),
|
||||
array('Item' => array('entry' => 'Äpfel')),
|
||||
array('Item' => array('entry' => 'Apfel')),
|
||||
);
|
||||
|
||||
$result = Hash::sort($items, '{n}.Item.entry', 'asc', 'locale');
|
||||
$expected = array(
|
||||
array('Item' => array('entry' => 'Apfel')),
|
||||
array('Item' => array('entry' => 'Äpfel')),
|
||||
array('Item' => array('entry' => 'Ostfriesland')),
|
||||
array('Item' => array('entry' => 'Übergabe')),
|
||||
);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
// change to the original locale
|
||||
setlocale(LC_COLLATE, $oldLocale);
|
||||
}
|
||||
|
||||
/**
|
||||
* test sorting with out of order keys.
|
||||
*
|
||||
|
|
|
@ -8495,6 +8495,17 @@ class FormHelperTest extends CakeTestCase {
|
|||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Form->submit('Test', array('confirm' => 'Confirm?'));
|
||||
$expected = array(
|
||||
'div' => array('class' => 'submit'),
|
||||
'input' => array(
|
||||
'type' => 'submit', 'value' => 'Test',
|
||||
'onclick' => 'preg:/if \(confirm\("Confirm\?"\)\) \{ return true; \} event\.returnValue = false; return false;/'
|
||||
),
|
||||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8574,6 +8585,17 @@ class FormHelperTest extends CakeTestCase {
|
|||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Form->submit('cake.power.gif', array('confirm' => 'Confirm?'));
|
||||
$expected = array(
|
||||
'div' => array('class' => 'submit'),
|
||||
'input' => array(
|
||||
'type' => 'image', 'src' => 'img/cake.power.gif',
|
||||
'onclick' => 'preg:/if \(confirm\("Confirm\?"\)\) \{ return true; \} event\.returnValue = false; return false;/'
|
||||
),
|
||||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,7 +21,7 @@ App::uses('JqueryEngineHelper', 'View/Helper');
|
|||
App::uses('View', 'View');
|
||||
|
||||
/**
|
||||
* Class JqueryEngineHelperTest
|
||||
* JqueryEngineHelperTest
|
||||
*
|
||||
* @package Cake.Test.Case.View.Helper
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@ App::uses('View', 'View');
|
|||
App::uses('ClassRegistry', 'Utility');
|
||||
|
||||
/**
|
||||
* Class JsEncodingObject
|
||||
* JsEncodingObject
|
||||
*
|
||||
* @package Cake.Test.Case.View.Helper
|
||||
*/
|
||||
|
@ -41,7 +41,7 @@ class JsEncodingObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class OptionEngineHelper
|
||||
* OptionEngineHelper
|
||||
*
|
||||
* @package Cake.Test.Case.View.Helper
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@ App::uses('JsHelper', 'View/Helper');
|
|||
App::uses('MootoolsEngineHelper', 'View/Helper');
|
||||
|
||||
/**
|
||||
* Class MootoolsEngineHelperTest
|
||||
* MootoolsEngineHelperTest
|
||||
*
|
||||
* @package Cake.Test.Case.View.Helper
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@ App::uses('JsHelper', 'View/Helper');
|
|||
App::uses('PrototypeEngineHelper', 'View/Helper');
|
||||
|
||||
/**
|
||||
* Class PrototypeEngineHelperTest
|
||||
* PrototypeEngineHelperTest
|
||||
*
|
||||
* @package Cake.Test.Case.View.Helper
|
||||
*/
|
||||
|
|
|
@ -20,7 +20,7 @@ App::uses('View', 'View');
|
|||
App::uses('TextHelper', 'View/Helper');
|
||||
|
||||
/**
|
||||
* Class TextHelperTestObject
|
||||
* TextHelperTestObject
|
||||
*
|
||||
* @package Cake.Test.Case.View.Helper
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,7 @@ class HtmlAliasHelper extends HtmlHelper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class HelperCollectionTest
|
||||
* HelperCollectionTest
|
||||
*
|
||||
* @package Cake.Test.Case.View
|
||||
*/
|
||||
|
|
|
@ -220,7 +220,7 @@ class TestBeforeAfterHelper extends Helper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class TestObjectWithToString
|
||||
* TestObjectWithToString
|
||||
*
|
||||
* An object with the magic method __toString() for testing with view blocks.
|
||||
*/
|
||||
|
@ -233,7 +233,7 @@ class TestObjectWithToString {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class TestObjectWithoutToString
|
||||
* TestObjectWithoutToString
|
||||
*
|
||||
* An object without the magic method __toString() for testing with view blocks.
|
||||
*/
|
||||
|
@ -241,7 +241,7 @@ class TestObjectWithoutToString {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class TestViewEventListener
|
||||
* TestViewEventListener
|
||||
*
|
||||
* An event listener to test cakePHP events
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class FilmFileFixture
|
||||
* FilmFileFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class FruitsUuidTagFixture
|
||||
* FruitsUuidTagFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class GroupUpdateAllFixture
|
||||
* GroupUpdateAllFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class GuildFixture
|
||||
* GuildFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class GuildsPlayerFixture
|
||||
* GuildsPlayerFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class HomeFixture
|
||||
* HomeFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class ImageFixture
|
||||
* ImageFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class InnoFixture
|
||||
* InnoFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class ItemFixture
|
||||
* ItemFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class ItemsPortfolioFixture
|
||||
* ItemsPortfolioFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class JoinABFixture
|
||||
* JoinABFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class JoinACFixture
|
||||
* JoinACFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class JoinAFixture
|
||||
* JoinAFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class JoinBFixture
|
||||
* JoinBFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class JoinCFixture
|
||||
* JoinCFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class JoinThingFixture
|
||||
* JoinThingFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class MessageFixture
|
||||
* MessageFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class MyCategoriesMyProductsFixture
|
||||
* MyCategoriesMyProductsFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class MyCategoriesMyUsersFixture
|
||||
* MyCategoriesMyUsersFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class MyCategoryFixture
|
||||
* MyCategoryFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class MyProductFixture
|
||||
* MyProductFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class MyUserFixture
|
||||
* MyUserFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class NodeFixture
|
||||
* NodeFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
* @since CakePHP(tm) v 1.2.0.6879 //Correct version number as needed**
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class NumberTreeFixture
|
||||
* NumberTreeFixture
|
||||
*
|
||||
* Generates a tree of data for use testing the tree behavior
|
||||
*
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class NumberTreeTwoFixture
|
||||
* NumberTreeTwoFixture
|
||||
*
|
||||
* Generates a tree of data for use testing the tree behavior
|
||||
*
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class NumericArticleFixture
|
||||
* NumericArticleFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class OverallFavoriteFixture
|
||||
* OverallFavoriteFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class PersonFixture
|
||||
* PersonFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class PlayerFixture
|
||||
* PlayerFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class PortfolioFixture
|
||||
* PortfolioFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class PostsTagFixture
|
||||
* PostsTagFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class PrimaryModelFixture
|
||||
* PrimaryModelFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class ProductFixture
|
||||
* ProductFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class ProductUpdateAllFixture
|
||||
* ProductUpdateAllFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class ProjectFixture
|
||||
* ProjectFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class SampleFixture
|
||||
* SampleFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class SecondaryModelFixture
|
||||
* SecondaryModelFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class SessionFixture
|
||||
* SessionFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class SiteFixture
|
||||
* SiteFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class SomethingElseFixture
|
||||
* SomethingElseFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class SomethingFixture
|
||||
* SomethingFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class StoriesTagFixture
|
||||
* StoriesTagFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class StoryFixture
|
||||
* StoryFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class SyfileFixture
|
||||
* SyfileFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class TagFixture
|
||||
* TagFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class TestPluginArticleFixture
|
||||
* TestPluginArticleFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class TestPluginCommentFixture
|
||||
* TestPluginCommentFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class ThePaperMonkiesFixture
|
||||
* ThePaperMonkiesFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class ThreadFixture
|
||||
* ThreadFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class TranslateArticleFixture
|
||||
* TranslateArticleFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class TranslateFixture
|
||||
* TranslateFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class TranslateTableFixture
|
||||
* TranslateTableFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
/**
|
||||
* Class TranslateWithPrefixFixture
|
||||
* TranslateWithPrefixFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class TranslatedArticleFixture
|
||||
* TranslatedArticleFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class TranslatedItemFixture
|
||||
* TranslatedItemFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class UserFixture
|
||||
* UserFixture
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class UuidFixture.
|
||||
* UuidFixture.
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Class UuidNativeFixture.
|
||||
* UuidNativeFixture.
|
||||
*
|
||||
* @package Cake.Test.Fixture
|
||||
*/
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue