mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 23:49:55 +00:00
fixes #4958, Windows directory separator issue
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7221 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f7a4858503
commit
66ea6be098
2 changed files with 14 additions and 14 deletions
|
@ -42,7 +42,7 @@ App::import('Helper', array('Session'));
|
||||||
class SessionHelperTest extends CakeTestCase {
|
class SessionHelperTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* setUp method
|
* setUp method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -79,7 +79,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* tearDown method
|
* tearDown method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -89,7 +89,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testRead method
|
* testRead method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -102,7 +102,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testCheck method
|
* testCheck method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -117,7 +117,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testWrite method
|
* testWrite method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -127,7 +127,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testFlash method
|
* testFlash method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -146,7 +146,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
$this->Session->flash('classy');
|
$this->Session->flash('classy');
|
||||||
$result = ob_get_clean();
|
$result = ob_get_clean();
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
|
|
||||||
Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS));
|
Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS));
|
||||||
$controller = new Controller();
|
$controller = new Controller();
|
||||||
$this->Session->view = new View($controller);
|
$this->Session->view = new View($controller);
|
||||||
|
@ -156,6 +156,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
$result = ob_get_contents();
|
$result = ob_get_contents();
|
||||||
ob_clean();
|
ob_clean();
|
||||||
|
|
||||||
|
$result = str_replace("\r\n", "\n", $result);
|
||||||
$expected = "<div id=\"notificationLayout\">\n\t<h1>Alert!</h1>\n\t<h3>Notice!</h3>\n\t<p>This is a test of the emergency broadcasting system</p>\n</div>";
|
$expected = "<div id=\"notificationLayout\">\n\t<h1>Alert!</h1>\n\t<h3>Notice!</h3>\n\t<p>This is a test of the emergency broadcasting system</p>\n</div>";
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
$this->assertFalse($this->Session->check('Message.notification'));
|
$this->assertFalse($this->Session->check('Message.notification'));
|
||||||
|
@ -171,7 +172,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testID method
|
* testID method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -182,7 +183,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testError method
|
* testError method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -197,7 +198,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testDisabling method
|
* testDisabling method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -218,7 +219,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testValid method
|
* testValid method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -236,7 +236,7 @@ class ThemeViewTest extends UnitTestCase {
|
||||||
$expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
|
$expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
|
||||||
set_error_handler('simpleTestErrorHandler');
|
set_error_handler('simpleTestErrorHandler');
|
||||||
$this->assertPattern("/PagesController::/", $expected);
|
$this->assertPattern("/PagesController::/", $expected);
|
||||||
$this->assertPattern("/views\/themed\/my_theme\/pages\/does_not_exist.ctp/", $expected);
|
$this->assertPattern("/views(\/|\\\)themed(\/|\\\)my_theme(\/|\\\)pages(\/|\\\)does_not_exist.ctp/", $expected);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testMissingLayout method
|
* testMissingLayout method
|
||||||
|
@ -258,7 +258,7 @@ class ThemeViewTest extends UnitTestCase {
|
||||||
$expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
|
$expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
|
||||||
set_error_handler('simpleTestErrorHandler');
|
set_error_handler('simpleTestErrorHandler');
|
||||||
$this->assertPattern("/Missing Layout/", $expected);
|
$this->assertPattern("/Missing Layout/", $expected);
|
||||||
$this->assertPattern("/views\/themed\/my_theme\/layouts\/whatever.ctp/", $expected);
|
$this->assertPattern("/views(\/|\\\)themed(\/|\\\)my_theme(\/|\\\)layouts(\/|\\\)whatever.ctp/", $expected);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* tearDown method
|
* tearDown method
|
||||||
|
@ -270,7 +270,6 @@ class ThemeViewTest extends UnitTestCase {
|
||||||
unset($this->ThemeView);
|
unset($this->ThemeView);
|
||||||
unset($this->PostsController);
|
unset($this->PostsController);
|
||||||
unset($this->Controller);
|
unset($this->Controller);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue