mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge branch '1.3' of git@github.com:cakephp/cakephp1x into 1.3
This commit is contained in:
commit
29eed5f5e8
3 changed files with 5 additions and 33 deletions
|
@ -119,6 +119,7 @@ class CacheTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
function testInvaidConfig() {
|
||||
$this->expectError();
|
||||
Cache::config('Invalid', array(
|
||||
'engine' => 'File',
|
||||
'duration' => '+1 year',
|
||||
|
|
8
cake/tests/cases/libs/cache/apc.test.php
vendored
8
cake/tests/cases/libs/cache/apc.test.php
vendored
|
@ -182,16 +182,16 @@ class ApcEngineTest extends CakeTestCase {
|
|||
$this->assertTrue($result);
|
||||
|
||||
$result = Cache::increment('test_increment');
|
||||
$this->assertEqual(5, $result);
|
||||
$this->assertEqual(6, $result);
|
||||
|
||||
$result = Cache::read('test_increment');
|
||||
$this->assertEqual(5, $result);
|
||||
$this->assertEqual(6, $result);
|
||||
|
||||
$result = Cache::increment('test_increment', 2);
|
||||
$this->assertEqual(7, $result);
|
||||
$this->assertEqual(8, $result);
|
||||
|
||||
$result = Cache::read('test_increment');
|
||||
$this->assertEqual(7, $result);
|
||||
$this->assertEqual(8, $result);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -616,34 +616,5 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
App::build();
|
||||
}
|
||||
|
||||
/**
|
||||
* test that the beforeRedirect callback properly converts
|
||||
* array urls into their correct string ones, and adds base => false so
|
||||
* the correct urls are generated.
|
||||
*
|
||||
* @link http://cakephp.lighthouseapp.com/projects/42648-cakephp-1x/tickets/276
|
||||
* @return void
|
||||
*/
|
||||
function testBeforeRedirectCallbackWithArrayUrl() {
|
||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
|
||||
App::build(array(
|
||||
'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)
|
||||
), true);
|
||||
Router::setRequestInfo(array(
|
||||
array('plugin' => null, 'controller' => 'accounts', 'action' => 'index', 'pass' => array(), 'named' => array(), 'form' => array(), 'url' => array('url' => 'accounts/'), 'bare' => 0),
|
||||
array('base' => '/officespace', 'here' => '/officespace/accounts/', 'webroot' => '/officespace/')
|
||||
));
|
||||
|
||||
$RequestHandler =& new NoStopRequestHandler();
|
||||
|
||||
ob_start();
|
||||
$RequestHandler->beforeRedirect(
|
||||
$this->Controller,
|
||||
array('controller' => 'request_handler_test', 'action' => 'param_method', 'first', 'second')
|
||||
);
|
||||
$result = ob_get_clean();
|
||||
$this->assertEqual($result, 'one: first two: second');
|
||||
App::build();
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in a new issue