]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - tests/PHPUnit/PHPUnit/Framework/MockObject/Generator/mocked_object_method.tpl.dist
Release 6.2.0
[Github/sugarcrm.git] / tests / PHPUnit / PHPUnit / Framework / MockObject / Generator / mocked_object_method.tpl.dist
1
2     {modifier} function {reference}{method_name}({arguments_decl})
3     {
4         $arguments = array({arguments_call});
5         $count     = func_num_args();
6
7         if ($count > {arguments_count}) {
8             $_arguments = func_get_args();
9
10             for ($i = {arguments_count}; $i < $count; $i++) {
11                 $arguments[] = $_arguments[$i];
12             }
13         }
14
15         $result = $this->__phpunit_getInvocationMocker()->invoke(
16           new PHPUnit_Framework_MockObject_Invocation_Object(
17             '{class_name}', '{method_name}', $arguments, $this
18           )
19         );
20
21         return $result;
22     }