mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Making basics.test.php testDebug more symlink friendly. Adding deprecated tag to global 'uses' method
This commit is contained in:
parent
61c2c3009d
commit
d70900c540
2 changed files with 5 additions and 4 deletions
|
@ -84,6 +84,7 @@ if (!function_exists('clone')) {
|
|||
* </code>
|
||||
*
|
||||
* @param string $name Filename without the .php part
|
||||
* @deprecated
|
||||
*/
|
||||
function uses() {
|
||||
$args = func_get_args();
|
||||
|
|
|
@ -111,10 +111,10 @@ class BasicsTest extends CakeTestCase {
|
|||
|
||||
$_SERVER['HTTPS'] = 'off';
|
||||
$this->assertFalse(env('HTTPS'));
|
||||
|
||||
|
||||
$_SERVER['HTTPS'] = false;
|
||||
$this->assertFalse(env('HTTPS'));
|
||||
|
||||
|
||||
$_SERVER['HTTPS'] = '';
|
||||
$this->assertFalse(env('HTTPS'));
|
||||
|
||||
|
@ -564,7 +564,7 @@ class BasicsTest extends CakeTestCase {
|
|||
ob_start();
|
||||
debug('this-is-a-test');
|
||||
$result = ob_get_clean();
|
||||
$pattern = '/.*\>(cake(\/|\\\)tests(\/|\\\)cases(\/|\\\)basics\.test\.php|';
|
||||
$pattern = '/.*\>(.+?cake(\/|\\\)tests(\/|\\\)cases(\/|\\\)basics\.test\.php|';
|
||||
$pattern .= preg_quote(substr(__FILE__, 1), '/') . ')';
|
||||
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*this-is-a-test.*/s';
|
||||
$this->assertPattern($pattern, $result);
|
||||
|
@ -572,7 +572,7 @@ class BasicsTest extends CakeTestCase {
|
|||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', true);
|
||||
$result = ob_get_clean();
|
||||
$pattern = '/.*\>(cake(\/|\\\)tests(\/|\\\)cases(\/|\\\)basics\.test\.php|';
|
||||
$pattern = '/.*\>(.+?cake(\/|\\\)tests(\/|\\\)cases(\/|\\\)basics\.test\.php|';
|
||||
$pattern .= preg_quote(substr(__FILE__, 1), '/') . ')';
|
||||
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*<div>this-is-a-test<\/div>.*/s';
|
||||
$this->assertPattern($pattern, $result);
|
||||
|
|
Loading…
Reference in a new issue