Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #742 from jails/pr2

Close #613
  • Loading branch information...
commit 16969a86e30da4d1022459f665272ea0ea72f705 2 parents f96a3ca + accbd50
@nateabele nateabele authored
View
1  template/view/Renderer.php
@@ -202,6 +202,7 @@ protected function _init() {
},
'options' => '_attributes',
'title' => 'escape',
+ 'value' => 'escape',
'scripts' => function($scripts) use (&$context) {
return "\n\t" . join("\n\t", $context['scripts']) . "\n";
},
View
10 tests/cases/template/helper/FormTest.php
@@ -355,10 +355,10 @@ public function testSubmitGeneration() {
}
public function testTextareaGeneration() {
- $result = $this->form->textarea('foo', array('value' => 'some content'));
+ $result = $this->form->textarea('foo', array('value' => 'some content >'));
$this->assertTags($result, array(
'textarea' => array('name' => 'foo', 'id' => 'Foo'),
- 'some content',
+ 'some content >',
'/textarea'
));
}
@@ -616,8 +616,8 @@ public function testSelectGeneration() {
$result = $this->form->select(
'colors',
- array('r' => 'red', 'g' => 'green', 'b' => 'blue'),
- array('id' => 'Colors', 'value' => 'g')
+ array('r' => 'red', 'g "' => 'green', 'b' => 'blue'),
+ array('id' => 'Colors', 'value' => 'g "')
);
$this->assertTags($result, array(
@@ -625,7 +625,7 @@ public function testSelectGeneration() {
array('option' => array('value' => 'r')),
'red',
'/option',
- array('option' => array('value' => 'g', 'selected' => 'selected')),
+ array('option' => array('value' => 'g "', 'selected' => 'selected')),
'green',
'/option',
array('option' => array('value' => 'b')),
View
6 tests/cases/template/view/RendererTest.php
@@ -40,7 +40,7 @@ public function tearDown() {
}
public function testInitialization() {
- $expected = array('url', 'path', 'options', 'title', 'scripts', 'styles', 'head');
+ $expected = array('url', 'path', 'options', 'title', 'value', 'scripts', 'styles', 'head');
$result = array_keys($this->subject->handlers());
$this->assertEqual($expected, $result);
@@ -124,7 +124,9 @@ public function testHandlerInsertion() {
$foo = function($value) { return "Foo: {$value}"; };
- $expected = array('url', 'path', 'options', 'title', 'scripts', 'styles', 'head', 'foo');
+ $expected = array(
+ 'url', 'path', 'options', 'title', 'value', 'scripts', 'styles', 'head', 'foo'
+ );
$result = array_keys($this->subject->handlers(compact('foo')));
$this->assertEqual($expected, $result);
Please sign in to comment.
Something went wrong with that request. Please try again.