public function test_callback() { /** === Test Data === */ /** === Setup Mocks === */ $mCallable = function () { throw new \Exception(); }; /** === Call and asserts === */ $this->obj->addCommitCall($mCallable); $this->obj->commit(); }