PHPUnit is giving me an error message whenever I try to include a file. For example the follwing code gives me the error:
<?php
include_once "PHPUnit/Autoload.php";
require_once "controller/ProductController.php";
class SecurityTests extends PHPUnit_Framework_TestCase
{
public function testSmth() {
$this->assertTrue(1==1);
}
}
?>
But if I remove the fourth line (require_once "controller/ProductController.php";
), it runs fine.
The error I get is:
Warning: require_once(PHPUnit/Framework/Error.php): failed to open stream: No such file or directory in E:\wamp\bin\php\php5.4.3\pear\PHPUnit\Util\ErrorHandler.php on line 48
EDIT: My include_path in the php.ini file is:
include_path = ".;E:\wamp\bin\php\php5.4.3\pear\;E:\wamp\www\renting\"
What is strange:
<?php
echo get_include_path(); **// Will echo .;E:\wamp\bin\php\php5.4.3\pear\;E:\wamp\www\renting\**
require_once 'PHPUnit/Autoload.php';
require_once 'controller/AccountController.php';
echo get_include_path(); **// Will echo E:/wamp/www/renting/**
And also:
<?php
require_once 'controller/AccountController.php';
echo get_include_path(); **// Will echo E:/wamp/www/renting/**
require_once 'PHPUnit/Autoload.php';
echo get_include_path(); **// Will not even echo.**
This is very strange to me.
Any ideas?