Merge remote-tracking branch 'origin/2.0' into 2.0-api-doc

Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/View/Helper/CacheHelper.php
This commit is contained in:
Juan Basso 2011-08-20 01:47:27 -04:00
commit a1a049c700
13 changed files with 217 additions and 59 deletions

View file

@ -317,8 +317,13 @@ class CacheHelperTest extends CakeTestCase {
@unlink($filename);
}
function testCacheCallbacks() {
/**
* Test that callback code is generated correctly.
*
* @return void
*/
public function testCacheCallbacks() {
$this->Controller->cache_parsing();
$this->Controller->params = array(
'controller' => 'cache_test',

View file

@ -799,7 +799,7 @@ class FormHelperTest extends CakeTestCase {
}
/**
* Tests correct generation of text fields for double and float fields
* Tests correct generation of number fields for double and float fields
*
* @return void
*/
@ -815,20 +815,39 @@ class FormHelperTest extends CakeTestCase {
$this->Form->create('Contact');
$result = $this->Form->input('foo');
$expected = array(
'div' => array('class' => 'input text'),
'div' => array('class' => 'input number'),
'label' => array('for' => 'ContactFoo'),
'Foo',
'/label',
array('input' => array(
'type' => 'text', 'name' => 'data[Contact][foo]',
'id' => 'ContactFoo'
'type' => 'number',
'name' => 'data[Contact][foo]',
'id' => 'ContactFoo',
'step' => 'any'
)),
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->input('foo', array('step' => 0.5));
$expected = array(
'div' => array('class' => 'input number'),
'label' => array('for' => 'ContactFoo'),
'Foo',
'/label',
array('input' => array(
'type' => 'number',
'name' => 'data[Contact][foo]',
'id' => 'ContactFoo',
'step' => '0.5'
)),
'/div'
);
$this->assertTags($result, $expected);
}
/**
* Tests correct generation of text fields for double and float fields
* Tests correct generation of number fields for integer fields
*
* @access public
* @return void
@ -845,7 +864,7 @@ class FormHelperTest extends CakeTestCase {
$this->Form->create('Contact');
$result = $this->Form->input('foo');
$expected = array(
'div' => array('class' => 'input text'),
'div' => array('class' => 'input number'),
'label' => array('for' => 'ContactFoo'),
'Foo',
'/label',
@ -855,6 +874,7 @@ class FormHelperTest extends CakeTestCase {
)),
'/div'
);
$this->assertTags($result, $expected);
}
/**