PHP Unit testing with mockery in symfony 1.4 -
I'm trying to test the unit in symfony 1.4 (in fact it's 1.5.3 ()) phpunit and joke Is there a way to load all the symphony files, and then, if necessary, create a duplicate object from the loaded class? The error message is: "Class already does not exist, duplicate could not be loaded, class already exists", which is very self explanatory, but I would like to use some basic methods, not just those people, Is there a way to do that I have joke?
For example:
public fun exam test () {$ fake = funny :: fake ("nickname: site") - & gt; ShouldReceive ('getCurrent') - & gt; ShouldReturn (3); $ This- & gt; Assure Assurance (3, Project :: Test ()); } Public stable work trials () {return site :: getCurrent (); } If I am only involved in project class, then it works, but if all the project files are included then I get the error message. But what if the test () function uses other methods of site object, which I do not want to fake?
Comments
Post a Comment