mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing debug() test making it match truncated paths too.
Adding skip to uses() test to make running all tests in sequence more smooth. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8104 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e3b027288b
commit
93bf4fd0dc
1 changed files with 8 additions and 4 deletions
|
@ -119,6 +119,8 @@ class BasicsTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
function testUses() {
|
||||
$this->skipIf(class_exists('Security') || class_exists('Sanitize'), 'Security and/or Sanitize class already loaded');
|
||||
|
||||
$this->assertFalse(class_exists('Security'));
|
||||
$this->assertFalse(class_exists('Sanitize'));
|
||||
|
||||
|
@ -532,15 +534,17 @@ class BasicsTest extends CakeTestCase {
|
|||
ob_start();
|
||||
debug('this-is-a-test');
|
||||
$result = ob_get_clean();
|
||||
$pattern = '/.*' . preg_quote(substr(__FILE__, 1), '/')
|
||||
. '.*line.*' . (__LINE__ - 3) . '.*this-is-a-test.*/s';
|
||||
$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 = '/.*' . preg_quote(substr(__FILE__, 1), '/')
|
||||
. '.*line.*' . (__LINE__ - 3) . '.*<div>this-is-a-test<\/div>.*/s';
|
||||
$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…
Add table
Reference in a new issue