How to use Any class

Best Mockery code snippet using Any

Routes.php

Source:Routes.php Github

copy

Full Screen

1<?php 2/* Default route */3$routes->get('/', '\Modules\ADT\Controllers\User_management::login');4$routes->post('initialize', '\Modules\Setup\Controllers\Setup::initialize');5/* Authentication Routes */6// $routes->get('/', '\Modules\ADT\Controllers\System_management::index');7$routes->get('login', '\Modules\ADT\Controllers\User_management::login');8$routes->post('user_management/authenticate', '\Modules\ADT\Controllers\User_management::authenticate');9$routes->get('home', '\Modules\ADT\Controllers\Home_controller::home');10$routes->get('logout/(:any)', '\Modules\ADT\Controllers\User_management::logout/$1');11/* Notification Management */12$routes->get('error_notification', '\Modules\ADT\Controllers\Notification_management::error_notification');13$routes->get('error_notification/(:any)', '\Modules\ADT\Controllers\Notification_management::error_notification/$1');14$routes->get('reporting_notification', '\Modules\ADT\Controllers\Notification_management::reporting_notification');15$routes->get('defaulter_notification', '\Modules\ADT\Controllers\Notification_management::defaulter_notification');16$routes->get('missed_appointments_notification', '\Modules\ADT\Controllers\Notification_management::missed_appointments_notification');17$routes->get('followup_notification', '\Modules\ADT\Controllers\Notification_management::followup_notification');18$routes->get('prescriptions_notification_view', '\Modules\ADT\Controllers\Notification_management::prescriptions_notification_view');19$routes->get('update_notification', '\Modules\ADT\Controllers\Notification_management::update_notification');20$routes->get('ontime_notification', '\Modules\ADT\Controllers\Notification_management::ontime_notification');21$routes->get('missed_appointments_notification', '\Modules\ADT\Controllers\Notification_management::missed_appointments_notification');22$routes->get('notifications/il_errors/(:any)', '\Modules\ADT\Controllers\Notification_management::load_il_errors_view/$1');23$routes->get('prescriptions_notification_view', '\Modules\ADT\Controllers\Notification_management::prescriptions_notification_view');24$routes->get('update_notification', '\Modules\ADT\Controllers\Notification_management::update_notification');25/* Home Dashboard */26$routes->get('getExpiringDrugs/(:any)/(:any)', '\Modules\ADT\Controllers\Facilitydashboard_Management::getExpiringDrugs/$1/$2');27$routes->get('getPatientEnrolled/(:any)/(:any)', '\Modules\ADT\Controllers\Facilitydashboard_Management::getPatientEnrolled/$1/$2');28$routes->get('getExpectedPatients/(:any)/(:any)', '\Modules\ADT\Controllers\Facilitydashboard_Management::getExpectedPatients/$1/$2');29$routes->get('getStockSafetyQty', '\Modules\ADT\Controllers\Facilitydashboard_Management::getStockSafetyQty');30$routes->get('getStockSafetyQty/(:any)', '\Modules\ADT\Controllers\Facilitydashboard_Management::getStockSafetyQty/$1');31$routes->post('drillAccessLevel', '\Modules\ADT\Controllers\Admin_management::drillAccessLevel');32$routes->get('get_faq', '\Modules\ADT\Controllers\Home_controller::get_faq');33$routes->get('getPatientMasterList', '\Modules\ADT\Controllers\Facilitydashboard_Management::getPatientMasterList');34/* Admin Dashboard */35$routes->get('admin_management/getSystemUsage/(:any)', '\Modules\ADT\Controllers\Admin_management::getSystemUsage/$1');36$routes->get('admin_management/getWeeklySumary/(:any)(:any)', '\Modules\ADT\Controllers\Admin_management::getWeeklySumary/$1/2');37$routes->get('admin_management/drillAccessLevel', '\Modules\ADT\Controllers\Admin_management::drillAccessLevel');38$routes->post('admin_management/admin_management/getWeeklySumaryPerUser', '\Modules\ADT\Controllers\Admin_management::getWeeklySumaryPerUser');39$routes->post('admin_management/(:any)', '\Modules\ADT\Controllers\Admin_management::$1');40$routes->post('admin_management/inactive_users', '\Modules\ADT\Controllers\Admin_management::inactive_users');41$routes->post('admin_management/online_users', '\Modules\ADT\Controllers\Admin_management::online_users');42$routes->post('admin_management/online', '\Modules\ADT\Controllers\Admin_management::online');43$routes->post('admin_management/inactive', '\Modules\ADT\Controllers\Admin_management::inactive');44/* Inventory Stock Management */45$routes->get('stock_transaction/(:any)', '\Modules\ADT\Controllers\Inventory_management::stock_transaction/$1');46$routes->post('getAllDrugs', '\Modules\ADT\Controllers\Inventory_management::getAllDrugs');47$routes->post('getDrugDetails', '\Modules\ADT\Controllers\Inventory_management::getDrugDetails');48$routes->post('checkConnection', '\Modules\ADT\Controllers\System_management::checkConnection');49$routes->post('getStockDrugs', '\Modules\ADT\Controllers\Inventory_management::getStockDrugs');50$routes->post('getBacthes', '\Modules\ADT\Controllers\Inventory_management::getBacthes');51$routes->post('getBacthDetails', '\Modules\ADT\Controllers\Inventory_management::getBacthDetails');52$routes->post('inventory_management/save', '\Modules\ADT\Controllers\Inventory_management::save');53$routes->get('inventory_management', '\Modules\ADT\Controllers\Inventory_management::index');54$routes->get('stock_listing/(:any)', '\Modules\ADT\Controllers\Inventory_management::stock_listing/$1');55$routes->get('getDrugBinCard/(:any)/(:any)', '\Modules\ADT\Controllers\Inventory_management::getDrugBinCard/$1/$2');56$routes->get('getDrugTransactions/(:any)/(:any)', '\Modules\ADT\Controllers\Inventory_management::getDrugTransactions/$1/$2');57$routes->get('inventory_management/getIsoniazid/(:any)', '\Modules\ADT\Controllers\Inventory_management::getIsoniazid');58$routes->post('inventory_management/getAllDrugsBatches/(:any)', '\Modules\ADT\Controllers\Inventory_management::getAllDrugsBatches/(:any)');59$routes->post('inventory_management/getAllBacthDetails', '\Modules\ADT\Controllers\Inventory_management::getAllBacthDetails');60$routes->get('inventory_management/serverStatus', '\Modules\ADT\Controllers\Inventory_management::serverStatus');61$routes->get('settings_management', '\Modules\ADT\Controllers\Settings_management::index');62$routes->post('settings/save/(:any)', '\Modules\ADT\Controllers\Settings::save/$1');63$routes->post('settings/update/(:any)', '\Modules\ADT\Controllers\Settings::update/$1');64$routes->get('settings/disable/(:any)/(:any)', '\Modules\ADT\Controllers\Settings::disable/$1/$2');65$routes->get('settings/enable/(:any)/(:any)', '\Modules\ADT\Controllers\Settings::enable/$1/$2');66/* Regimens */67$routes->get('regimen_management', '\Modules\ADT\Controllers\Regimen_management::index', ['as' => 'regimens']);68$routes->get('settings/listing/(:any)', '\Modules\ADT\Controllers\Settings::listing/$1');69$routes->get('regimen_drug_management', '\Modules\ADT\Controllers\Regimen_drug_management::listing');70$routes->get('regimenchange_management', '\Modules\ADT\Controllers\Regimenchange_management::listing');71$routes->post('regimen_management/save', '\Modules\ADT\Controllers\Regimen_management::save');72$routes->post('regimen_management/disable/(:any)', '\Modules\ADT\Controllers\Regimen_management::disable/$1');73$routes->post('regimen_management/enable/(:any)', '\Modules\ADT\Controllers\Regimen_management::enable/$1');74$routes->get('regimen_management/getNonMappedRegimens/(:any)', '\Modules\ADT\Controllers\Regimen_management::getNonMappedRegimens/$1');75$routes->post('regimen_management/updateBulkMapping', '\Modules\ADT\Controllers\Regimen_management::updateBulkMapping');76$routes->post('regimen_management/merge/(:any)', '\Modules\ADT\Controllers\Regimen_management::merge/$1');77$routes->post('regimen_management/unmerge/(:any)', '\Modules\ADT\Controllers\Regimen_management::unmerge/$1');78$routes->get('regimen_management/edit', '\Modules\ADT\Controllers\Regimen_management::unmerge/$1');79$routes->get('regimen_management/update', '\Modules\ADT\Controllers\Regimen_management::update');80$routes->post('regimenchange_management/save', '\Modules\ADT\Controllers\Regimenchange_management::save');81$routes->post('regimenchange_management/update', '\Modules\ADT\Controllers\Regimenchange_management::update');82$routes->get('regimenchange_management/disable/(:any)', '\Modules\ADT\Controllers\Regimenchange_management::disable/$1');83$routes->get('regimenchange_management/enable/(:any)', '\Modules\ADT\Controllers\Regimenchange_management::enable/$1');84$routes->post('drugcode_classification/save', '\Modules\ADT\Controllers\Drugcode_classification::save');85$routes->post('drugcode_classification/update', '\Modules\ADT\Controllers\Drugcode_classification::update');86$routes->get('drugcode_classification/disable/(:any)', '\Modules\ADT\Controllers\Drugcode_classification::disable/$1');87$routes->get('drugcode_classification/enable/(:any)', '\Modules\ADT\Controllers\Drugcode_classification::enable/$1');88$routes->get('drugcode_management/add', '\Modules\ADT\Controllers\Drugcode_management::add');89$routes->get('drugcode_management/edit', '\Modules\ADT\Controllers\Drugcode_management::edit');90$routes->post('drugcode_management/merge/(:any)', '\Modules\ADT\Controllers\Drugcode_management::merge/$1');91$routes->get('drugcode_management/disable/(:any)', '\Modules\ADT\Controllers\Drugcode_management::disable/$1');92$routes->get('drugcode_management/enable', '\Modules\ADT\Controllers\Drugcode_management::enable');93$routes->post('drugcode_management/save', '\Modules\ADT\Controllers\Drugcode_management::save');94$routes->post('dose_management/add', '\Modules\ADT\Controllers\Dose_management::add');95$routes->post('dose_management/edit', '\Modules\ADT\Controllers\Dose_management::edit');96$routes->get('dose_management/enable/(:any)', '\Modules\ADT\Controllers\Dose_management::enable/$1');97$routes->get('dose_management/disable/(:any)', '\Modules\ADT\Controllers\Dose_management::disable/$1');98$routes->post('dose_management/update', '\Modules\ADT\Controllers\Dose_management::update');99$routes->post('dose_management/save', '\Modules\ADT\Controllers\Dose_management::save');100$routes->get('dossing_chart/add', '\Modules\ADT\Controllers\Dossing_chart::add');101$routes->get('dossing_chart/edit', '\Modules\ADT\Controllers\Dossing_chart::edit');102$routes->post('dossing_chart/merge/(:any)', '\Modules\ADT\Controllers\Dossing_chart::merge/$1');103$routes->get('dossing_chart/disable/(:any)', '\Modules\ADT\Controllers\Dossing_chart::disable/$1');104$routes->get('dossing_chart/enable', '\Modules\ADT\Controllers\Dossing_chart::enable');105$routes->post('dossing_chart/save', '\Modules\ADT\Controllers\Dossing_chart::save');106$routes->post('indication_management/add', '\Modules\ADT\Controllers\Indication_management::add');107$routes->post('indication_management/edit', '\Modules\ADT\Controllers\Indication_management::edit');108$routes->get('indication_management/enable/(:any)', '\Modules\ADT\Controllers\Indication_management::enable/$1');109$routes->get('indication_management/disable/(:any)', '\Modules\ADT\Controllers\Indication_management::disable/$1');110$routes->post('indication_management/update', '\Modules\ADT\Controllers\Indication_management::update');111$routes->post('indication_management/save', '\Modules\ADT\Controllers\Indication_management::save');112$routes->post('drugsource_management/add', '\Modules\ADT\Controllers\Drugsource_management::add');113$routes->post('drugsource_management/edit', '\Modules\ADT\Controllers\Drugsource_management::edit');114$routes->get('drugsource_management/enable/(:any)', '\Modules\ADT\Controllers\Drugsource_management::enable/$1');115$routes->get('drugsource_management/disable/(:any)', '\Modules\ADT\Controllers\Drugsource_management::disable/$1');116$routes->post('drugsource_management/update', '\Modules\ADT\Controllers\Drugsource_management::update');117$routes->post('drugsource_management/save', '\Modules\ADT\Controllers\Drugsource_management::save');118$routes->post('drugdestination_management/add', '\Modules\ADT\Controllers\Drugdestination_management::add');119$routes->post('drugdestination_management/edit', '\Modules\ADT\Controllers\Drugdestination_management::edit');120$routes->get('drugdestination_management/enable/(:any)', '\Modules\ADT\Controllers\Drugdestination_management::enable/$1');121$routes->get('drugdestination_management/disable/(:any)', '\Modules\ADT\Controllers\Drugdestination_management::disable/$1');122$routes->post('drugdestination_management/update', '\Modules\ADT\Controllers\Drugdestination_management::update');123$routes->post('drugdestination_management/save', '\Modules\ADT\Controllers\Drugdestination_management::save');124$routes->post('genericname_management/add', '\Modules\ADT\Controllers\Genericname_management::add');125$routes->post('genericname_management/edit', '\Modules\ADT\Controllers\Genericname_management::edit');126$routes->get('genericname_management/enable/(:any)', '\Modules\ADT\Controllers\Genericname_management::enable/$1');127$routes->get('genericname_management/disable/(:any)', '\Modules\ADT\Controllers\Genericname_management::disable/$1');128$routes->post('genericname_management/update', '\Modules\ADT\Controllers\Genericname_management::update');129$routes->post('genericname_management/save', '\Modules\ADT\Controllers\Genericname_management::save');130$routes->post('brandname_management/add', '\Modules\ADT\Controllers\Brandname_management::add');131$routes->post('brandname_management/edit', '\Modules\ADT\Controllers\Brandname_management::edit');132$routes->get('brandname_management/enable/(:any)', '\Modules\ADT\Controllers\Brandname_management::enable/$1');133$routes->get('brandname_management/disable/(:any)', '\Modules\ADT\Controllers\Brandname_management::disable/$1');134$routes->get('brandname_management/delete/(:any)', '\Modules\ADT\Controllers\Brandname_management::delete/$1');135$routes->post('brandname_management/update', '\Modules\ADT\Controllers\Brandname_management::update');136$routes->post('brandname_management/save', '\Modules\ADT\Controllers\Brandname_management::save');137$routes->post('client_management/add', '\Modules\ADT\Controllers\Client_management::add');138$routes->post('client_management/edit', '\Modules\ADT\Controllers\Client_management::edit');139$routes->get('client_management/enable/(:any)', '\Modules\ADT\Controllers\Client_management::enable/$1');140$routes->get('client_management/disable/(:any)', '\Modules\ADT\Controllers\Client_management::disable/$1');141$routes->get('client_management/delete/(:any)', '\Modules\ADT\Controllers\Client_management::delete/$1');142$routes->post('client_management/update', '\Modules\ADT\Controllers\Client_management::update');143$routes->post('client_management/save', '\Modules\ADT\Controllers\Client_management::save');144$routes->post('Nonadherence_Management/add', '\Modules\ADT\Controllers\Nonadherence_management::add');145$routes->post('Nonadherence_Management/edit', '\Modules\ADT\Controllers\Nonadherence_management::edit');146$routes->get('Nonadherence_Management/enable/(:any)', '\Modules\ADT\Controllers\Nonadherence_management::enable/$1');147$routes->get('Nonadherence_Management/disable/(:any)', '\Modules\ADT\Controllers\Nonadherence_management::disable/$1');148$routes->get('Nonadherence_Management/delete/(:any)', '\Modules\ADT\Controllers\Nonadherence_management::delete/$1');149$routes->post('nonadherence_management/update', '\Modules\ADT\Controllers\Nonadherence_management::update');150$routes->post('nonadherence_management/save', '\Modules\ADT\Controllers\Nonadherence_management::save');151$routes->get('visit_management', '\Modules\ADT\Controllers\Visit_management::index');152$routes->post('visit_management/add', '\Modules\ADT\Controllers\Visit_management::add');153$routes->post('visit_management/edit', '\Modules\ADT\Controllers\Visit_management::edit');154$routes->get('visit_management/enable/(:any)', '\Modules\ADT\Controllers\Visit_management::enable/$1');155$routes->get('visit_management/disable/(:any)', '\Modules\ADT\Controllers\Visit_management::disable/$1');156$routes->get('visit_management/delete/(:any)', '\Modules\ADT\Controllers\Visit_management::delete/$1');157$routes->post('visit_management/update', '\Modules\ADT\Controllers\Visit_management::update');158$routes->post('visit_management/save', '\Modules\ADT\Controllers\Visit_management::save');159$routes->get('viral_load_manual', '\Modules\ADT\Controllers\Viral_load_manual::index');160$routes->post('viral_load_manual/get_patient_ccc_number', '\Modules\ADT\Controllers\Viral_load_manual::get_patient_ccc_number');161$routes->get('viral_load_manual/get_viral_load', '\Modules\ADT\Controllers\Viral_load_manual::get_viral_load');162$routes->post('viral_load_manual/update', '\Modules\ADT\Controllers\Viral_load_manual::update');163$routes->post('drug_stock_balance_sync/getRunningBalance', '\Modules\ADT\Controllers\Drug_stock_balance_sync::getRunningBalance');164$routes->post('drug_stock_balance_sync/synch_balance', '\Modules\ADT\Controllers\Drug_stock_balance_sync::synch_balance');165$routes->post('dossing_chart_drugs/get_drugs', '\Modules\ADT\Controllers\Dossing_chart::get_drugs');166$routes->post('dossing_chart_dose/get_dose', '\Modules\ADT\Controllers\Dossing_chart::get_dose');167$routes->get('order_settings/fetch/(:any)', '\Modules\ADT\Controllers\Order_settings::fetch/$1');168$routes->get('order_settings/fetch/(:any)', '\Modules\ADT\Controllers\Order_settings::fetch/$1');169$routes->get('order_settings/fetch/(:any)', '\Modules\ADT\Controllers\Order_settings::fetch/$1');170$routes->get('order_settings/fetch/(:any)', '\Modules\ADT\Controllers\Order_settings::fetch/$1');171$routes->get('order_settings/fetch/(:any)', '\Modules\ADT\Controllers\Order_settings::fetch/$1');172$routes->get('order_settings/get_details/(:any)/(:any)', '\Modules\ADT\Controllers\Order_settings::get_details/$1/$2');173$routes->post('order_settings/save/(:any)', '\Modules\ADT\Controllers\Order_settings::save/$1');174$routes->post('order_settings/update/(:any)/(:any)', '\Modules\ADT\Controllers\Order_settings::update/$1/$2');175$routes->get('order_settings/disable/(:any)/(:any)', '\Modules\ADT\Controllers\Order_settings::disable/$1/$2');176$routes->get('order_settings/enable/(:any)/(:any)', '\Modules\ADT\Controllers\Order_settings::enable/$1/$2');177/* Pharmacovigilance */178$routes->get('pqmp/(:any)/(:any)', '\Modules\ADT\Controllers\Inventory_management::pqmp/$1/$2');179$routes->get('adr/(:any)/(:any)', '\Modules\ADT\Controllers\Inventory_management::adr/$1/$2');180$routes->get('inventory_management/adr/(:any)', '\Modules\ADT\Controllers\Inventory_management::adr/$1');181$routes->get('adr_view/adr/(:any)', '\Modules\ADT\Controllers\Inventory_management::adr_view/$1');182$routes->post('inventory_management/save_pqm_for_synch', '\Modules\ADT\Controllers\Inventory_management::save_pqm_for_synch');183$routes->post('inventory_management/adr/save/(:any)', '\Modules\ADT\Controllers\Inventory_management::adr_view/$1');184$routes->get('inventory_management/loadRecord/(:any)', '\Modules\ADT\Controllers\Inventory_management::loadRecord/$1');185$routes->post('inventory_management/export_pqmp/(:any)/(:any)', '\Modules\ADT\Controllers\Inventory_management::export_pqmp/$1/$2');186$routes->get('inventory_management/deladr/(:any)/delete', '\Modules\ADT\Controllers\Inventory_management::deleteAdr/$1/$2');187$routes->post('inventory_management/adr/(:any)', '\Modules\ADT\Controllers\Inventory_management::adr/$1');188$routes->get('inventory_management/loadAdrRecord/(:any)', '\Modules\ADT\Controllers\Inventory_management::loadAdrRecord/$1');189$routes->post('inventory_management/export_adr/(:any)/(:any)', '\Modules\ADT\Controllers\Inventory_management::export_adr/$1/$2');190//$routes->post('user_management/profile_update', '\Modules\ADT\Controllers\Inventory_management::profile_update/$1/$2');191/* Drugs */192$routes->get('drugcode_classification', '\Modules\ADT\Controllers\Drugcode_classification::listing');193$routes->get('drugcode_management', '\Modules\ADT\Controllers\Drugcode_management::listing');194$routes->get('dose_management', '\Modules\ADT\Controllers\Dose_management::listing');195$routes->get('indication_management', '\Modules\ADT\Controllers\Indication_management::listing');196$routes->get('drugsource_management', '\Modules\ADT\Controllers\Drugsource_management::listing');197$routes->get('drugdestination_management', '\Modules\ADT\Controllers\Drugdestination_management::listing');198$routes->get('genericname_management', '\Modules\ADT\Controllers\Genericname_management::listing');199$routes->get('brandname_management', '\Modules\ADT\Controllers\Brandname_management::index');200$routes->get('drug_stock_balance_sync/(:any)', '\Modules\ADT\Controllers\Drug_stock_balance_sync::view_balance/$1');201$routes->get('dossing_chart', '\Modules\ADT\Controllers\Dossing_chart::index');202//$routes->get('dossing_chart_drugs', '\Modules\ADT\Controllers\Dossing_chart::index');203//$routes->get('dossing_chart_dose', '\Modules\ADT\Controllers\Dossing_chart::index');204$routes->get('update_balances', '\Modules\ADT\Controllers\Drug_stock_balance_sync::update_balances');205/* Settings Management */206$routes->get('settings_management', '\Modules\ADT\Controllers\Settings_management::index');207$routes->match(['get', 'post'], 'settings_management/getActiveAccessLevels', '\Modules\ADT\Controllers\Settings_management::getActiveAccessLevels');208$routes->match(['get', 'post'], 'settings_management/getMenus', '\Modules\ADT\Controllers\Settings_management::getMenus');209/* Auto Management */210$routes->match(['get', 'post'], 'auto_management', '\Modules\ADT\Controllers\Auto_management::index');211$routes->get('auto_management/get_viral_load/(:any)', '\Modules\ADT\Controllers\Auto_management::get_viral_load/$1');212/* Facilities */213$routes->get('facility_management', '\Modules\ADT\Controllers\Facility_Management::index');214$routes->match(['get', 'post'], 'facility_management/getCurrent', '\Modules\ADT\Controllers\Facility_Management::getCurrent');215$routes->get('client_management', '\Modules\ADT\Controllers\Client_management::index');216$routes->post('facility_management/update', '\Modules\ADT\Controllers\Facility_Management::update');217$routes->get('order_settings/listing/(:any)', '\Modules\ADT\Controllers\Order_settings::listing/$1');218$routes->get('facilitydashboard_management/getPatientMasterList', '\Modules\ADT\Controllers\Facilitydashboard_Management::getPatientMasterList');219/* Others */220$routes->get('nonadherence_management', '\Modules\ADT\Controllers\Nonadherence_management::index');221$routes->get('patient_management/merge_list', '\Modules\ADT\Controllers\Patient_management::merge_list');222$routes->get('getPatientMergeList', '\Modules\ADT\Controllers\Patient_management::getPatientMergeList');223/* User Management */224$routes->get('user_management', '\Modules\ADT\Controllers\User_management::index');225$routes->get('user_management/get_stores', '\Modules\ADT\Controllers\User_management::get_stores');226$routes->get('user_management/edit', '\Modules\ADT\Controllers\User_management::edit_');227$routes->get('user_management/enable/(:any)', '\Modules\ADT\Controllers\User_management::enable/$1');228$routes->get('user_management/save', '\Modules\ADT\Controllers\User_management::save');229$routes->post('user_management/profile_update', '\Modules\ADT\Controllers\User_management::profile_update');230$routes->get('user_management/get_sites/(:any)', '\Modules\ADT\Controllers\User_management::get_sites/$1');231$routes->post('user_management/resend_password', '\Modules\ADT\Controllers\User_management::resendPassword');232/* Report Management */233$routes->group('report_management', ['namespace' => '\Modules\ADT\Controllers'], function ($routes) {234 $routes->get('/', 'Report_management::index');235 //Standard Reports236 $routes->get('patient_enrolled/(:any)/(:any)/(:any)', 'Report_management::patient_enrolled/$1/$2/$3');237 $routes->get('getStartedonART/(:any)/(:any)/(:any)', 'Report_management::getStartedonART/$1/$2/$3');238 $routes->get('graph_patients_enrolled_in_year/(:any)', 'Report_management::graph_patients_enrolled_in_year/$1');239 $routes->get('cumulative_patients/(:any)', 'Report_management::cumulative_patients/$1');240 $routes->get('cumulative_patients/(:any)/(:any)', 'Report_management::cumulative_patients/$1/$2');241 $routes->get('all_service_statistics/(:any)', 'Report_management::all_service_statistics/$1');242 $routes->get('getFamilyPlanning/(:any)', 'Report_management::getFamilyPlanning/$1');243 $routes->get('getIndications/(:any)/(:any)', 'Report_management::getIndications/$1/$2');244 $routes->get('getTBPatients/(:any)/(:any)', 'Report_management::getTBPatients/$1/$2');245 $routes->get('getnonisoniazidPatients/(:any)', 'Report_management::getnonisoniazidPatients/$1');246 $routes->get('disclosure_chart/(:any)/(:any)', 'Report_management::disclosure_chart/$1/$2');247 $routes->get('getADR/(:any)', 'Report_management::getADR/$1');248 $routes->get('getChronic/(:any)', 'Report_management::getChronic/$1');249 $routes->get('patients_disclosure/(:any)/(:any)', 'Report_management::patients_disclosure/$1/$2');250 $routes->get('getisoniazidPatients/(:any)/(:any)', 'Report_management::getisoniazidPatients/$1/$2');251 $routes->get('getMMDMMS/(:any)', 'Report_management::getMMDMMS/$1');252 $routes->get('getDrugs', 'Report_management::getDrugs');253 $routes->get('dispensingReport/(:any)/(:any)', 'Report_management::dispensingReport/$1/$2');254 $routes->get('getScheduledPatients/(:any)/(:any)/(:any)/(:any)', 'Report_management::getScheduledPatients/$1/$2/$3/$4');255 $routes->get('getPatientsStartedonDate/(:any)/(:any)', 'Report_management::getPatientsStartedonDate/$1/$2');256 $routes->get('getPatientMissingAppointments/(:any)/(:any)', 'Report_management::getPatientMissingAppointments/$1/$2');257 $routes->get('getPatientsforRefill/(:any)/(:any)', 'Report_management::getPatientsforRefill/$1/$2');258 $routes->get('get_viral_load_results/(:any)/(:any)', 'Report_management::get_viral_load_results/$1/$2');259 $routes->get('getPatientList/(:any)/(:any)/(:any)', 'Report_management::getPatientList/$1/$2/$3');260 $routes->get('getScheduledPatients/(:any)/(:any)', 'Report_management::getScheduledPatients/$1/$2');261 $routes->get('get_pep_reasons_patients/(:any)/(:any)', 'Report_management::get_pep_reasons_patients/$1/$2');262 $routes->get('get_pep_reasons/(:any)/(:any)', 'Report_management::get_pep_reasons/$1/$2');263 $routes->get('get_prep_patients/(:any)/(:any)', 'Report_management::get_prep_patients/$1/$2');264 $routes->get('get_prep_reasons/(:any)/(:any)', 'Report_management::get_prep_reasons/$1/$2');265 $routes->get('get_prep_reasons_patients/(:any)/(:any)', 'Report_management::get_prep_reasons_patients/$1/$2');266 //Visting Patients267 $routes->get('distribution_refill/(:any)', 'Report_management::distribution_refill/$1');268 $routes->get('getRefillDistributionPatients/(:any)/(:any)', 'Report_management::getRefillDistributionPatients/$1/$2');269 $routes->get('getPatientsStartedonDateDiffCare/(:any)/(:any)', 'Report_management::getPatientsStartedonDateDiffCare/$1/$2');270 $routes->get('getScheduledPatientsDiffCare/(:any)/(:any)', 'Report_management::getScheduledPatientsDiffCare/$1/$2');271 $routes->get('getPatientsOnDiffCare/(:any)/(:any)', 'Report_management::getPatientsOnDiffCare/$1/$2');272 //Differentiated Care273 $routes->get('patients_nonadherence/(:any)/(:any)', 'Report_management::patients_nonadherence/$1/$2');274 $routes->get('getAdherence/(:any)/(:any)/(:any)/(:any)', 'Report_management::getAdherence/$1/$2/$3/$4');275 $routes->get('patients_switched_to_second_line_regimen/(:any)/(:any)', 'Report_management::patients_switched_to_second_line_regimen/$1/$2');276 //Early Warning Indicators277 $routes->get('getPatientsforRefillDiffCare/(:any)/(:any)', 'Report_management::getPatientsforRefillDiffCare/$1/$2');278 $routes->get('patients_who_changed_regimen/(:any)/(:any)', 'Report_management::patients_who_changed_regimen/$1/$2');279 $routes->get('patients_starting/(:any)/(:any)', 'Report_management::patients_starting/$1/$2');280 $routes->get('graphical_adherence/(:any)/(:any)/(:any)', 'Report_management::graphical_adherence/$1/$2/$3');281 $routes->get('patient_consumption/(:any)/(:any)', 'Report_management::patient_consumption/$1/$2');282 $routes->get('drug_stock_on_hand/(:any)', 'Report_management::drug_stock_on_hand/$1');283 $routes->get('getMoreHelp/(:any)/(:any)/(:any)', 'Report_management::getMoreHelp/$1/$2/$3');284 $routes->get('get_lost_followup/(:any)/(:any)', 'Report_management::get_lost_followup/$1/$2');285 $routes->get('get_viral_loadsummary/(:any)', 'Report_management::get_viral_loadsummary/$1');286 //Drug Inventory287 $routes->get('drug_consumption/(:any)/(:any)', 'Report_management::drug_consumption/$1/$2');288 $routes->get('stock_report/(:any)/(:any)/(:any)', 'Report_management::stock_report/$1/$2/$3');289 $routes->get('getDrugsIssued/(:any)/(:any)/(:any)', 'Report_management::getDrugsIssued/$1/$2/$3');290 $routes->get('expired_drugs/(:any)', 'Report_management::expired_drugs/$1');291 $routes->get('expiring_drugs/(:any)', 'Report_management::expiring_drugs/$1');292 $routes->get('stock_report/(:any)/(:any)/(:any)/(:any)', 'Report_management::stock_report/$1/$2/$3/$4');293 $routes->get('getFacilityConsumption/(:any)/(:any)', 'Report_management::getFacilityConsumption/$1/$2');294 $routes->get('getDailyConsumption/(:any)/(:any)', 'Report_management::getDailyConsumption/$1/$2');295 $routes->get('getMOHForm/(:any)/(:any)/(:any)', 'Report_management::getMOHForm/$1/$2/$3');296 //MOH Forms297 $routes->get('getDrugsReceived/(:any)/(:any)/(:any)', 'Report_management::getDrugsReceived/$1/$2/$3');298 //Guidelines299});300$routes->get('load_guidelines_view', 'Report_management::load_guidelines_view');301/* Manual/AutoScript */302/* Manual/AutoScript */303$routes->get('auto_management/index/(:any)', '\Modules\ADT\Controllers\Auto_management::index/$1');304$routes->post('regimen_drug_management/save', '\Modules\ADT\Controllers\Regimen_drug_management::save');305$routes->get('regimen_drug_management/enable/(:any)', '\Modules\ADT\Controllers\Regimen_drug_management::enable/$1');306$routes->get('regimen_drug_management/disable/(:any)', '\Modules\ADT\Controllers\Regimen_drug_management::disable/$1');307/* Patients */308$routes->addRedirect('patient_management', 'patients');309$routes->addRedirect('addpatient_show', 'patients/add');310$routes->get('patients', '\Modules\ADT\Controllers\Patient_management::index');311$routes->get('patients/listing', '\Modules\ADT\Controllers\Patient_management::listing');312$routes->get('patients/add', '\Modules\ADT\Controllers\Patient_management::addpatient_show');313$routes->match(['get', 'post'], 'patient/save', '\Modules\ADT\Controllers\Patient_management::save');314$routes->match(['get', 'post'], 'patient/delete/(:any)', '\Modules\ADT\Controllers\Patient_management::delete/$1');315$routes->get('patient/disable/(:any)', '\Modules\ADT\Controllers\Patient_management::disable/$1');316$routes->get('patient/enable/(:any)', '\Modules\ADT\Controllers\Patient_management::enable/$1');317$routes->get('patient/edit/(:any)', '\Modules\ADT\Controllers\Patient_management::edit');318$routes->post('patient/update/(:any)', '\Modules\ADT\Controllers\Patient_management::update');319$routes->post('patient/update_visit', '\Modules\ADT\Controllers\Patient_management::update_visit');320$routes->get('get-patients', '\Modules\ADT\Controllers\Patient_management::get_patients');321$routes->get('get-patients/(:any)', '\Modules\ADT\Controllers\Patient_management::get_patients/$1');322$routes->get('patient/load_view/(:any)/(:any)', '\Modules\ADT\Controllers\Patient_management::load_view');323$routes->get('patient/load_patient/(:any)', '\Modules\ADT\Controllers\Patient_management::load_patient');324$routes->get('patient/get_visits/(:any)', '\Modules\ADT\Controllers\Patient_management::get_visits');325$routes->get('patient/load_form/(:any)', '\Modules\ADT\Controllers\Patient_management::load_form');326$routes->get('patient/load_summary/(:any)', '\Modules\ADT\Controllers\Patient_management::load_summary');327$routes->get('patient/checkpatient_no/(:any)', '\Modules\ADT\Controllers\Patient_management::checkpatient_no');328$routes->match(['get', 'post'], 'patient/getSixMonthsDispensing/(:any)', '\Modules\ADT\Controllers\Patient_management::getSixMonthsDispensing/$1');329$routes->match(['get', 'post'], 'patient/getRegimenChange/(:any)', '\Modules\ADT\Controllers\Patient_management::getRegimenChange/$1');330$routes->match(['get', 'post'], 'patient/getAppointmentHistory/(:any)', '\Modules\ADT\Controllers\Patient_management::getAppointmentHistory/$1');331$routes->get('patient/get_Last_vl_result/(:any)', '\Modules\ADT\Controllers\Patient_management::get_Last_vl_result/$1');332$routes->match(['get', 'post'], 'patient/get_viral_load_info/(:any)', '\Modules\ADT\Controllers\Patient_management::get_viral_load_info');333$routes->get('patient/viewDetails/(:any)', '\Modules\ADT\Controllers\Patient_management::viewDetails');334$routes->get('patient/requiredFields/(:any)', '\Modules\ADT\Controllers\Patient_management::requiredFields');335$routes->match(['get', 'post'], 'patient/get_patient_details', '\Modules\ADT\Controllers\Patient_management::get_patient_details');336$routes->match(['get', 'post'], 'patient/getAppointments/(:any)', '\Modules\ADT\Controllers\Patient_management::getAppointments');337$routes->match(['get', 'post'], 'patient/getWhoStage', '\Modules\ADT\Controllers\Patient_management::getWhoStage');338/* Dispensement */339$routes->get('dispensement_management/dispense/(:any)', '\Modules\ADT\Controllers\Dispensement_management::dispense');340$routes->match(['get', 'post'], 'dispensement_management/save', '\Modules\ADT\Controllers\Dispensement_management::save');341$routes->get('dispensement_management/edit/(:any)', '\Modules\ADT\Controllers\Dispensement_management::edit');342$routes->get('dispensement_management/getPrescriptions/(:any)', '\Modules\ADT\Controllers\Dispensement_management::getPrescriptions/$1');343$routes->match(['get', 'post'], 'dispensement_management/get_other_dispensing_details', '\Modules\ADT\Controllers\Dispensement_management::get_other_dispensing_details');344$routes->get('dispensement_management/get_patient_data/(:any)', '\Modules\ADT\Controllers\Dispensement_management::get_patient_data');345$routes->match(['get', 'post'], 'dispensement_management/getDrugsRegimens', '\Modules\ADT\Controllers\Dispensement_management::getDrugsRegimens');346$routes->match(['get', 'post'], 'dispensement_management/drugAllergies', '\Modules\ADT\Controllers\Dispensement_management::drugAllergies');347$routes->post('dispensement_management/getIndications', '\Modules\ADT\Controllers\Dispensement_management::getIndications');348$routes->post('dispensement_management/getInstructions/(:any)', '\Modules\ADT\Controllers\Dispensement_management::getInstructions');349$routes->post('dispensement_management/getBrands', '\Modules\ADT\Controllers\Dispensement_management::getBrands');350$routes->match(['get', 'post'], 'dispensement_management/getDrugDose/(:any)', '\Modules\ADT\Controllers\Dispensement_management::getDrugDose');351$routes->post('dispensement_management/getDoses', '\Modules\ADT\Controllers\Dispensement_management::getDoses');352$routes->post('dispensement_management/getPreviouslyDispensedDrugs', '\Modules\ADT\Controllers\Dispensement_management::getPreviouslyDispensedDrugs');353$routes->post('dispensement_management/print_test', '\Modules\ADT\Controllers\Dispensement_management::print_test');354$routes->post('dispensement_management/getFacililtyAge', '\Modules\ADT\Controllers\Dispensement_management::getFacililtyAge');355$routes->post('patient_management/merge', '\Modules\ADT\Controllers\Patient_management::merge');356$routes->post('patient_management/unmerge', '\Modules\ADT\Controllers\Patient_management::unmerge');357$routes->match(['get', 'post'], 'regimen_management/getAllDrugs', '\Modules\ADT\Controllers\Regimen_management::getAllDrugs');358$routes->match(['get', 'post'], 'regimen_management/getFilteredRegiments', '\Modules\ADT\Controllers\Regimen_management::getFilteredRegiments');359$routes->post('regimen_management/getRegimenLine/(:any)/(:any)', '\Modules\ADT\Controllers\Regimen_management::getRegimenLine');360$routes->match(['get', 'post'], 'regimen_management/getRegimenLine/(:any)', '\Modules\ADT\Controllers\Regimen_management::getRegimenLine');361/* Regimens */362$routes->post('order/authenticate_user', '\Modules\ADT\Controllers\Order::authenticate_user');363$routes->get('order', '\Modules\ADT\Controllers\Order::index');364/* Order */365$routes->match(['get', 'post'], 'order/create_order/(:any)/(:any)', '\Modules\ADT\Controllers\Order::create_order');366$routes->post('order/save/(:any)/(:any)', '\Modules\ADT\Controllers\Order::save');367$routes->post('order/save/(:any)/(:any)/(:any)', '\Modules\ADT\Controllers\Order::save');368$routes->get('order/read_order/(:any)/(:any)', '\Modules\ADT\Controllers\Order::read_order');369$routes->get('order/view_order/(:any)/(:any)', '\Modules\ADT\Controllers\Order::view_order');370$routes->get('order/logout', '\Modules\ADT\Controllers\Order::logout');371$routes->match(['get', 'post'], 'order/update_order/(:any)/(:any)', '\Modules\ADT\Controllers\Order::update_order');372$routes->get('order/download_order/(:any)/(:any)', '\Modules\ADT\Controllers\Order::download_order');373$routes->post('order/getCentralDataMaps/(:any)/(:any)/(:any)', '\Modules\ADT\Controllers\Order::getCentralDataMaps');374$routes->match(['get', 'post'], 'order/getoiPatients', '\Modules\ADT\Controllers\Order::getoiPatients');375$routes->post('order/getNotMappedRegimenPatients/(:any)/(:any)', '\Modules\ADT\Controllers\Order::getNotMappedRegimenPatients');376$routes->match(['get', 'post'], 'order/getItems', '\Modules\ADT\Controllers\Order::getItems');377$routes->get('order/get_dhis_data/(:any)', '\Modules\ADT\Controllers\Order::get_dhis_data/(:any)');378/** Order Settings */379$routes->get('order_settings/fetch/(:any)', '\Modules\ADT\Controllers\Order_settings::fetch');380$routes->post('order/getExpectedActualReport', '\Modules\ADT\Controllers\Order::getExpectedActualReport');381$routes->match(['get', 'post'], 'order/get_aggregated_fmaps/(:any)/(:any)', '\Modules\ADT\Controllers\Order::get_aggregated_fmaps');382$routes->post('order/getPeriodRegimenPatients/(:any)/(:any)', '\Modules\ADT\Controllers\Order::getPeriodRegimenPatients');383/** Order Settings */384$routes->get('admin_management/inactive_users', '\Modules\ADT\Controllers\Admin_management::inactive_users');385$routes->get('admin_management/online_users', '\Modules\ADT\Controllers\Admin_management::online_users');386$routes->get('admin_management/addCounty', '\Modules\ADT\Controllers\Admin_management::addCounty');387$routes->get('github', '\Modules\Github\Controllers\Github::index');388$routes->get('help', '\Modules\Help\Controllers\Help::index');...

Full Screen

Full Screen

reflection_php5_test.php

Source:reflection_php5_test.php Github

copy

Full Screen

2// $Id: reflection_php5_test.php 1778 2008-04-21 16:13:08Z edwardzyang $3require_once(dirname(__FILE__) . '/../autorun.php');4require_once(dirname(__FILE__) . '/../reflection_php5.php');56class AnyOldLeafClass {7 function aMethod() { }8}910abstract class AnyOldClass {11 function aMethod() { }12}1314class AnyOldLeafClassWithAFinal {15 final function aMethod() { }16}1718interface AnyOldInterface {19 function aMethod();20}2122interface AnyOldArgumentInterface {23 function aMethod(AnyOldInterface $argument);24}2526interface AnyDescendentInterface extends AnyOldInterface {27}2829class AnyOldImplementation implements AnyOldInterface {30 function aMethod() { }31 function extraMethod() { }32}3334abstract class AnyAbstractImplementation implements AnyOldInterface {35}3637abstract class AnotherOldAbstractClass {38 protected abstract function aMethod(AnyOldInterface $argument);39}4041class AnyOldSubclass extends AnyOldImplementation { }4243class AnyOldArgumentClass {44 function aMethod($argument) { }45}4647class AnyOldArgumentImplementation implements AnyOldArgumentInterface {48 function aMethod(AnyOldInterface $argument) { }49}5051class AnyOldTypeHintedClass implements AnyOldArgumentInterface {52 function aMethod(AnyOldInterface $argument) { }53}5455class AnyDescendentImplementation implements AnyDescendentInterface {56 function aMethod() { }57}5859class AnyOldOverloadedClass {60 function __isset($key) { }61 function __unset($key) { }62}6364class AnyOldClassWithStaticMethods {65 static function aStatic() { }66 static function aStaticWithParameters($arg1, $arg2) { }67}6869abstract class AnyOldAbstractClassWithAbstractMethods {70 abstract function anAbstract();71 abstract function anAbstractWithParameter($foo);72 abstract function anAbstractWithMultipleParameters($foo, $bar);73}7475class TestOfReflection extends UnitTestCase {7677 function testClassExistence() {78 $reflection = new SimpleReflection('AnyOldLeafClass');79 $this->assertTrue($reflection->classOrInterfaceExists());80 $this->assertTrue($reflection->classOrInterfaceExistsSansAutoload());81 $this->assertFalse($reflection->isAbstract());82 $this->assertFalse($reflection->isInterface());83 }8485 function testClassNonExistence() {86 $reflection = new SimpleReflection('UnknownThing');87 $this->assertFalse($reflection->classOrInterfaceExists());88 $this->assertFalse($reflection->classOrInterfaceExistsSansAutoload());89 }9091 function testDetectionOfAbstractClass() {92 $reflection = new SimpleReflection('AnyOldClass');93 $this->assertTrue($reflection->isAbstract());94 }9596 function testDetectionOfFinalMethods() {97 $reflection = new SimpleReflection('AnyOldClass');98 $this->assertFalse($reflection->hasFinal());99 $reflection = new SimpleReflection('AnyOldLeafClassWithAFinal');100 $this->assertTrue($reflection->hasFinal());101 }102103 function testFindingParentClass() {104 $reflection = new SimpleReflection('AnyOldSubclass');105 $this->assertEqual($reflection->getParent(), 'AnyOldImplementation');106 }107108 function testInterfaceExistence() {109 $reflection = new SimpleReflection('AnyOldInterface');110 $this->assertTrue($reflection->classOrInterfaceExists());111 $this->assertTrue($reflection->classOrInterfaceExistsSansAutoload());112 $this->assertTrue($reflection->isInterface());113 }114115 function testMethodsListFromClass() {116 $reflection = new SimpleReflection('AnyOldClass');117 $this->assertIdentical($reflection->getMethods(), array('aMethod'));118 }119120 function testMethodsListFromInterface() {121 $reflection = new SimpleReflection('AnyOldInterface');122 $this->assertIdentical($reflection->getMethods(), array('aMethod'));123 $this->assertIdentical($reflection->getInterfaceMethods(), array('aMethod'));124 }125126 function testMethodsComeFromDescendentInterfacesASWell() {127 $reflection = new SimpleReflection('AnyDescendentInterface');128 $this->assertIdentical($reflection->getMethods(), array('aMethod'));129 }130 131 function testCanSeparateInterfaceMethodsFromOthers() {132 $reflection = new SimpleReflection('AnyOldImplementation');133 $this->assertIdentical($reflection->getMethods(), array('aMethod', 'extraMethod'));134 $this->assertIdentical($reflection->getInterfaceMethods(), array('aMethod'));135 }136137 function testMethodsComeFromDescendentInterfacesInAbstractClass() {138 $reflection = new SimpleReflection('AnyAbstractImplementation');139 $this->assertIdentical($reflection->getMethods(), array('aMethod'));140 }141142 function testInterfaceHasOnlyItselfToImplement() {143 $reflection = new SimpleReflection('AnyOldInterface');144 $this->assertEqual(145 $reflection->getInterfaces(),146 array('AnyOldInterface'));147 }148149 function testInterfacesListedForClass() {150 $reflection = new SimpleReflection('AnyOldImplementation');151 $this->assertEqual(152 $reflection->getInterfaces(),153 array('AnyOldInterface'));154 }155156 function testInterfacesListedForSubclass() {157 $reflection = new SimpleReflection('AnyOldSubclass');158 $this->assertEqual(159 $reflection->getInterfaces(),160 array('AnyOldInterface'));161 }162163 function testNoParameterCreationWhenNoInterface() {164 $reflection = new SimpleReflection('AnyOldArgumentClass');165 $function = $reflection->getSignature('aMethod');166 if (version_compare(phpversion(), '5.0.2', '<=')) {167 $this->assertEqual('function amethod($argument)', strtolower($function));168 } else {169 $this->assertEqual('function aMethod($argument)', $function);170 }171 }172173 function testParameterCreationWithoutTypeHinting() {174 $reflection = new SimpleReflection('AnyOldArgumentImplementation');175 $function = $reflection->getSignature('aMethod');176 if (version_compare(phpversion(), '5.0.2', '<=')) {177 $this->assertEqual('function amethod(AnyOldInterface $argument)', $function);178 } else {179 $this->assertEqual('function aMethod(AnyOldInterface $argument)', $function);180 }181 }182183 function testParameterCreationForTypeHinting() {184 $reflection = new SimpleReflection('AnyOldTypeHintedClass');185 $function = $reflection->getSignature('aMethod');186 if (version_compare(phpversion(), '5.0.2', '<=')) {187 $this->assertEqual('function amethod(AnyOldInterface $argument)', $function);188 } else {189 $this->assertEqual('function aMethod(AnyOldInterface $argument)', $function);190 }191 }192193 function testIssetFunctionSignature() {194 $reflection = new SimpleReflection('AnyOldOverloadedClass');195 $function = $reflection->getSignature('__isset');196 $this->assertEqual('function __isset($key)', $function);197 }198 199 function testUnsetFunctionSignature() {200 $reflection = new SimpleReflection('AnyOldOverloadedClass');201 $function = $reflection->getSignature('__unset');202 $this->assertEqual('function __unset($key)', $function);203 }204205 function testProperlyReflectsTheFinalInterfaceWhenObjectImplementsAnExtendedInterface() {206 $reflection = new SimpleReflection('AnyDescendentImplementation');207 $interfaces = $reflection->getInterfaces();208 $this->assertEqual(1, count($interfaces));209 $this->assertEqual('AnyDescendentInterface', array_shift($interfaces));210 }211 212 function testCreatingSignatureForAbstractMethod() {213 $reflection = new SimpleReflection('AnotherOldAbstractClass');214 $this->assertEqual($reflection->getSignature('aMethod'), 'function aMethod(AnyOldInterface $argument)');215 }216 217 function testCanProperlyGenerateStaticMethodSignatures() {218 $reflection = new SimpleReflection('AnyOldClassWithStaticMethods');219 $this->assertEqual('static function aStatic()', $reflection->getSignature('aStatic'));220 $this->assertEqual(221 'static function aStaticWithParameters($arg1, $arg2)',222 $reflection->getSignature('aStaticWithParameters')223 );224 }225}226227class TestOfReflectionWithTypeHints extends UnitTestCase {228 function skip() {229 $this->skipIf(version_compare(phpversion(), '5.1.0', '<'), 'Reflection with type hints only tested for PHP 5.1.0 and above');230 }231232 function testParameterCreationForTypeHintingWithArray() {233 eval('interface AnyOldArrayTypeHintedInterface {234 function amethod(array $argument);235 } 236 class AnyOldArrayTypeHintedClass implements AnyOldArrayTypeHintedInterface {237 function amethod(array $argument) {}238 }');239 $reflection = new SimpleReflection('AnyOldArrayTypeHintedClass');240 $function = $reflection->getSignature('amethod');241 $this->assertEqual('function amethod(array $argument)', $function);242 }243}244245class TestOfAbstractsWithAbstractMethods extends UnitTestCase {246 function testCanProperlyGenerateAbstractMethods() {247 $reflection = new SimpleReflection('AnyOldAbstractClassWithAbstractMethods');248 $this->assertEqual(249 'function anAbstract()',250 $reflection->getSignature('anAbstract')251 );252 $this->assertEqual(253 'function anAbstractWithParameter($foo)',254 $reflection->getSignature('anAbstractWithParameter')255 );256 $this->assertEqual(257 'function anAbstractWithMultipleParameters($foo, $bar)',258 $reflection->getSignature('anAbstractWithMultipleParameters')259 );260 }261} ...

Full Screen

Full Screen

Any

Using AI Code Generation

copy

Full Screen

1$mock = Mockery::mock('MyClass');2$mock->shouldReceive('foo')->with('bar')->once()->andReturn('baz');3$mock->foo('bar');4$mock = Mockery::mock('MyClass');5$mock->shouldReceive('foo')->with('bar')->once()->andReturn('baz');6$mock->foo('bar');

Full Screen

Full Screen

Any

Using AI Code Generation

copy

Full Screen

1use Mockery\Adapter\Phpunit\MockeryTestCase;2{3 public function testMock()4 {5 $mock = \Mockery::mock('MyClass');6 $mock->shouldReceive('doSomething')->once()->andReturn('foo');7 $this->assertEquals('foo', $mock->doSomething());8 }9}10use Mockery\Adapter\Phpunit\MockeryTestCase;11{12 public function testMock()13 {14 $mock = \Mockery::mock('MyClass');15 $mock->shouldReceive('doSomething')->once()->andReturn('foo');16 $this->assertEquals('foo', $mock->doSomething());17 }18}19use Mockery\Adapter\Phpunit\MockeryTestCase;20{21 public function testMock()22 {23 $mock = \Mockery::mock('MyClass');24 $mock->shouldReceive('doSomething')->once()->andReturn('foo');25 $this->assertEquals('foo', $mock->doSomething());26 }27}28use Mockery\Adapter\Phpunit\MockeryTestCase;29{30 public function testMock()31 {32 $mock = \Mockery::mock('MyClass');33 $mock->shouldReceive('doSomething')->once()->andReturn('foo');34 $this->assertEquals('foo', $mock->doSomething());35 }36}37use Mockery\Adapter\Phpunit\MockeryTestCase;38{39 public function testMock()40 {41 $mock = \Mockery::mock('MyClass');42 $mock->shouldReceive('doSomething')->once()->andReturn('foo');43 $this->assertEquals('foo', $mock->doSomething());44 }45}46use Mockery\Adapter\Phpunit\MockeryTestCase;47{48 public function testMock()49 {50 $mock = \Mockery::mock('MyClass');51 $mock->shouldReceive('do

Full Screen

Full Screen

Any

Using AI Code Generation

copy

Full Screen

1use Mockery;2use PHPUnit\Framework\TestCase;3use PHPUnit\Framework\Assert;4use PHPUnit\Framework\MockObject\MockObject;5use PHPUnit\Framework\MockObject\Matcher\InvokedCount;6use PHPUnit\Framework\MockObject\Matcher\Invocation;7use PHPUnit\Framework\MockObject\Matcher\MethodName;8use PHPUnit\Framework\MockObject\Matcher\Parameters;9use PHPUnit\Framework\MockObject\Matcher\AnyParameters;10use PHPUnit\Framework\MockObject\Matcher\AnyInvokedCount;11use PHPUnit\Framework\MockObject\Matcher\InvokedAtIndex;12use PHPUnit\Framework\MockObject\Matcher\InvokedAtLeastOnce;13use PHPUnit\Framework\MockObject\Matcher\InvokedAtMostOnce;14use PHPUnit\Framework\MockObject\Matcher\InvokedRecorder;15use PHPUnit\Framework\MockObject\Matcher\InvokedAtLeastCount;16use PHPUnit\Framework\MockObject\Matcher\InvokedAtMostCount;17use PHPUnit\Framework\MockObject\Matcher\InvokedAtIndexes;18use PHPUnit\Framework\MockObject\Matcher\InvokedAt;19use PHPUnit\Framework\MockObject\Matcher\StatelessInvocation;20use PHPUnit\Framework\MockObject\Matcher\StatelessInvocation;21use PHPUnit\Framework\MockObject\Matcher\InvocationOrder;22use PHPUnit\Framework\MockObject\Matcher\Invocation as InvocationMatcher;23use PHPUnit\Framework\MockObject\Matcher\Parameter;24use PHPUnit\Framework\MockObject\Matcher\ConsecutiveParameters;

Full Screen

Full Screen

Any

Using AI Code Generation

copy

Full Screen

1require_once 'vendor/autoload.php';2use Mockery as m;3{4 public function add($a, $b)5 {6 return $a + $b;7 }8}9{10 public function add($a, $b)11 {12 return $a + $b;13 }14}15{16 public function add($a, $b)17 {18 return $a + $b;19 }20}21{22 public function add($a, $b)23 {24 return $a + $b;25 }26}27{28 public function add($a, $b)29 {30 return $a + $b;31 }32}33{34 public function add($a, $b)35 {36 return $a + $b;37 }38}39{40 public function add($a, $b)41 {42 return $a + $b;43 }44}45{46 public function add($a, $b)47 {48 return $a + $b;49 }50}51{52 public function add($a, $b)53 {54 return $a + $b;55 }56}57{58 public function add($a, $b)59 {60 return $a + $b;61 }62}63{64 public function add($a, $b)65 {66 return $a + $b;67 }68}69{70 public function add($a, $b)71 {72 return $a + $b;73 }74}75{76 public function add($a, $b)77 {78 return $a + $b;79 }80}81{82 public function add($a, $b)83 {84 return $a + $b;85 }86}87{88 public function add($a, $b)89 {90 return $a + $b;91 }92}93{94 public function add($a, $b)95 {96 return $a + $b;97 }98}99{100 public function add($a, $b)101 {102 return $a + $b;103 }104}105{106 public function add($a, $b)107 {108 return $a + $b;109 }

Full Screen

Full Screen

Any

Using AI Code Generation

copy

Full Screen

1$mock = Mockery::mock('MyClass');2$mock->shouldReceive('foo')->andReturn('bar');3$mock = Mockery::mock('MyClass');4$mock->shouldReceive('foo')->andReturn('bar');5$mock = Mockery::mock('MyClass');6$mock->shouldReceive('foo')->andReturn('bar');7$mock = Mockery::mock('MyClass');8$mock->shouldReceive('foo')->andReturn('bar');9$mock = Mockery::mock('MyClass');10$mock->shouldReceive('foo')->andReturn('bar');11$mock = Mockery::mock('MyClass');12$mock->shouldReceive('foo')->andReturn('bar');13$mock = Mockery::mock('MyClass');14$mock->shouldReceive('foo')->andReturn('bar');15$mock = Mockery::mock('MyClass');16$mock->shouldReceive('foo')->andReturn('bar');17$mock = Mockery::mock('MyClass');18$mock->shouldReceive('foo')->andReturn('bar');19$mock = Mockery::mock('MyClass');20$mock->shouldReceive('foo')->andReturn('bar');21$mock = Mockery::mock('MyClass');22$mock->shouldReceive('foo')->andReturn('bar');23$mock = Mockery::mock('MyClass');24$mock->shouldReceive('foo')->andReturn('bar');

Full Screen

Full Screen

Any

Using AI Code Generation

copy

Full Screen

1use Mockery as m;2use PHPUnit\Framework\TestCase;3use PHPUnit\Framework\MockObject\MockObject;4{5 public function testMockery()6 {7 $mock = m::mock('MyClass');8 $mock->shouldReceive('doSomething')->once();9 $mock->doSomething();10 $mock->shouldHaveReceived('doSomething');11 }12 public function testPHPUnit()13 {14 $mock = $this->createMock('MyClass');15 $mock->expects($this->once())16 ->method('doSomething');17 $mock->doSomething();18 }19}20use Mockery as m;21use PHPUnit\Framework\TestCase;22use PHPUnit\Framework\MockObject\MockObject;23{24 public function testMockery()25 {26 $mock = m::mock('MyClass');27 $mock->shouldReceive('doSomething')->once();28 $mock->doSomething();29 $mock->shouldHaveReceived('doSomething');30 }31 public function testPHPUnit()32 {33 $mock = $this->createMock('MyClass');34 $mock->expects($this->once())35 ->method('doSomething');36 $mock->doSomething();37 }38}39use Mockery as m;40use PHPUnit\Framework\TestCase;41use PHPUnit\Framework\MockObject\MockObject;42{43 public function testMockery()44 {45 $mock = m::mock('MyClass');46 $mock->shouldReceive('doSomething')->once();47 $mock->doSomething();48 $mock->shouldHaveReceived('doSomething');49 }50 public function testPHPUnit()51 {52 $mock = $this->createMock('MyClass');53 $mock->expects($this->once())54 ->method('

Full Screen

Full Screen

Any

Using AI Code Generation

copy

Full Screen

1$mock = Mockery::mock('AnyClass');2$mock->shouldReceive('foo')->once()->andReturn('bar');3$mock->shouldReceive('foo')->once()->andReturn('bar');4$mock = Mockery::mock('AnyClass');5$mock->shouldReceive('foo')->once()->andReturn('bar');6$mock->shouldReceive('foo')->once()->andReturn('bar');7$mock = Mockery::mock('AnyClass');8$mock->shouldReceive('foo')->once()->andReturn('bar');9$mock->shouldReceive('foo')->once()->andReturn('bar');10$mock = Mockery::mock('AnyClass');11$mock->shouldReceive('foo')->once()->andReturn('bar');12$mock->shouldReceive('foo')->once()->andReturn('bar');13$mock = Mockery::mock('AnyClass');14$mock->shouldReceive('foo')->once()->andReturn('bar');15$mock->shouldReceive('foo')->once()->andReturn('bar');16$mock = Mockery::mock('AnyClass');17$mock->shouldReceive('foo')->once()->andReturn('bar');18$mock->shouldReceive('foo')->once()->andReturn('bar');19$mock = Mockery::mock('AnyClass');20$mock->shouldReceive('foo')->once()->andReturn('bar');21$mock->shouldReceive('foo')->once()->andReturn('bar');

Full Screen

Full Screen

Any

Using AI Code Generation

copy

Full Screen

1$mock = Mockery::mock('App\Class');2$mock->shouldReceive('someMethod')->andReturn('foo');3$mock->shouldReceive('someOtherMethod')->andReturn('bar');4$mock->shouldReceive('someOtherMethod')->with('baz')->andReturn('bar');5$mock->shouldReceive('someOtherMethod')->with('baz')->andReturn('bar');6$mock->shouldReceive('someOtherMethod')->with(Mockery::type('string'))->andReturn('bar');7$mock->shouldReceive('someOtherMethod')->with(Mockery::any())->andReturn('bar');8$mock->shouldReceive('someOtherMethod')->with(Mockery::anyOf('foo', 'bar'))->andReturn('bar');9$mock->shouldReceive('someOtherMethod')->with(Mockery::not('foo'))->andReturn('bar');10$mock->shouldReceive('someOtherMethod')->with(Mockery::on(function($value) {11 return $value % 2 == 0;12}))->andReturn('bar');13$mock->shouldReceive('someOtherMethod')->with(Mockery::on(function($value) {14 return $value % 2 == 0;15}))->andReturn('bar');16$mock->shouldReceive('someOtherMethod')->with(Mockery::not(Mockery::on(function($value) {17 return $value % 2 == 0;18})))->andReturn('bar');19$mock->shouldReceive('someOtherMethod')->with(Mockery::anyOf(Mockery::type('string'), Mockery::type('array')))->andReturn('bar');20$mock->shouldReceive('someOtherMethod')->with(Mockery::anyOf(Mockery::type('string'), Mockery::type('array')))->andReturn('bar');21$mock->shouldReceive('someOtherMethod')->with(Mockery::anyOf(Mockery::type('string'), Mockery::type('array')))->andReturn('bar');22$mock->shouldReceive('someOtherMethod')->with(Mockery::anyOf(Mockery::type('string'), Mockery::type('array')))->andReturn('bar');23$mock->shouldReceive('someOtherMethod')->with(Mockery::anyOf(Mockery::type('string'), Mockery::type('array')))->andReturn('bar');24$mock->shouldReceive('someOtherMethod')->with(Mockery::anyOf(Mockery::type('string'), Mockery::type('array')))->andReturn('bar');25$mock->shouldReceive('someOtherMethod')->with(Mockery::anyOf(Mockery::type('string'), Mockery::

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Mockery automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used methods in Any

Run Selenium Automation Tests on LambdaTest Cloud Grid

Trigger Selenium automation tests on a cloud-based Grid of 3000+ real browsers and operating systems.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful