Skip to content

Commit

Permalink
zendframework#7012 - removing incompatible PHP 5.4 syntax from test s…
Browse files Browse the repository at this point in the history
…cript
  • Loading branch information
Ocramius committed Dec 11, 2014
1 parent a621bde commit b48b79e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/ZendTest/Form/View/Helper/AbstractHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,22 @@ public function testWillEscapeValueAttributeValuesCorrectly()

public function testWillEncodeValueAttributeValuesCorrectly()
{

$string = (new Escaper('iso-8859-1'))->escapeHtmlAttr('Título');
$escaper = new Escaper('iso-8859-1');

$this->helper->setEncoding('iso-8859-1');

$this->assertSame(
'data-value="' . $string . '"',
'data-value="' . $escaper->escapeHtmlAttr('Título') . '"',
$this->helper->createAttributesString(array('data-value' => 'Título'))
);
}

public function testWillNotEncodeValueAttributeValuesCorrectly()
{

$string = (new Escaper('iso-8859-1'))->escapeHtmlAttr('Título');
$escaper = new Escaper('iso-8859-1');

$this->assertNotSame(
'data-value="' . $string . '"',
'data-value="' . $escaper->escapeHtmlAttr('Título') . '"',
$this->helper->createAttributesString(array('data-value' => 'Título'))
);
}
Expand Down

0 comments on commit b48b79e

Please sign in to comment.