Deprecating vendor() and removing all instances from the core, fixes #4016

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6497 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-03-01 05:23:32 +00:00
parent 6546a39098
commit 1960be0dfa
5 changed files with 6 additions and 7 deletions

View file

@ -99,7 +99,7 @@ if (isset($_GET['output']) && $_GET['output'] == 'html') {
define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_TEXT); define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_TEXT);
} }
if (!vendor('simpletest' . DS . 'reporter')) { if (!App::import('Vendor', 'simpletest' . DS . 'reporter')) {
CakePHPTestHeader(); CakePHPTestHeader();
include CAKE . 'tests' . DS . 'lib' . DS . 'simpletest.php'; include CAKE . 'tests' . DS . 'lib' . DS . 'simpletest.php';
CakePHPTestSuiteFooter(); CakePHPTestSuiteFooter();

View file

@ -144,11 +144,10 @@ if (!function_exists('clone')) {
} }
} }
/** /**
* Require given files in the VENDORS directory. Takes optional number of parameters. * @deprecated
*
* @param string $name Filename without the .php part.
*/ */
function vendor() { function vendor() {
trigger_error('(vendor) Deprecated, see App::import(\'Vendor\', \'...\');', E_USER_WARNING);
$args = func_get_args(); $args = func_get_args();
$c = func_num_args(); $c = func_num_args();

View file

@ -99,7 +99,7 @@ if (isset($_GET['output']) && $_GET['output'] == 'html') {
define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_TEXT); define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_TEXT);
} }
if (!vendor('simpletest' . DS . 'reporter')) { if (!App::import('Vendor', 'simpletest' . DS . 'reporter')) {
CakePHPTestHeader(); CakePHPTestHeader();
include CAKE . 'tests' . DS . 'lib' . DS . 'simpletest.php'; include CAKE . 'tests' . DS . 'lib' . DS . 'simpletest.php';
CakePHPTestSuiteFooter(); CakePHPTestSuiteFooter();

View file

@ -28,7 +28,7 @@
*/ */
require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_model.php'; require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_model.php';
require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_fixture.php'; require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_fixture.php';
vendor('simpletest'.DS.'unit_tester'); !App::import('Vendor', 'simpletest' . DS . 'unit_tester');
/** /**
* Short description for class. * Short description for class.
* *

View file

@ -49,7 +49,7 @@ class TestManager {
} }
function _installSimpleTest() { function _installSimpleTest() {
vendor('simpletest'.DS.'unit_tester', 'simpletest'.DS.'mock_objects', 'simpletest'.DS.'web_tester'); App::import('Vendor', array('simpletest'.DS.'unit_tester', 'simpletest'.DS.'mock_objects', 'simpletest'.DS.'web_tester'));
require_once(LIB_TESTS . 'cake_web_test_case.php'); require_once(LIB_TESTS . 'cake_web_test_case.php');
require_once(LIB_TESTS . 'cake_test_case.php'); require_once(LIB_TESTS . 'cake_test_case.php');
} }