| 1 |
lars |
1 |
<?php
|
|
|
2 |
require_once 'PEAR/Config.php';
|
|
|
3 |
require_once 'XML/Feed/Parser.php';
|
|
|
4 |
require_once 'PHPUnit/Framework/TestCase.php';
|
|
|
5 |
|
|
|
6 |
abstract class XML_Feed_Parser_TestCase extends PHPUnit_Framework_TestCase {
|
|
|
7 |
|
|
|
8 |
protected $backupGlobals = FALSE;
|
|
|
9 |
|
|
|
10 |
static function getSampleDir() {
|
|
|
11 |
$config = new PEAR_Config;
|
|
|
12 |
return dirname(__FILE__) . '/../samples';
|
|
|
13 |
// return $config->get('data_dir') . '/XML_Feed_Parser/samples';
|
|
|
14 |
}
|
|
|
15 |
}
|
|
|
16 |
|
|
|
17 |
abstract class XML_Feed_Parser_Converted_TestCase extends XML_Feed_Parser_TestCase {
|
|
|
18 |
|
|
|
19 |
function setup() {
|
|
|
20 |
$this->fp_test_dir = XML_Feed_Parser_TestCase::getSampleDir() .
|
|
|
21 |
DIRECTORY_SEPARATOR . 'feedparsertests';
|
|
|
22 |
if (! is_dir($this->fp_test_dir)) {
|
|
|
23 |
$this->markTestSkipped('Feed parser tests (http://code.google.com/p/feedparser/downloads/list) must be unpacked into the folder ' .
|
|
|
24 |
$this->fp_test_dir);
|
|
|
25 |
}
|
|
|
26 |
}
|
|
|
27 |
}
|
|
|
28 |
?>
|