Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Renamed function to get harvest source. #40

Open
wants to merge 1 commit into
base: harvest_dkan_integration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions dkan_harvest.migrate.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1113,13 +1113,6 @@ class HarvestMigration extends MigrateDKAN {
return $group_node;
}

/**
* Getter for harvest source. This is mainly used for unittests.
*/
public function getHarvestSource() {
return $this->dkanHarvestSource;
}

/**
* Getter for the $logID variable. Mainly used for the HarvestMigrateSQLMap
* class.
Expand Down
4 changes: 2 additions & 2 deletions test/phpunit/DkanHarvestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ public function test_dkan_harvest_get_migration() {
// Get first migration registration.
$harvest_test_source_local_dir = $sources['harvest_test_source_local_dir'];
$migration_harvest_test_source_local_dir = dkan_harvest_get_migration($harvest_test_source_local_dir);
$this->assertEquals($harvest_test_source_local_dir, $migration_harvest_test_source_local_dir->getHarvestSource());
$this->assertEquals($harvest_test_source_local_dir, $migration_harvest_test_source_local_dir->getSource());

// If we change the source (keeping the machine name) the migration should
// have the updated harvest source.
$harvest_test_source_local_dir->label = "This is an updated source";
$harvest_test_source_local_dir->uri = DRUPAL_ROOT . "/" . drupal_get_path('module',
'dkan_harvest') . "/test/phpunit/data/harvest_fictional_test_source/";
$migration_harvest_test_source_second = dkan_harvest_get_migration($harvest_test_source_local_dir);
$this->assertEquals($harvest_test_source_local_dir, $migration_harvest_test_source_second->getHarvestSource());
$this->assertEquals($harvest_test_source_local_dir, $migration_harvest_test_source_second->getSource());
}

/**
Expand Down