Gandalf
Gandalf

Reputation: 13693

XMLdiff for php installation

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.

Upvotes: 2

Views: 1286

Answers (2)

Radek Simko
Radek Simko

Reputation: 16136

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).

Upvotes: 0

AndyPerlitch
AndyPerlitch

Reputation: 4729

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.

Upvotes: 1

Related Questions