Blame view

libs/XML_Feed_Parser-1.0.2/tests/XML_Feed_Parser_TestCase.php 827 Bytes
42868d70   andryeyev   Создал GIT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  <?php
  set_include_path('/Users/james/Projects/PEAR' . PATH_SEPARATOR . get_include_path());
  require_once 'PEAR/Config.php';
  require_once 'XML/Feed/Parser.php';
  require_once 'PHPUnit.php';
  
  abstract class XML_Feed_Parser_TestCase extends PHPUnit_Testcase {
      static function getSampleDir() {
          $config = new PEAR_Config;
          return $config->get('data_dir') . '/XML_Feed_Parser/samples';
      }
  }
  
  abstract class XML_Feed_Parser_Converted_TestCase extends XML_Feed_Parser_TestCase {
      function setup() {
          $this->fp_test_dir = XML_Feed_Parser_TestCase::getSampleDir() . 
              DIRECTORY_SEPARATOR . 'feedparsertests';
          if (! is_dir($fp_test_dir)) {
              throw new Exception('Feed parser tests must be unpacked into the folder ' . 
                  $this->fp_test_dir);
          }
      }
  }
  
  ?>