Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php
class PostTest extends PHPUnit_Framework_TestCase
{
private $CI;
public function setUp()
{
$this->CI = &get_instance();
$this->CI->load->database('testing');
}
public function testGetsAllPosts()
{
$this->CI->load->model('post');
$posts = $this->CI->post->getAll();
$this->assertEquals(0, count($posts));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment