| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com) 7 * @license LGPL http://www.gnu.org/copyleft/lesser.html 8 */ 9 10 require_once('limb/wact/tests/cases/WactTemplateTestCase.class.php'); 11 require_once('limb/wact/src/components/form/form.inc.php'); 12 13 class WactTextAreaComponentTest extends WactTemplateTestCase 14 { 15 protected $text_area; 16 protected $form; 17 18 function setUp() 19 { 20 parent :: setUp(); 21 22 $this->form = new WactFormComponent('test_form'); 23 $this->text_area = new WactTextAreaComponent('my_text_area'); 24 $this->form->addChild($this->text_area); 25 } 26 27 function testRenderContents() 28 { 29 $this->form->set('my_text_area', 'foo'); 30 31 ob_start(); 32 $this->text_area->renderContents(); 33 $out = ob_get_contents(); 34 ob_end_clean(); 35 36 $this->assertEqual($out, 'foo'); 37 } 38 39 function testRenderEscapesHtmlEntities() 40 { 41 $this->form->set('my_text_area', 'x < y > z & a'); 42 43 ob_start(); 44 $this->text_area->renderContents(); 45 $out = ob_get_contents(); 46 ob_end_clean(); 47 48 $this->assertEqual($out, 'x < y > z & a'); 49 } 50 } 51 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jan 8 04:06:23 2009 | Cross-referenced by PHPXref 0.7 |