Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote branch 'origin/1.3' into 1.3

  • Loading branch information...
commit 9bd0960cf16dacfd2ccbebeece592477d17cbc77 2 parents 0dfc07b + 888fdd3
@predominant predominant authored
View
6 cake/libs/configure.php
@@ -683,11 +683,13 @@ function build($paths = array(), $reset = false) {
$merge = array_merge($merge, (array)$core[$type]);
}
- $_this->{$type} = $default;
+ if (empty($_this->{$type}) || empty($paths)) {
+ $_this->{$type} = $default;
+ }
if (!empty($paths[$type])) {
$path = array_flip(array_flip(array_merge(
- $_this->{$type}, (array)$paths[$type], $merge
+ (array)$paths[$type], $_this->{$type}, $merge
)));
$_this->{$type} = array_values($path);
} else {
View
5 cake/tests/cases/libs/configure.test.php
@@ -323,8 +323,8 @@ function testBuild() {
$new = App::path('models');
$expected = array(
- APP . 'models' . DS,
'/path/to/models/',
+ APP . 'models' . DS,
APP,
ROOT . DS . LIBS . 'model' . DS
);
@@ -599,9 +599,12 @@ function testImportingHelpersFromAlternatePaths() {
App::build(array(
'helpers' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'helpers' . DS)
));
+ App::build(array('vendors' => array(TEST_CAKE_CORE_INCLUDE_PATH)));
$this->assertFalse(class_exists('BananaHelper'), 'BananaHelper exists, cannot test importing it.');
App::import('Helper', 'Banana');
$this->assertTrue(class_exists('BananaHelper'), 'BananaHelper was not loaded.');
+
+ App::build();
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.