65 $Security->get_gp(
'testing_package_name' ,
'command' ) ,
66 $Security->get_gp(
'testing_package_version' ,
'command' ,
'last' )
69 return( $PackageDirectory );
99 if( $this->TestingObject ===
false )
103 if( file_exists(
"$PackageDirectory/include/php/unit_tests.php" ) ===
false )
108 require_once(
"$PackageDirectory/include/php/unit_tests.php" );
112 if( $this->TestingObject ===
false )
114 throw(
new Exception(
"Testing class was not found" ) );
117 catch( Exception $e )
149 $UserController =
get_package(
'user::user_controller' ,
'last' , __FILE__ );
150 $UserController->login( $Options );
152 $Permits =
get_package(
'permit::permit_algorithms' ,
'last' , __FILE__ );
153 if( $Permits->object_has_permit(
false ,
'user' ,
'tester' ) === false )
155 $UserAlgorithms =
get_package(
'user::user_algorithms' ,
'last' , __FILE__ );
156 print( $UserAlgorithms->get_login() );
157 return(
'No permits' );
162 catch( Exception $e )
193 $Methods = get_class_methods( get_class( $this->TestingObject ) );
196 foreach( $Methods as $key => $m )
198 if( strpos( $m ,
'test' ) === 0 )
206 catch( Exception $e )
236 $Methods = get_class_methods( get_class( $this->TestingObject ) );
240 foreach( $Methods as $key => $m )
242 if( strpos( $m ,
'test' ) === 0 )
244 if( $Counter == $Security->get_gp(
'test_id' ,
'integer' ) )
251 if( $Security->get_gp(
'test_id' ,
'integer' , 0 ) >= $Counter )
253 return(
'Value test_id is too big. It mast be less than '.$Counter );
256 catch( Exception $e )
284 if(
in_array(
'set_up' , $Methods ) )
286 call_user_func_array( array( $this->TestingObject ,
'set_up' ) , array() );
289 $Result = call_user_func_array( array( $this->TestingObject , $m ) , array() );
291 if(
in_array(
'tear_down' , $Methods ) )
293 call_user_func_array( array( $this->TestingObject ,
'tear_down' ) , array() );
298 catch( Exception $e )
333 foreach( $Methods as $key => $m )
335 if( strpos( $m ,
'test' ) === 0 && $Counter++ == $Security->get_gp(
'test_id' ,
'integer' ) )
341 if( $Security->get_gp(
'test_id' ,
'integer' , 0 ) >= $Counter )
343 return(
'Value test_id is too big. It mast be less than '.$Counter );
347 return(
'Test was not called' );
350 catch( Exception $e )
380 $Methods = get_class_methods( get_class( $this->TestingObject ) );
382 if( isset( $Methods[ 0 ] ) ==
false )
384 return(
'No test were found' );
389 catch( Exception $e )
419 if( $Security->get_gp(
'action' ,
'command' ,
'none' ) ===
'get_sub_test_count' )
424 if( $Security->get_gp(
'action' ,
'command' ,
'none' ) ===
'get_sub_test_name' )
429 if( $Security->get_gp(
'action' ,
'command' ,
'none' ) ===
'run_sub_test' )
434 return(
'Illegal request parameters' );
436 catch( Exception $e )
468 if( ( $Result = $this->
security( $Options ) ) !==
false )
475 catch( Exception $e )