Changeset 58 for php/trunk/unittest/rdftestcases/unittest.php
- Timestamp:
- Jul 18, 2011, 1:15:46 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
php/trunk/unittest/rdftestcases/unittest.php
r57 r58 42 42 // -------------------------------------------------------- 43 43 44 private function _reIdentifyBlankNode( $data) { 45 return preg_replace( '/_:[^ ]*/', '_:a', $data); 44 private function _refineResult( $data) { 45 // replace all blank nodes by one ID 46 // NOTE: thi sis not accurate, but not much better 47 // possible without access to the triple data 48 $data = preg_replace( '/_:[^ ]*/', '_:a', $data); 49 50 // sort the data 51 $adata = explode( "\n", $data); 52 sort( &$adata); 53 $data = implode( "\n", $adata); 54 55 return $data; 46 56 } 47 57 … … 93 103 $this->assertEquals( ($result !== false), true); 94 104 95 // re work blank node identifiers for coparison96 $source = $this->_reIdentifyBlankNode( $source);97 $ result = $this->_reIdentifyBlankNode( $result);98 105 // resolve problems with blnak node identifiers 106 // and different sorting of triples 107 $source = $this->_refineResult( $source); 108 $result = $this->_refineResult( $result); 99 109 100 110 // check if results are equal
Note:
See TracChangeset
for help on using the changeset viewer.