Removing uses() it was deprecated in 1.3. Use App::import() instead.

This commit is contained in:
mark_story 2010-12-16 23:05:21 -05:00
parent f50a97bff1
commit 24373ae3c1
3 changed files with 1 additions and 40 deletions

View file

@ -25,9 +25,7 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
/**
* Ensure required classes are available.
*/
if (!class_exists('File')) {
uses('file');
}
App::import('Core', 'File');
/**
* Make clean CSS

View file

@ -61,24 +61,6 @@
return true;
}
/**
* Loads component/components from LIBS. Takes optional number of parameters.
*
* Example:
*
* `uses('flay', 'time');`
*
* @param string $name Filename without the .php part
* @deprecated Will be removed in 2.0
* @link http://book.cakephp.org/view/1140/uses
*/
function uses() {
$args = func_get_args();
foreach ($args as $file) {
require_once(LIBS . strtolower($file) . '.php');
}
}
/**
* Prints out debug information about given variable.
*

View file

@ -167,25 +167,6 @@ class BasicsTest extends CakeTestCase {
$_ENV = $__ENV;
}
/**
* test uses()
*
* @return void
* @access public
* @deprecated
*/
function testUses() {
$this->skipIf(class_exists('Security') || class_exists('Sanitize'), '%s Security and/or Sanitize class already loaded');
$this->assertFalse(class_exists('Security'));
$this->assertFalse(class_exists('Sanitize'));
uses('Security', 'Sanitize');
$this->assertTrue(class_exists('Security'));
$this->assertTrue(class_exists('Sanitize'));
}
/**
* Test h()
*