PHP Classes

File: tests/unit/Html/Form/FieldsetTest.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   tests/unit/Html/Form/FieldsetTest.php   Download  
File: tests/unit/Html/Form/FieldsetTest.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 1,645 bytes
 

Contents

Class file image Download
<?php

class Html_Form_FieldsetTest extends UnitTestCase {
   
    function
setUp() {
    }
   
    function
TearDown() {
    }
   
    function
testHtml_Form_FieldsetObjConstructParams() {
       
       
$obj = new A_Html_Form_Fieldset();
       
$this->assertEqual($obj->render(), '<fieldset></fieldset>');
       
$obj = new A_Html_Form_Fieldset(array('name'=>'foo'));
       
$this->assertEqual($obj->render(), '<fieldset name="foo"></fieldset>');
       
$obj = new A_Html_Form_Fieldset(array(), 'foobar');
       
$this->assertEqual($obj->render(), '<fieldset>foobar</fieldset>');
       
$obj = new A_Html_Form_Fieldset(array('name'=>'foo'), 'foobar');
       
$this->assertEqual($obj->render(), '<fieldset name="foo">foobar</fieldset>');
    }
   
    function
testHtml_Form_FieldsetObjRenderParams() {
        
$obj = new A_Html_Form_Fieldset();

        
$this->assertEqual($obj->render(), '<fieldset></fieldset>');
       
$this->assertEqual($obj->render(array('name'=>'foo')), '<fieldset name="foo"></fieldset>');
       
$this->assertEqual($obj->render(array(), 'foobar'), '<fieldset>foobar</fieldset>');
       
$this->assertEqual($obj->render(array('name'=>'foo'), 'foobar'), '<fieldset name="foo">foobar</fieldset>');
    }
   
    function
testHtml_Form_FieldsetStaticRenderParams() {
       
$this->assertEqual(A_Html_Form_Fieldset::render(), '<fieldset></fieldset>');
       
$this->assertEqual(A_Html_Form_Fieldset::render(array('name'=>'foo')), '<fieldset name="foo"></fieldset>');
       
$this->assertEqual(A_Html_Form_Fieldset::render(array(), 'foobar'), '<fieldset>foobar</fieldset>');
       
$this->assertEqual(A_Html_Form_Fieldset::render(array('name'=>'foo'), 'foobar'), '<fieldset name="foo">foobar</fieldset>');
    }

}