mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-01 17:12:39 +00:00
Fixing a couple of recently broken tests
This commit is contained in:
parent
5035bb99f8
commit
1814b06695
2 changed files with 19 additions and 17 deletions
|
@ -344,7 +344,7 @@ class ShellTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testNl() {
|
||||
$newLine = '\n';
|
||||
$newLine = "\n";
|
||||
if (DS === '\\') {
|
||||
$newLine = "\r\n";
|
||||
}
|
||||
|
|
|
@ -367,23 +367,25 @@ class ShellDispatcherTest extends CakeTestCase {
|
|||
$Dispatcher->parseParams($params);
|
||||
$this->assertEqual($expected, $Dispatcher->params);
|
||||
|
||||
$params = array(
|
||||
'cake.php',
|
||||
'-working',
|
||||
'D:\www',
|
||||
'bake',
|
||||
'my_app',
|
||||
);
|
||||
$expected = array(
|
||||
'working' => 'D:\\\\www',
|
||||
'app' => 'www',
|
||||
'root' => 'D:\\',
|
||||
'webroot' => 'webroot'
|
||||
);
|
||||
if (DS === '\\') {
|
||||
$params = array(
|
||||
'cake.php',
|
||||
'-working',
|
||||
'D:\www',
|
||||
'bake',
|
||||
'my_app',
|
||||
);
|
||||
$expected = array(
|
||||
'working' => 'D:\\\\www',
|
||||
'app' => 'www',
|
||||
'root' => 'D:\\',
|
||||
'webroot' => 'webroot'
|
||||
);
|
||||
|
||||
$Dispatcher->params = $Dispatcher->args = array();
|
||||
$Dispatcher->parseParams($params);
|
||||
$this->assertEqual($expected, $Dispatcher->params);
|
||||
$Dispatcher->params = $Dispatcher->args = array();
|
||||
$Dispatcher->parseParams($params);
|
||||
$this->assertEqual($expected, $Dispatcher->params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue