Skip to content

Commit

Permalink
fixing some test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
gwoo committed Aug 2, 2009
1 parent c1b919a commit f9f67a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
4 changes: 2 additions & 2 deletions cake/tests/cases/basics.test.php
Expand Up @@ -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);
Expand Down
17 changes: 0 additions & 17 deletions cake/tests/cases/libs/view/helpers/xml.test.php
Expand Up @@ -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
*
Expand Down

0 comments on commit f9f67a1

Please sign in to comment.