2

I am trying to install xml diff ; https://github.com/mmacia/XMLdiff and i have not managed yet to make it work.Whenever i run any test example,i get

Fatal error: Interface 'PHPUnit_Framework_Test' not found in C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php on line 85

Has anyone managed to install and use the library.I am using xampp on windows.

Gandalf
  • 1
  • 29
  • 94
  • 165

2 Answers2

1

I believe your problem has to do with PHPUnit's Autoloader.php not being included. This file sets the php spl_autoloadspl_register function which is responsible for loading in interfaces and classes like PHPUnit_Framework_Test.

According to this SO question, you have to include the autoloader file manually. Without knowing more about your set-up and how that particular library works, I would say do something like this in the appropriate file(s):

// define phpunit path
if ( ! defined('PHPUNIT_PATH')) {
    // define an absolute path to your PHPUnit dir
    // CHECK THIS, i'm not good with php on windows:
    define('PHPUNIT_PATH','C:\xampp\php\PEAR\PHPUnit');
}

// Then include the autoloader like this:
include PHPUNIT_PATH.'Autoloader.php';

I hope this helps you or anyone else out.

Community
  • 1
  • 1
AndyPerlitch
  • 4,539
  • 5
  • 28
  • 43
0

Check execution flags for C:\xampp\php\PEAR\PHPUnit\Framework\Framework\Test.php

The file needs to be executable by the user who is launching tests (probably you).

Radek Simko
  • 15,886
  • 17
  • 69
  • 107