Ignore:
Timestamp:
Jul 17, 2011, 8:48:59 PM (14 years ago)
Author:
cla
Message:

rdfint

  • added code to unitest for RDF Test Cases

-- implemented _reIdentifyBlankNode() to unify blank nodes. This eliminates the problem that blank nodes get different identifiers, leading to comparison errors
-- added _writeErrorData to write source and result data if testcase fails (NOTE: data gets not cleaned up!!!)

  • testcases 'rdf-element-not-mandatory/test001' and 'rdfms-uri-substructure/test001' from RDFTESTCASES_FAIL to RDFTESTCASES
File:
1 edited

Legend:

Unmodified
Added
Removed
  • php/trunk/unittest/rdftestcases/unittest.php

    r56 r57  
    3838
    3939  protected function setUp() {
     40  }
     41
     42  // --------------------------------------------------------
     43
     44  private function _reIdentifyBlankNode( $data) {
     45    return preg_replace( '/_:[^ ]*/', '_:a', $data);
    4046  }
    4147
     
    8793    $this->assertEquals( ($result !== false), true);
    8894
     95    // rework blank node identifiers for coparison
     96    $source = $this->_reIdentifyBlankNode( $source);
     97    $result = $this->_reIdentifyBlankNode( $result);
     98
     99
    89100    // check if results are equal
    90101    $success = ($source == $result);
Note: See TracChangeset for help on using the changeset viewer.