CodeIgniter’s loader is a service locator, and the tests notice

$this->load->model('order_model') reads as a convenience and is a service locator: it reaches into a global singleton, constructs whatever it finds, and attaches it to the controller by a name that appears nowhere in any signature. The bill arrives when you try to test the method without a database.

class Orders extends CI_Controller
{
    public function refund($id)
    {
        $this->load->model('order_model');
        $this->load->library('payments');

        $order = $this->order_model->find($id);
        $this->payments->refund($order->charge_id, $order->total);
    }
}

// the same work, with the collaborators named where they can be replaced
class RefundOrder
{
    private $orders;
    private $gateway;

    public function __construct(OrderRepository $orders, PaymentGateway $gateway)
    {
        $this->orders  = $orders;
        $this->gateway = $gateway;
    }

    public function refund($id) { /* ... */ }
}

You can test the first version — assign doubles onto the object get_instance() returns before the controller runs — and every test then depends on CodeIgniter’s boot order, which is a lot of setup to assert one refund. Moving the work into a plain class leaves the controller as three lines that read a request and call something, and those three lines genuinely do not need a unit test. What it costs is a second class and a place to construct it, and in CodeIgniter 2 that place is the controller, by hand, because there is no container to do it. That is still cheaper than the alternative, and it is the same seam you would need to move this code anywhere else later.