mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 02:22: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
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testNl() {
|
public function testNl() {
|
||||||
$newLine = '\n';
|
$newLine = "\n";
|
||||||
if (DS === '\\') {
|
if (DS === '\\') {
|
||||||
$newLine = "\r\n";
|
$newLine = "\r\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,23 +367,25 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
$Dispatcher->parseParams($params);
|
$Dispatcher->parseParams($params);
|
||||||
$this->assertEqual($expected, $Dispatcher->params);
|
$this->assertEqual($expected, $Dispatcher->params);
|
||||||
|
|
||||||
$params = array(
|
if (DS === '\\') {
|
||||||
'cake.php',
|
$params = array(
|
||||||
'-working',
|
'cake.php',
|
||||||
'D:\www',
|
'-working',
|
||||||
'bake',
|
'D:\www',
|
||||||
'my_app',
|
'bake',
|
||||||
);
|
'my_app',
|
||||||
$expected = array(
|
);
|
||||||
'working' => 'D:\\\\www',
|
$expected = array(
|
||||||
'app' => 'www',
|
'working' => 'D:\\\\www',
|
||||||
'root' => 'D:\\',
|
'app' => 'www',
|
||||||
'webroot' => 'webroot'
|
'root' => 'D:\\',
|
||||||
);
|
'webroot' => 'webroot'
|
||||||
|
);
|
||||||
|
|
||||||
$Dispatcher->params = $Dispatcher->args = array();
|
$Dispatcher->params = $Dispatcher->args = array();
|
||||||
$Dispatcher->parseParams($params);
|
$Dispatcher->parseParams($params);
|
||||||
$this->assertEqual($expected, $Dispatcher->params);
|
$this->assertEqual($expected, $Dispatcher->params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue