Ciao a tutti.
Scusale l'OT, ma ho googlato in giro a lungo senza successo.
Ho un problema di configurazione con phpunit.
Ambiente Windows 7
phpunit ver. 3.5.14
php ver. 3.5.3
Se eseguo un singolo test tipo "> phpunit unit/test1.php" funziona tutto correttamente, me se cerco di eseguire tutti i test della suite con il comando ">phpunit unit/", mi da il seguente errore:
Warning: include(unit/.php): failed to open stream: No such file or directory in C:\Web\yii\framework\YiiBase.php on line 421
Warning: include(): Failed opening 'unit/.php' for inclusion (include_path='.;C:\Web\trackstar\protected\components;C:\Web\trackstar\protected\models;C:\xampp\php\PEAR;C:\xampp\php\PEAR\PHPUnit') in C:\Web\yii\framework\YiiBase.php on line 421
Fatal error: Uncaught exception 'PHPUnit_Framework_Exception' with message 'Neither "unit/.php" nor "unit/.php" could be opened.' in C:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php:102
Stack trace:
#0 C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(157): PHPUnit_Util_Skeleton_Test->__construct('unit/', '')
#1 C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#2 C:\xampp\php\phpunit(53): PHPUnit_TextUI_Command::main()
#3 {main}
thrown in C:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php on line 102
Sicuramente c'è da configurare qualcosa da qualche parte, ma non trovo risposte.
Ciao
Roberto
Page 1 of 1
[OT] Problema nell'esecuzione di tutti i test
#2
Posted 08 August 2011 - 09:10 AM
Devi rinominare tutti i file che sono nella cartella "unit" con il suffisso xxxxxxTest.php e dopo puoi eseguire tutti i test con il comando:
Ciao!
phpunit unit
Ciao!
#3
Posted 11 August 2011 - 02:39 AM
marcanuy, on 08 August 2011 - 09:10 AM, said:
Devi rinominare tutti i file che sono nella cartella "unit" con il suffisso xxxxxxTest.php e dopo puoi eseguire tutti i test con il comando:
Ciao!
phpunit unit
Ciao!
Sei un grande!
In effetti i nomi dei file erano già tutti così, solo che erano scritti con caratteri minuscoli.
E' stato sufficente utilizzare le iniziali maiuscole (CamelUpperCase) e tutto si è risolto!
Grazie ancora
Roberto
Share this topic:
Page 1 of 1

Help














