|
From: Kyohere L. <pr...@gm...> - 2008-08-22 03:58:00
|
Hi, here's the scenario: I'm trying to test Class_A::Method_B(..). Method_B internally calls Class_C::Method_D() - which takes a long time, and is accessed from the global/autoload mechanism of the application. I'd like to skip this call, since it's irrelevant to my tests. Aside from re-designing my class/method to read in Class_C as one of it's arguments, or else creating a dummy Class_C, and loading it before the real one is loaded, is there a way to achieve this with Mocks? Secondly, is there a way to prevent the class I'm trying to test from calling such mundane php functions like file_exists(), etc? Because in such a case, I have to design my test to create/delete files from the file system and so on. Thanks! Luke -- -- Luke Kyohere -- /dev/null |