Hello,
I am really new to PHP but understand things a little and after studying OOP after sometime I wanted to learn how to test my code. I have been reading the manual and searching tutorials but I cannot seem to understand how to right a simple test for something like this
This has to be easy but I don't think I am getting it, how would I write a test for this.PHP Code:class someclass {
public function somefunction($value){
return $value;
}
}
I understand how to write the test class and extend PHPUnit frame work and do the setup and the teardown but how do I actually test this method? What I mean is how do I either pass a value to the $value to test it in my test case?
I know this is a basic example but I really do not understand the lingo on the PHPUnit manual site, any help would be awesome![]()


Reply With Quote



Bookmarks