Permalink
Browse files

fixing some test cases

  • Loading branch information...
1 parent c1b919a commit f9f67a17598a4bea724a902820444d6a2ca60907 gwoo committed Aug 2, 2009
Showing with 2 additions and 19 deletions.
  1. +2 −2 cake/tests/cases/basics.test.php
  2. +0 −17 cake/tests/cases/libs/view/helpers/xml.test.php
View
4 cake/tests/cases/basics.test.php
@@ -588,15 +588,15 @@ function testDebug() {
ob_start();
debug('this-is-a-test');
$result = ob_get_clean();
- $pattern = '/.*\>(.+?cake(\/|\\\)tests(\/|\\\)cases(\/|\\\)basics\.test\.php|';
+ $pattern = '/.*\>(.+?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 = '/.*\>(.+?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);
View
17 cake/tests/cases/libs/view/helpers/xml.test.php
@@ -242,24 +242,7 @@ function testSerializeOnMultiDimensionalArray() {
$this->assertIdentical($result, $expected);
}
-/**
- * testSerializeOnMultiDimensionalArray method
- *
- * @access public
- * @return void
- */
- function testSerializeOnMultiDimensionalArray() {
- $data = array(
- 'Statuses' => array(
- array('Status' => array('id' => 1)),
- array('Status' => array('id' => 2))
- )
- );
- $result = $this->Xml->serialize($data, array('format' => 'tags'));
- $expected = '<statuses><status><id>1</id></status><status><id>2</id></status></statuses>';
- $this->assertIdentical($result, $expected);
- }
/**
* testHeader method
*

0 comments on commit f9f67a1

Please sign in to comment.