1.
http://javascript.ru/unsorted/selenium-rc
2.
для phpUnit
2023 sudo pear install phpunit/PHP_CodeCoverage
2024 sudo apt-get remove phpunit
2025 sudo pear channel-discover pear.phpunit.de
2026 sudo pear channel-discover pear.symfony-project.com
2027 sudo pear channel-discover components.ez.no
2028 sudo pear update-channels
2029 sudo pear upgrade-all
2030 sudo pear install –alldeps phpunit/PHPUnit
2031 sudo pear install –force –alldeps phpunit/PHPUnit
3.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | <? //---------settings----------- define("DEV_MODE",true); define("MODULES_PATH","/"); //---------------------------- if(DEV_MODE){ini_set('display_errors',1);error_reporting(E_ALL);} class Fields{ var $_place=""; var $_isExecute=false; var $_form=""; var $_thisUrl=""; var $_scripts=""; var $_scripts_prefix="before"; function __construct($place){ $this->_place=$place; $this->_thisUrl=$_SERVER['REQUEST_URI']; } public function isExecute(){ return($this->_isExecute); } public function show(){ switch($this->_scripts_prefix){ case "before":{ echo $this->_scripts; echo $this->_form; break; } case "after":{ echo $this->_form; echo $this->_scripts; break; } default:{ echo $this->_form; break; } } } public function showAdminEdit($var=""){} public function processData($var=""){} function run($vars=""){} public function setForm($form){ $this->_form=$form; } public function execute($vars=""){ if($this->_isExecute){ $this->execute($vars); } } } class FieldManager{ var $_obj; var $_objects; function __construct($array){ $i=0; foreach($array as $key=>$value){ for($z=0;$z<sizeof($value);$z++){ $_classname=$value[$z]; include_once($_SERVER['DOCUMENT_ROOT'].MODULES_PATH.$_classname."_class.php"); $this->_objects[$_classname]=new $_classname($key); $this->_obj[$i]['object']=$this->_objects[$_classname]; $this->_obj[$i]['menu']=$key; $i++; } } if(isset($_POST)){ foreach($_POST as $key=>$value){ if(preg_match('{([a-z]+)_([a-z]+)}xis',$key,$pock)){ $this->_objects[$pock[1]]->execute($_POST[$key]); } } } } function showOjects($group){ foreach($this->_obj as $object){ if($object['menu']!=$group)continue; $object['object']->show(); } } } $classes=array( "left" => array("myField","qmyField") ); $test=new FieldManager($classes); $test->showOjects('left'); ?> |