Je suis nouveau à des tests unitaires, je travaille sur ce tutoriel, je trouve sur internet:PHPUnit et Zend Framework
http://blog.fedecarg.com/2008/12/27/testing-zend-framework-controllers/
i Mon problème est tout simplement ne peux pas exécuter les tests affichés dans la Didacticiel!
C
: \ wamp \ www \ portailmg \ dev \ tests> PHPUnit PHPUnit 3.7.21 par Sebastian Bergmann .
Configuration lecture de C: \ wamp \ www \ portailmg \ dev \ Tests \ phpunit.xml
Temps: 0 secondes, Mémoire: 4.00MB
Aucun test exécuté!
Générer du code rapport de couverture en format HTML ... fait
C: \ wamp \ www \ portailmg \ dev \ tests>
Mon bootstrap.php qui est le seul fichier i parce que edited J'ai eu l'erreur suivante:
Avis: Zend_Loader :: Zend_Loader :: registerAutoload est obsolète 1.8.0 et sera supprimée avec 2.0.0; utiliser Zend_Loader_Autoloader plutôt dans /www/zf-tutorial/library/Zend/Loader.php
J'ai essayé de résoudre ce problème avec cela:
This is because you have the lines:
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
(or similar) somewhere in your bootstrap system.
The easiest solution is to change them to:
require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();
$loader->registerNamespace('App_');
Where 'App_' is the name of a directory on your include path that has classes within it that follow the Zend Framework naming convention, so change it as appropriate and add more if you need them.
Mon bootstrap:
<?php
error_reporting(E_ALL | E_STRICT);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
date_default_timezone_set('Europe/London');
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../applications'));
define('APPLICATION_ENV', 'loc');
define('LIBRARY_PATH', realpath(dirname(__FILE__) . '/../library'));
define('TESTS_PATH', realpath(dirname(__FILE__)));
$_SERVER['SERVER_NAME'] = 'http://localhost';
$includePaths = array(LIBRARY_PATH, get_include_path());
set_include_path(implode(PATH_SEPARATOR, $includePaths));
require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();
$loader->registerNamespace('LIBRARY_PATH');
Zend_Session::$_unitTestEnabled = true;
Zend_Session::start();
?>
Merci en avance pour votre aide
c'est correct, la version doit être 3.5.x, voir ici aussi [link] (http://stackoverflow.com/a/8389837/131664) – spankmaster79
http://framework.zend.com/blog /zend-framework-1-12-4-2-1-6-and-2-2-6-released.html ZF 1.12.4 et vers le haut support/travail avec phpunit 3.7 – kguest