mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing typo
This commit is contained in:
parent
317aad9526
commit
7fc5e8f810
2 changed files with 13 additions and 3 deletions
|
@ -350,7 +350,7 @@ class App {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($paths[$type])) {
|
if (!empty($paths[$type])) {
|
||||||
if ($mode === APP::PREPEND) {
|
if ($mode === App::PREPEND) {
|
||||||
$path = array_merge((array)$paths[$type], self::$__packages[$type]);
|
$path = array_merge((array)$paths[$type], self::$__packages[$type]);
|
||||||
} else {
|
} else {
|
||||||
$path = array_merge(self::$__packages[$type], (array)$paths[$type]);
|
$path = array_merge(self::$__packages[$type], (array)$paths[$type]);
|
||||||
|
|
|
@ -31,7 +31,17 @@ class AppImportTest extends CakeTestCase {
|
||||||
$this->assertEqual($expected, $new);
|
$this->assertEqual($expected, $new);
|
||||||
|
|
||||||
App::build();
|
App::build();
|
||||||
App::build(array('Model' => array('/path/to/models/')), APP::APPEND);
|
App::build(array('Model' => array('/path/to/models/')), App::PREPEND);
|
||||||
|
$new = App::path('Model');
|
||||||
|
$expected = array(
|
||||||
|
'/path/to/models/',
|
||||||
|
APP . 'Model' . DS,
|
||||||
|
APP . 'models' . DS
|
||||||
|
);
|
||||||
|
$this->assertEqual($expected, $new);
|
||||||
|
|
||||||
|
App::build();
|
||||||
|
App::build(array('Model' => array('/path/to/models/')), App::APPEND);
|
||||||
$new = App::path('Model');
|
$new = App::path('Model');
|
||||||
$expected = array(
|
$expected = array(
|
||||||
APP . 'Model' . DS,
|
APP . 'Model' . DS,
|
||||||
|
@ -44,7 +54,7 @@ class AppImportTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Model' => array('/path/to/models/'),
|
'Model' => array('/path/to/models/'),
|
||||||
'Controller' => array('/path/to/controllers/'),
|
'Controller' => array('/path/to/controllers/'),
|
||||||
), APP::APPEND);
|
), App::APPEND);
|
||||||
$new = App::path('Model');
|
$new = App::path('Model');
|
||||||
$expected = array(
|
$expected = array(
|
||||||
APP . 'Model' . DS,
|
APP . 'Model' . DS,
|
||||||
|
|
Loading…
Reference in a new issue