Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing a couple other tests

  • Loading branch information...
commit 99814c640e5822271fbd2f85b8445514c8926ae6 1 parent 6a3ea54
José Lorenzo Rodríguez lorenzo authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 tests/TestCase/View/Helper/FormHelperTest.php
12 tests/TestCase/View/Helper/FormHelperTest.php
View
@@ -3416,16 +3416,19 @@ public function testInputMagicTypeDoesNotOverride() {
* @return void
*/
public function testInputMagicSelectForTypeNumber() {
- $this->markTestIncomplete('Need to revisit once models work again.');
+ TableRegistry::get('ValidateUsers', [
+ 'className' => __NAMESPACE__ . '\ValidateUsersTable'
+ ]);
+ $entity = new Entity(['balance' => 1]);
+ $this->Form->create($entity, ['context' => ['table' => 'ValidateUsers']]);
$this->View->viewVars['balances'] = array(0 => 'nothing', 1 => 'some', 100 => 'a lot');
- $this->Form->request->data = array('ValidateUser' => array('balance' => 1));
$result = $this->Form->input('ValidateUser.balance');
$expected = array(
'div' => array('class' => 'input select'),
- 'label' => array('for' => 'ValidateUserBalance'),
+ 'label' => array('for' => 'validateuser-balance'),
'Balance',
'/label',
- 'select' => array('name' => 'ValidateUser[balance]', 'id' => 'ValidateUserBalance'),
+ 'select' => array('name' => 'ValidateUser[balance]', 'id' => 'validateuser-balance'),
array('option' => array('value' => '0')),
'nothing',
'/option',
@@ -3447,7 +3450,6 @@ public function testInputMagicSelectForTypeNumber() {
* @return void
*/
public function testInputMagicSelectChangeToRadio() {
- $this->markTestIncomplete('Need to revisit once models work again.');
$this->View->viewVars['users'] = array('value' => 'good', 'other' => 'bad');
$result = $this->Form->input('Model.user_id', array('type' => 'radio'));
$this->assertRegExp('/input type="radio"/', $result);
Please sign in to comment.
Something went wrong with that request. Please try again.