| [ 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 lmb_require('limb/cms/src/model/lmbCmsNode.class.php'); 10 lmb_require('limb/dbal/src/lmbSimpleDb.class.php'); 11 12 class lmbCmsTestCase extends UnitTestCase 13 { 14 protected $db; 15 protected $toolkit; 16 protected $request; 17 protected $tree; 18 19 function setUp() 20 { 21 $this->toolkit = lmbToolkit :: save(); 22 $this->request = $this->toolkit->getRequest(); 23 $this->conn = $this->toolkit->getDefaultDbConnection(); 24 $this->tree = $this->toolkit->getCmsTree(); 25 $this->db = new lmbSimpleDb($this->conn); 26 27 $this->_cleanUp(); 28 } 29 30 function tearDown() 31 { 32 $this->_cleanUp(); 33 lmbToolkit :: restore(); 34 } 35 36 function _cleanUp() 37 { 38 } 39 40 protected function _initNode($node_identifier, $parent_node = null, $controller_name = 'lmbController') 41 { 42 $node = new lmbCmsNode(); 43 $node->setTitle('title_'. mt_rand(0, 10000)); 44 $node->setIdentifier($node_identifier); 45 $node->setControllerName($controller_name); 46 if($parent_node) 47 $node->setParent($parent_node); 48 return $node; 49 } 50 51 protected function _createNode($node_identifier, $parent_node = null, $controller_name = 'lmbController') 52 { 53 $node = $this->_initNode($node_identifier, $parent_node, $controller_name); 54 $node->save(); 55 return $node; 56 } 57 } 58 59 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Dec 5 04:05:07 2008 | Cross-referenced by PHPXref 0.7 |