| [ 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 12 if(!class_exists('WactRuntimeComponentTest')) 13 { 14 15 class WactRuntimeComponentTest extends WactTemplateTestCase 16 { 17 protected $component; 18 19 function setUp() 20 { 21 parent :: setUp(); 22 $this->component = new WactRuntimeComponent('TestId'); 23 } 24 25 function testGetServerID() 26 { 27 $this->assertEqual($this->component->getId(),'TestId'); 28 } 29 30 function testFindChild() 31 { 32 $child = new WactRuntimeComponent('TestChild'); 33 $this->component->addChild($child); 34 $this->assertReference($this->component->findChild('TestChild'), $child); 35 } 36 37 function testFindChildNotFound() 38 { 39 $this->assertFalse($this->component->findChild('TestChild')); 40 } 41 42 function testFindChildByClass() 43 { 44 $child = new WactRuntimeComponent('TestChild'); 45 $this->component->addChild($child); 46 $this->assertReference($this->component->findChildByClass('WactRuntimeComponent'), $child); 47 } 48 49 function testFindChildByClassNotFound() 50 { 51 $this->assertFalse($this->component->findChildByClass('TestComponent')); 52 } 53 54 function testFindParentByChilld() 55 { 56 $component = new WactRuntimeComponent('TestParent'); 57 $component->addChild($this->component); 58 $this->assertIsA($this->component->findParentByClass('WactRuntimeComponent'),'WactRuntimeComponent'); 59 } 60 61 function testFindParentByClassNotFound() 62 { 63 $this->assertFalse($this->component->findParentByClass('TestComponent')); 64 } 65 } 66 67 } 68 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Dec 1 03:56:46 2008 | Cross-referenced by PHPXref 0.7 |