Example #1
0
 public function testBagIt_parseBaseInfoStandard()
 {
     $lines = array('some: here', 'other: there');
     $info = BagIt_parseBagInfo($lines);
     $this->assertEquals('here', $info['some']);
     $this->assertEquals('there', $info['other']);
 }
Example #2
0
 /**
  * This reads the bag-info.txt file into an array dictionary.
  *
  * @return void
  */
 private function _readBagInfo()
 {
     try {
         $lines = readLines($this->bagInfoFile, $this->tagFileEncoding);
         $this->bagInfoData = BagIt_parseBagInfo($lines);
     } catch (Exception $exc) {
         array_push($this->bagErrors, array('baginfo', 'Error reading bag info file.'));
     }
 }