Permalink
Browse files

Making xml data test php5 only as Xml::compare() is non-functional in…

… php4
  • Loading branch information...
1 parent 5d280ea commit 5212406ea72584336117f177f7d56e19447101be @markstory markstory committed Jan 15, 2010
Showing with 12 additions and 10 deletions.
  1. +12 −10 cake/tests/cases/libs/controller/components/auth.test.php
@@ -1244,16 +1244,18 @@ function testHashPasswords() {
$expected['AuthUser']['password'] = Security::hash($expected['AuthUser']['password'], null, true);
$this->assertEqual($return, $expected);
- $xml = array(
- 'User' => array(
- 'username' => 'batman@batcave.com',
- 'password' => 'bruceWayne',
- )
- );
- $data = new Xml($xml);
- $return = $this->Controller->Auth->hashPasswords($data);
- $expected = $data;
- $this->assertEqual($return, $expected);
+ if (PHP5) {
+ $xml = array(
+ 'User' => array(
+ 'username' => 'batman@batcave.com',
+ 'password' => 'bruceWayne',
+ )
+ );
+ $data =& new Xml($xml);
+ $return = $this->Controller->Auth->hashPasswords($data);
+ $expected = $data;
+ $this->assertEqual($return, $expected);
+ }
}
/**

0 comments on commit 5212406

Please sign in to comment.