Mock models / controller methods in tests |
Hey!
I switched a while back from CI3 to CI4 but wasn't able to migrate my tests as I can't find a way to mock my models or even QueryBuilder like I did on CI3 with kenjis/ci-phpunit-test. Is there any way to do something like that on CI4? PHP Code: $mock = $this->getDouble( Plus, is there any way to mock controller methods?
In what context are you using it? Inside a controller? You can use PHPUnit's mock methods.
|
Welcome Guest, Not a member yet? Register Sign In |