当前位置: 首页>>代码示例>>PHP>>正文


PHP CategoryThread::read方法代码示例

本文整理汇总了PHP中CategoryThread::read方法的典型用法代码示例。如果您正苦于以下问题:PHP CategoryThread::read方法的具体用法?PHP CategoryThread::read怎么用?PHP CategoryThread::read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CategoryThread的用法示例。


在下文中一共展示了CategoryThread::read方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testReadFakeThread

 /**
  * testReadFakeThread method
  *
  * @return void
  */
 public function testReadFakeThread()
 {
     $this->loadFixtures('CategoryThread');
     $TestModel = new CategoryThread();
     $fullDebug = $this->db->fullDebug;
     $this->db->fullDebug = true;
     $TestModel->recursive = 6;
     $TestModel->id = 7;
     $result = $TestModel->read();
     $expected = array('CategoryThread' => array('id' => 7, 'parent_id' => 6, 'name' => 'Category 2.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), 'ParentCategory' => array('id' => 6, 'parent_id' => 5, 'name' => 'Category 2', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 5, 'parent_id' => 4, 'name' => 'Category 1.1.1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 4, 'parent_id' => 3, 'name' => 'Category 1.1.2', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 3, 'parent_id' => 2, 'name' => 'Category 1.1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 2, 'parent_id' => 1, 'name' => 'Category 1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 1, 'parent_id' => 0, 'name' => 'Category 1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31')))))));
     $this->db->fullDebug = $fullDebug;
     $this->assertEquals($expected, $result);
 }
开发者ID:TerrasAppSolutions,项目名称:seeg-mapbiomas-workspace,代码行数:18,代码来源:ModelReadTest.php


注:本文中的CategoryThread::read方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。