|
-
Dec 1st, 2009, 04:36 AM
#1
Thread Starter
Frenzied Member
PHPUnit Installation
I never needed to bother with PEAR, so that might be where my problem lies.
My setup: Win7, XAMPP (d:/Apps/xampp)
In my php.ini (D:\Apps\xampp\php) : include_path = ".;D:\Apps\xampp\php\PEAR"
Used the command line and:
pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit
After that I have D:\Apps\xampp\php\PEAR\PHPUnit (with Framework.php in there).
Created a php script starting with "require_once 'PHPUnit/Framework.php';" , however get the following error:
Warning: require_once(PHPUnit/Framework.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in D:\Repository\StackTest.php on line 3
Fatal error" require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'PHPUnit/Framework.php' (include_path='.;D:\Repository') in D:\Repository\StackTest.php on line 3
Any ideas? (for what it matter, I just got working with php scripts in eclipse, and I could run normal scripts without problems)
-
Dec 2nd, 2009, 12:27 AM
#2
Re: PHPUnit Installation
There's another php.ini file in xampp/apache/bin - make sure the include_path in there is set properly too.
Last edited by SambaNeko; Dec 2nd, 2009 at 01:50 AM.
Reason: Typo.
-
Dec 2nd, 2009, 02:57 AM
#3
Thread Starter
Frenzied Member
Re: PHPUnit Installation
Decided to go back and remove XAMPP. Installed Apache, MySQL, PHP and PhpMyadmin separately (currently swearing a lot, so it will work soon)
Thanks for the reply though. Appreciated, and can use it for the other developers that don't even know what is apache.
-
Dec 4th, 2009, 02:38 AM
#4
Thread Starter
Frenzied Member
Re: PHPUnit Installation
By the way, I realized that when you run PHP scripts in Eclipse, you have to set the project's "Include Path" (PHP Perspective->Right Click Project->Include Path->Configure Include Path->Libraries Tab-> Add External Source Folder) to the include path you have in your php.ini (which seems to get ignored by Eclipse.)
-
Dec 4th, 2009, 11:51 AM
#5
Re: PHPUnit Installation
I wasn't fond of Eclipse when I tried it out a few years ago...
-
Dec 4th, 2009, 11:41 PM
#6
Thread Starter
Frenzied Member
Re: PHPUnit Installation
Hmmm. I kind of felt that way too the first week or so. But as I was expected to use it, I just had to keep going.
Start liking it more and more (or maybe it's just a positive attitude for having a proper boss finally) discovering new things day after day (which is fun in a way)
Missing minor things one take for granted in most IDE's, but in a way it's like having visual studio team edition with ReSharper....and it's free.
-
Dec 5th, 2009, 02:26 AM
#7
Re: PHPUnit Installation
oh. I'm not a huge fan of IDEs. I use Notepad++.
-
Dec 5th, 2009, 06:50 PM
#8
Re: PHPUnit Installation
It didn't feel very intuitive to me - like you mentioned here: you have to set a special include_path, and you have to go through "PHP Perspective->Right Click Project->Include Path->Configure Include Path->Libraries Tab-> Add External Source Folder" to get to it? It seems convoluted to me. But I'm not big on IDEs in general I suppose. I just use Notepad2 and XAMPP for PHP development.
-
Aug 16th, 2011, 08:40 AM
#9
New Member
Re: PHPUnit Installation
Hello there, I know this is an old post, but I'm trying to install PHPUnit at work right now and am getting errors I can't find the solution to:
1st Method:
I installed on custom Apache installation, but when I run it, I get
Code:
Fatal error: require_once(): Failed opening required 'Text/Template.php' (include_path='D:\Program Files\PHP\PHPUnit;.;D:\Progra~1\PHP;D:\Progra~1;D:\Progra~1\PHP\PEAR;D:\Progra~1\PHP\PHPUnit;D:\Progra~1\PHP\PHPUnit\PHPUnit;') in D:\Program Files\PHP\PHPUnit\PHPUnit\Framework\TestCase.php on line 46
Why is it looking for 'Text/Template.php' in the core files, but it is not in the original installation ...
2nd Method:
I also installed WAMP server with PHPUnit but when I run that one, I get nothing at all ...

Any suggestions what simple thing am I doing wrong?
Thanx already.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|