i integrated phpunit netbeans , want generate tests code.
<?php /** * action user * * user api * * @link http://getfrapi.com * @author frapi <frapi@getfrapi.com> * @link rsmobile/user/:id */ class action_user extends frapi_action implements frapi_action_interface { } ?> i tried right clicking , selecting tools->create phpunit tests. gave error :
fatal error: class 'frapi_action' not found in /users/username/documents/.../src/ frapi/custom/action/user.php on line 12 then added dummy frapi_action class in file user.php , generated skeleton class.
<?php /** * action user * * user api * * @link http://getfrapi.com * @author frapi <frapi@getfrapi.com> * @link rsmobile/user/:id */ class frapi_action {} class action_user extends frapi_action implements frapi_action_interface { } ?> why gave class not found error? how solve it?
i solved adding path of file containing frapi_action class.
require_once 'path/of/file';
Comments
Post a Comment