Created
February 24, 2013 22:33
-
-
Save willmendesneto/5026026 to your computer and use it in GitHub Desktop.
Gist do post "Usando PHPUnit no Codeigniter via Hooks"
Link: http://willmendesnetoprojects.wordpress.com/2013/02/24/usando-phpunit-no-codeigniter-via-hooks/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Post extends CI_Model | |
{ | |
public function getAll() | |
{ | |
$query = $this->db->get('posts'); | |
$posts = array(); | |
foreach ($query->result_array() as $row) { | |
$posts[] = $row; | |
} | |
return $posts; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment