PHP Classes

File: tests/unit/Html/SpanTest.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   tests/unit/Html/SpanTest.php   Download  
File: tests/unit/Html/SpanTest.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,433 bytes
 

Contents

Class file image Download
<?php

class Html_SpanTest extends UnitTestCase {
   
    function
setUp() {
    }
   
    function
TearDown() {
    }
   
    function
testHtml_SpanObjConstructParams() {
       
       
$obj = new A_Html_Span();
       
$this->assertEqual($obj->render(), '<span></span>');
       
$obj = new A_Html_Span(array('name'=>'foo'));
       
$this->assertEqual($obj->render(), '<span name="foo"></span>');
       
$obj = new A_Html_Span(array(), 'foobar');
       
$this->assertEqual($obj->render(), '<span>foobar</span>');
       
$obj = new A_Html_Span(array('name'=>'foo'), 'foobar');
       
$this->assertEqual($obj->render(), '<span name="foo">foobar</span>');
    }
   
    function
testHtml_SpanObjRenderParams() {
        
$obj = new A_Html_Span();

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