diff --git a/modules/datastore/tests/src/Unit/Storage/DatabaseTableTest.php b/modules/datastore/tests/src/Unit/Storage/DatabaseTableTest.php index 0d41754895..d19e134680 100644 --- a/modules/datastore/tests/src/Unit/Storage/DatabaseTableTest.php +++ b/modules/datastore/tests/src/Unit/Storage/DatabaseTableTest.php @@ -293,7 +293,7 @@ public function testGetSummary() { /** * */ - public function testDestroy() { + public function testDestruct() { $connectionChain = $this->getConnectionChain(); $databaseTable = new DatabaseTable( diff --git a/modules/harvest/src/Service.php b/modules/harvest/src/Service.php index 503991e255..c8a9305f5f 100644 --- a/modules/harvest/src/Service.php +++ b/modules/harvest/src/Service.php @@ -142,14 +142,14 @@ public function deregisterHarvest(string $id) { /** * Public. * - * @todo the destroy method should be part of some interface. + * @todo the destruct method should be part of some interface. */ public function revertHarvest($id) { $run_store = $this->storeFactory->getInstance("harvest_{$id}_runs"); - if (!method_exists($run_store, "destroy")) { - throw new \Exception("Storage of class " . get_class($run_store) . " does not implement destroy method."); + if (!method_exists($run_store, "destruct")) { + throw new \Exception("Storage of class " . get_class($run_store) . " does not implement destruct method."); } - $run_store->destroy(); + $run_store->destruct(); $harvester = $this->getHarvester($id); return $harvester->revert(); } diff --git a/modules/harvest/tests/src/Unit/ServiceTest.php b/modules/harvest/tests/src/Unit/ServiceTest.php index b8df01f5fb..5c20204107 100644 --- a/modules/harvest/tests/src/Unit/ServiceTest.php +++ b/modules/harvest/tests/src/Unit/ServiceTest.php @@ -185,7 +185,7 @@ public function retrieveAll(): array { /** * */ - public function destroy() { + public function destruct() { $this->storage = []; }