i instala PHPUnit por el libro:Zend Framework (PHPUnit) Pruebas won'r plazo (PHPUnit: command not found/'PHPUnit_Framework_TestCase' Clase no encontrada)
sudo pear channel-discover pear.phpunit.de
sudo pear install phpunit/PHPUnit
El incluyen se añade camino en el /etc/php5/cli/php.ini
include_path = ".:/usr/share/php"
$ ls /usr/share/php/PHPUnit/
Extensions Framework
Pero ahora, si quiero ejecutar las pruebas de Zend Framework
[email protected]:/var/www/page/tests$ ./runtests.sh
+ phpunit --verbose AllTests
./runtests.sh: line 72: phpunit: command not found
[email protected]:/var/www/page/tests$ php AllTests.php
PHP Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /var/www/page/tests/Zend/Acl/AclTest.php on line 37
Por supuesto, también obtengo un phpunit: command not found
cuando intento seguir las instrucciones en el Manual de PHPUnit http://www.phpunit.de/manual/3.6/en/writing-tests-for-phpunit.html fuera del contexto de Zend Framework.
estoy teniendo la sensación de que me falta algo esencial aquí ...
Resuelto
Parece que había un problema con los canales de pera, después de añadir los otros 2 De nuevo, funcionó:
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
¿Tiene una ruta a la carpeta que contiene phpunit en su variable PATH? – Marcin
@marcin ¿podría ser un poco más específico? – Hannes
@Hannes. phpunit es un comando que se puede ejecutar desde tu terminal. intente configurarlo, es decir, exportar RUTA = $ RUTA:/ruta/a/carpeta/con/phpunit – Marcin