Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix and remove failing View/ tests
Fix a few tests and remove/skip tests that rely on the now removed Model
class. These tests will need to be revisited soon.
  • Loading branch information
markstory committed Dec 17, 2013
1 parent c337981 commit a1d38c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Cake/Test/TestApp/View/Posts/cache_form.ctp
@@ -1,8 +1,8 @@
<div class="users form">
<!--nocache-->
<?php echo $this->Form->create('User'); ?>
<?php echo $this->Form->create(false); ?>
<fieldset>
<legend><?php echo __('Add User'); ?></legend>
<legend><?php echo __('Add User'); ?></legend>
<?php
echo $this->Form->input('username');
echo $this->Form->input('email');
Expand All @@ -11,4 +11,4 @@
</fieldset>
<?php echo $this->Form->end('Submit'); ?>
<!--/nocache-->
</div>
</div>
10 changes: 0 additions & 10 deletions Cake/Test/TestCase/View/HelperTest.php
Expand Up @@ -496,16 +496,6 @@ public function testValueHabtmKeys() {
$result = $this->Helper->value('HelperTestTag.HelperTestTag');
$this->assertEquals(array(2, 3, 4), $result);

$this->Helper->request->data = array(
'HelperTestTag' => array(
array('id' => 3),
array('id' => 5)
)
);
$this->Helper->setEntity('HelperTestTag.HelperTestTag');
$result = $this->Helper->value('HelperTestTag.HelperTestTag');
$this->assertEquals(array(3 => 3, 5 => 5), $result);

$this->Helper->request->data = array(
'HelperTestTag' => array(
'body' => '',
Expand Down
2 changes: 1 addition & 1 deletion Cake/View/Helper/FormHelper.php
Expand Up @@ -180,7 +180,7 @@ protected function _introspectModel($model, $key, $field = null) {
}

if ($key === 'key') {
return $this->fieldset[$model]['key'] = $object->primaryKey;
return $this->fieldset[$model]['key'] = $object->primaryKey();
}

if ($key === 'fields') {
Expand Down

0 comments on commit a1d38c8

Please sign in to comment.