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>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $name Filename without the .php part
|
* @param string $name Filename without the .php part
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function uses() {
|
function uses() {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
|
|
@ -111,10 +111,10 @@ class BasicsTest extends CakeTestCase {
|
||||||
|
|
||||||
$_SERVER['HTTPS'] = 'off';
|
$_SERVER['HTTPS'] = 'off';
|
||||||
$this->assertFalse(env('HTTPS'));
|
$this->assertFalse(env('HTTPS'));
|
||||||
|
|
||||||
$_SERVER['HTTPS'] = false;
|
$_SERVER['HTTPS'] = false;
|
||||||
$this->assertFalse(env('HTTPS'));
|
$this->assertFalse(env('HTTPS'));
|
||||||
|
|
||||||
$_SERVER['HTTPS'] = '';
|
$_SERVER['HTTPS'] = '';
|
||||||
$this->assertFalse(env('HTTPS'));
|
$this->assertFalse(env('HTTPS'));
|
||||||
|
|
||||||
|
@ -564,7 +564,7 @@ class BasicsTest extends CakeTestCase {
|
||||||
ob_start();
|
ob_start();
|
||||||
debug('this-is-a-test');
|
debug('this-is-a-test');
|
||||||
$result = ob_get_clean();
|
$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 .= preg_quote(substr(__FILE__, 1), '/') . ')';
|
||||||
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*this-is-a-test.*/s';
|
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*this-is-a-test.*/s';
|
||||||
$this->assertPattern($pattern, $result);
|
$this->assertPattern($pattern, $result);
|
||||||
|
@ -572,7 +572,7 @@ class BasicsTest extends CakeTestCase {
|
||||||
ob_start();
|
ob_start();
|
||||||
debug('<div>this-is-a-test</div>', true);
|
debug('<div>this-is-a-test</div>', true);
|
||||||
$result = ob_get_clean();
|
$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 .= preg_quote(substr(__FILE__, 1), '/') . ')';
|
||||||
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*<div>this-is-a-test<\/div>.*/s';
|
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*<div>this-is-a-test<\/div>.*/s';
|
||||||
$this->assertPattern($pattern, $result);
|
$this->assertPattern($pattern, $result);
|
||||||
|
|
Loading…
Reference in a new issue