mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
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:
parent
6546a39098
commit
1960be0dfa
5 changed files with 6 additions and 7 deletions
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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.
|
||||||
*
|
*
|
||||||
|
|
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue