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:
renan.saddam 2008-06-20 19:30:29 +00:00
parent f7a4858503
commit 66ea6be098
2 changed files with 14 additions and 14 deletions

View file

@ -42,7 +42,7 @@ App::import('Helper', array('Session'));
class SessionHelperTest extends CakeTestCase {
/**
* setUp method
*
*
* @access public
* @return void
*/
@ -79,7 +79,7 @@ class SessionHelperTest extends CakeTestCase {
}
/**
* tearDown method
*
*
* @access public
* @return void
*/
@ -89,7 +89,7 @@ class SessionHelperTest extends CakeTestCase {
}
/**
* testRead method
*
*
* @access public
* @return void
*/
@ -102,7 +102,7 @@ class SessionHelperTest extends CakeTestCase {
}
/**
* testCheck method
*
*
* @access public
* @return void
*/
@ -117,7 +117,7 @@ class SessionHelperTest extends CakeTestCase {
}
/**
* testWrite method
*
*
* @access public
* @return void
*/
@ -127,7 +127,7 @@ class SessionHelperTest extends CakeTestCase {
}
/**
* testFlash method
*
*
* @access public
* @return void
*/
@ -146,7 +146,7 @@ class SessionHelperTest extends CakeTestCase {
$this->Session->flash('classy');
$result = ob_get_clean();
$this->assertEqual($result, $expected);
Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS));
$controller = new Controller();
$this->Session->view = new View($controller);
@ -156,6 +156,7 @@ class SessionHelperTest extends CakeTestCase {
$result = ob_get_contents();
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>";
$this->assertEqual($result, $expected);
$this->assertFalse($this->Session->check('Message.notification'));
@ -171,7 +172,7 @@ class SessionHelperTest extends CakeTestCase {
}
/**
* testID method
*
*
* @access public
* @return void
*/
@ -182,7 +183,7 @@ class SessionHelperTest extends CakeTestCase {
}
/**
* testError method
*
*
* @access public
* @return void
*/
@ -197,7 +198,7 @@ class SessionHelperTest extends CakeTestCase {
}
/**
* testDisabling method
*
*
* @access public
* @return void
*/
@ -218,7 +219,7 @@ class SessionHelperTest extends CakeTestCase {
}
/**
* testValid method
*
*
* @access public
* @return void
*/

View file

@ -236,7 +236,7 @@ class ThemeViewTest extends UnitTestCase {
$expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
set_error_handler('simpleTestErrorHandler');
$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
@ -258,7 +258,7 @@ class ThemeViewTest extends UnitTestCase {
$expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
set_error_handler('simpleTestErrorHandler');
$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
@ -270,7 +270,6 @@ class ThemeViewTest extends UnitTestCase {
unset($this->ThemeView);
unset($this->PostsController);
unset($this->Controller);
}
}
?>