Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/4771' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	tests/ZendTest/Form/View/Helper/FormRowTest.php
  • Loading branch information
weierophinney committed Jul 2, 2013
2 parents 4b43d32 + 4862c47 commit 43c04a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/Zend/Form/View/Helper/FormRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function __invoke(ElementInterface $element = null, $labelPosition = null

if ($labelPosition !== null) {
$this->setLabelPosition($labelPosition);
} else {
} elseif ($this->labelPosition === null) {
$this->setLabelPosition(self::LABEL_PREPEND);
}

Expand Down
10 changes: 10 additions & 0 deletions tests/ZendTest/Form/View/Helper/FormRowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,4 +397,14 @@ public function testCanDisableLabelHtmlEscape()

$this->assertContains($label, $markup);
}

public function testCanSetLabelPositionBeforeInvoke()
{
$element = new Element('foo');

$this->helper->setLabelPosition('append');
$this->helper->__invoke($element);

$this->assertSame('append', $this->helper->getLabelPosition());
}
}

0 comments on commit 43c04a0

Please sign in to comment.