<?php
/**
* 栏目测试类
*/
class CategoryTest extends CITestCase
{
function __construct()
{
parent::__construct();
}
public function test_get_all_children()
{
$this->CI->load->database();
$this->CI->load->model('category');
$this->assertEquals($this->CI->db->query("SELECT * FROM typelist WHERE reid='212'")->result(), $this->CI->category->get_all_children('212'));
}
}
The result
But if code like this:
<?php
/**
* 栏目测试类
*/
class CategoryTest extends CITestCase
{
function __construct()
{
parent::__construct();
$this->CI->load->database();
$this->CI->load->model('category');
}
public function test_get_all_children()
{
$this->assertEquals($this->CI->db->query("SELECT * FROM typelist WHERE reid='212'")->result(), $this->CI->category->get_all_children('212'));
}
}
If code like this:
The result
But if code like this:
The result