Yii Framework Forum: Beginner: Setup Path For Phpunit ,xampp And Netbeans - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Beginner: Setup Path For Phpunit ,xampp And Netbeans Rate Topic: -----

#1 User is offline   DonVito 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 10-December 12

Posted 19 January 2013 - 01:24 AM

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
0

#2 User is offline   DonVito 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 10-December 12

Posted 20 January 2013 - 09:47 PM

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 !
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users