Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reformatting code to use tabs.

Fixing issue with float comparison.
Fixes #219
  • Loading branch information...
commit 4496a0a0bb82be02d27092cf1e429d3ab6d9a94b 1 parent b8f0dda
@markstory markstory authored
Showing with 30 additions and 30 deletions.
  1. +30 −30 cake/tests/cases/libs/controller/controller.test.php
View
60 cake/tests/cases/libs/controller/controller.test.php
@@ -701,36 +701,36 @@ function testPaginateExtraParams() {
* @return void
* @access public
*/
- function testPaginateFieldsDouble(){
- $Controller =& new Controller();
- $Controller->uses = array('ControllerPost');
- $Controller->params['url'] = array();
- $Controller->constructClasses();
-
- $Controller->paginate = array(
- 'fields' => array(
- 'ControllerPost.id',
- 'radians(180.0) as floatvalue'
- ),
- 'order' => array('ControllerPost.created'=>'DESC'),
- 'limit' => 1,
- 'page' => 1,
- 'recursive' => -1
- );
- $conditions = array();
- $result = $Controller->paginate('ControllerPost',$conditions);
- $expected = array(
- 0=>array(
- 'ControllerPost'=>array(
- 'id'=>3,
- ),
- 0=>array(
- 'floatvalue'=>3.1415926545898,
- ),
- ),
- );
- $this->assertEqual($result, $expected);
- }
+ function testPaginateFieldsDouble(){
+ $Controller =& new Controller();
+ $Controller->uses = array('ControllerPost');
+ $Controller->params['url'] = array();
+ $Controller->constructClasses();
+
+ $Controller->paginate = array(
+ 'fields' => array(
+ 'ControllerPost.id',
+ 'radians(180.0) as floatvalue'
+ ),
+ 'order' => array('ControllerPost.created'=>'DESC'),
+ 'limit' => 1,
+ 'page' => 1,
+ 'recursive' => -1
+ );
+ $conditions = array();
+ $result = $Controller->paginate('ControllerPost',$conditions);
+ $expected = array(
+ array(
+ 'ControllerPost' => array(
+ 'id' => 3,
+ ),
+ 0 => array(
+ 'floatvalue' => '3.14159265358979',
+ ),
+ ),
+ );
+ $this->assertEqual($result, $expected);
+ }
/**
Please sign in to comment.
Something went wrong with that request. Please try again.