Beginner: Setup Path For Phpunit ,xampp And Netbeans

Hi all,

I know this post already exist and I follow all suggestions in this forum and others forums but I still have phpunit not working in Netbeans and even through the Xampp shell.

here my environment :

  • xampp 1.7.7 with xampp control panel v3.1.0 (pear and phpunit are installed with xammp)I uninstalled phpunit and I installed it again but the error still happen

  • PHP Version 5.4.7

  • Netbeans 7.2.1

  • phpunit version 3.7.13

  • selenium version 1.2.11 (installed from netbeans and also from pear )

  • php.ini


; Windows: "\path1;\path2"

include_path = ".;C:\xampp\php\pear\PEAR"

In my xampp installastion folder I have in the folder C:\xampp\php\pear

a folder named PEAR and a PEAR.php file.

  • bootstrap.php I unclude yii framework in the path environment for netbeans



<?php


// change the following paths if necessary

$yiit=dirname(__FILE__).'path/to/yii/framework/yiit.php';

$config=dirname(__FILE__).'/../config/test.php';


require_once($yiit);

require_once(dirname(__FILE__).'/WebTestCase.php');


Yii::createWebApplication($config);




  • I create simple empty test for my model sensor.php just to get phpunit working



<?php

 

class SensorTest extends CDbTestCase

{

   

     

}

?>



If I run the test from netbeans or from xampp shell \i get always this error , also when I run the selenium test files from netbeans and xampp shell.

the same for functional test with the templates provided by selenium




no test executes ,Perhaps an error occurred, verify in Output window.







Warning: require_once(File/Iterator/Autoload.php): failed to open stream: No such file or directory in C:\xampp\php\pear\PHPUnit\Autoload.php on line 45


Call Stack:

    0.0002     124680   1. {main}() C:\xampp\php\phpunit:0

    0.0010     153248   2. require('C:\xampp\php\pear\PHPUnit\Autoload.php') C:\xampp\php\phpunit:43




Fatal error: require_once(): Failed opening required 'File/Iterator/Autoload.php' (include_path='.;C:\xampp\php\pear\PEAR') in C:\xampp\php\pear\PHPUnit\Autoload.php on line 45


Call Stack:

    0.0002     124680   1. {main}() C:\xampp\php\phpunit:0

    0.0010     153248   2. require('C:\xampp\php\pear\PHPUnit\Autoload.php') C:\xampp\php\phpunit:43




the x-debug session shows




define('PHPUnit_MAIN_METHOD', 'PHPUnit_TextUI_Command::main');




any comment or suggestions would be helpful

help please!

many thanks in advance

I switch to WAMP server and I installed pear, phpunit and it’s ok I can run some test

for Xampp server I don’t know the problem !