Skip to content

Instantly share code, notes, and snippets.

@willmendesneto
Created February 24, 2013 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willmendesneto/5026017 to your computer and use it in GitHub Desktop.
Save willmendesneto/5026017 to your computer and use it in GitHub Desktop.
<?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