CI = set_controller('welcome'); parent::setUp(); } /** * Populates a session with mock data * * @param array $more_data */ public function create_session($more_data = []) { $data = [ 'ip_address' => '8.8.8.8', 'user_agent' => 'PHPUnit', 'last_activity' => '1234567890', 'session_id' => 'jh38uckkjhcijedk' ]; $data = array_merge($data, $more_data); $this->CI->session->set_userdata($data); } }