Im am starting to unittest on my project, but im having some problems.
I have a class called DataReader which sends an object to FacebookRest class like this.
$facebook = new FacebookRest($this);
How do i call a unit test on this class? When i try to new the class in unittest it will tell me that i need the parameter of DataReader
I do like this:
public function testFaceBook()
{
$facebook = new FacebookRest();
}
Any suggestions?
You can use 2 ways to solve this issue:
https://github.com/Codeception/AspectMock#allows-replacement-of-class-methods
Up to you