Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It still uses real class instead mock class. #196

Open
khiemnguyen-ffw opened this issue Oct 2, 2021 · 1 comment
Open

It still uses real class instead mock class. #196

khiemnguyen-ffw opened this issue Oct 2, 2021 · 1 comment

Comments

@khiemnguyen-ffw
Copy link

I use it to mock class for my fuelphp project. But It still uses real class instead of mock class.
$user = test::double('\Apply\Model_Apply_Token', [
'find_one_by' => null,
]);
var_dump(Model_Apply_Token::find_one_by('uuid', 12341);

@jberculo
Copy link

jberculo commented Oct 25, 2021

It probably is due to that te 'find_one_by'-method is not in the Model_Apply_Token class, but from a class that is extended by that class. Did you try to mock the parent class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants