How to mock a method which is dependant to another method

by Anu Mathew   Last Updated April 16, 2018 11:07 AM

How to mock a method which is dependant to another method,

class Abc {
 public function first($page) {
   .....
 }
 public function second($page) {
   $result = first($page);
   .....
    .....
    ............
    third($date);
    ................
 }
 public function third($date) {
     .....
  .....
 }
}
Tags : 8 testing


Related Questions


Unit testing on windows

Updated July 09, 2015 13:03 PM

Functional testing without using simpletest

Updated June 19, 2015 01:03 AM


How to tell travis that test is failed?

Updated July 31, 2015 14:56 PM