Example #1
0
 /**
  *    Sets up the mock, creating a generator depending on whether
  *    the function is already declared
  *    @param string $function    Name of function being mocked
  */
 function SimpleMockFunction($function)
 {
     SimpleMock::SimpleMock();
     if (function_exists($function)) {
         $this->_generator = new SimpleDeclaredFunctionGenerator($function);
     } else {
         $this->_generator = new SimpleUndeclaredFunctionGenerator($function);
     }
 }