Exemple #1
0
 public function testItemsShowPanel()
 {
     $this->_authenticateUser($this->_getDefaultUser());
     $orig = insert_item();
     $dup1 = insert_item();
     $dup2 = insert_item();
     $identifier = 'my-fake-id';
     $datestamp = '2011-07-24';
     $harvestId = 10000;
     foreach (array($orig, $dup1, $dup2) as $item) {
         $record = new OaipmhHarvester_Record();
         $record->setArray(array('identifier' => $identifier, 'item_id' => $item->id, 'datestamp' => $datestamp, 'harvest_id' => $harvestId));
         $record->save();
     }
     $this->dispatch('/items/show/' . $orig->id);
     $this->assertQuery('div#harvester-duplicates');
     $this->assertQueryCount('div#harvester-duplicates li', 2, "Should be 2 duplicates of this item.");
 }