Permalink
Browse files

Making basics.test.php testDebug more symlink friendly. Adding deprec…

…ated tag to global 'uses' method
  • Loading branch information...
1 parent 61c2c30 commit d70900c54007d8b5bb6c3138df2328715b3c5cc7 @jperras jperras committed Jul 23, 2009
Showing with 5 additions and 4 deletions.
  1. +1 −0 cake/basics.php
  2. +4 −4 cake/tests/cases/basics.test.php
View
@@ -84,6 +84,7 @@ function config() {
* </code>
*
* @param string $name Filename without the .php part
+ * @deprecated
*/
function uses() {
$args = func_get_args();
@@ -111,10 +111,10 @@ function testEnv() {
$_SERVER['HTTPS'] = 'off';
$this->assertFalse(env('HTTPS'));
-
+
$_SERVER['HTTPS'] = false;
$this->assertFalse(env('HTTPS'));
-
+
$_SERVER['HTTPS'] = '';
$this->assertFalse(env('HTTPS'));
@@ -564,15 +564,15 @@ function testDebug() {
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);
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) . '.*&lt;div&gt;this-is-a-test&lt;\/div&gt;.*/s';
$this->assertPattern($pattern, $result);

0 comments on commit d70900c

Please sign in to comment.