Skip to content

Commit

Permalink
pkp/pkp-lib#9899 added backup/restore for dao and container keys
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir committed Sep 27, 2024
1 parent 7920238 commit 43df5f3
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/jobs/statistics/CompileCounterSubmissionDailyMetricsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ class CompileCounterSubmissionDailyMetricsTest extends PKPTestCase
O:56:"APP\jobs\statistics\CompileCounterSubmissionDailyMetrics":3:{s:9:"\0*\0loadId";s:25:"usage_events_20240130.log";s:10:"connection";s:8:"database";s:5:"queue";s:5:"queue";}
END;

/**
* @see PKPTestCase::getMockedDAOs()
*/
protected function getMockedDAOs(): array
{
return [
...parent::getMockedDAOs(),
'TemporaryTotalsDAO',
'TemporaryItemInvestigationsDAO',
'TemporaryItemRequestsDAO',
];
}

/**
* Test job is a proper instance
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ class CompileCounterSubmissionInstitutionDailyMetricsTest extends PKPTestCase
O:67:"APP\jobs\statistics\CompileCounterSubmissionInstitutionDailyMetrics":3:{s:9:"\0*\0loadId";s:25:"usage_events_20240130.log";s:10:"connection";s:8:"database";s:5:"queue";s:5:"queue";}
END;

/**
* @see PKPTestCase::getMockedDAOs()
*/
protected function getMockedDAOs(): array
{
return [
...parent::getMockedDAOs(),
'TemporaryTotalsDAO',
'TemporaryItemInvestigationsDAO',
'TemporaryItemRequestsDAO',
];
}

/**
* Test job is a proper instance
*/
Expand Down
12 changes: 12 additions & 0 deletions tests/jobs/statistics/CompileSubmissionGeoDailyMetricsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ class CompileSubmissionGeoDailyMetricsTest extends PKPTestCase
O:52:"APP\jobs\statistics\CompileSubmissionGeoDailyMetrics":3:{s:9:"\0*\0loadId";s:25:"usage_events_20240130.log";s:10:"connection";s:8:"database";s:5:"queue";s:5:"queue";}
END;

/**
* @see PKPTestCase::getMockedDAOs()
*/
protected function getMockedDAOs(): array
{
return [
...parent::getMockedDAOs(),
'TemporaryTotalsDAO',
'TemporaryItemInvestigationsDAO',
];
}

/**
* Test job is a proper instance
*/
Expand Down
11 changes: 11 additions & 0 deletions tests/jobs/statistics/CompileUniqueInvestigationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ class CompileUniqueInvestigationsTest extends PKPTestCase
O:47:"APP\jobs\statistics\CompileUniqueInvestigations":3:{s:9:"\0*\0loadId";s:25:"usage_events_20240130.log";s:10:"connection";s:8:"database";s:5:"queue";s:5:"queue";}
END;

/**
* @see PKPTestCase::getMockedDAOs()
*/
protected function getMockedDAOs(): array
{
return [
...parent::getMockedDAOs(),
'TemporaryItemInvestigationsDAO',
];
}

/**
* Test job is a proper instance
*/
Expand Down
11 changes: 11 additions & 0 deletions tests/jobs/statistics/CompileUniqueRequestsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ class CompileUniqueRequestsTest extends PKPTestCase
O:41:"APP\jobs\statistics\CompileUniqueRequests":3:{s:9:"\0*\0loadId";s:25:"usage_events_20240130.log";s:10:"connection";s:8:"database";s:5:"queue";s:5:"queue";}
END;

/**
* @see PKPTestCase::getMockedDAOs()
*/
protected function getMockedDAOs(): array
{
return [
...parent::getMockedDAOs(),
'TemporaryItemRequestsDAO',
];
}

/**
* Test job is a proper instance
*/
Expand Down
14 changes: 14 additions & 0 deletions tests/jobs/statistics/DeleteUsageStatsTemporaryRecordsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ class DeleteUsageStatsTemporaryRecordsTest extends PKPTestCase
O:52:"APP\jobs\statistics\DeleteUsageStatsTemporaryRecords":3:{s:9:"\0*\0loadId";s:25:"usage_events_20240130.log";s:10:"connection";s:8:"database";s:5:"queue";s:5:"queue";}
END;

/**
* @see PKPTestCase::getMockedDAOs()
*/
protected function getMockedDAOs(): array
{
return [
...parent::getMockedDAOs(),
'TemporaryTotalsDAO',
'TemporaryItemInvestigationsDAO',
'TemporaryItemRequestsDAO',
'TemporaryInstitutionsDAO',
];
}

/**
* Test job is a proper instance
*/
Expand Down
14 changes: 14 additions & 0 deletions tests/jobs/statistics/ProcessUsageStatsLogFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ class ProcessUsageStatsLogFileTest extends PKPTestCase
*/
protected $dummyFileContent = '{"time":"2023-08-07 17:27:11","ip":"228dc4e5b6424e9dad52f21261cb2ab5f4651d9cb426d6fdb3d71d5ab8e2ae83","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko\/20100101 Firefox\/115.0","canonicalUrl":"http:\/\/ojs-stable-3_4_0.test\/index.php\/publicknowledge\/index","assocType":256,"contextId":1,"submissionId":null,"representationId":null,"submissionFileId":null,"fileType":null,"country":null,"region":null,"city":null,"institutionIds":[],"version":"3.4.0.0","issueId":null,"issueGalleyId":null}';

/**
* @see PKPTestCase::getMockedDAOs()
*/
protected function getMockedDAOs(): array
{
return [
...parent::getMockedDAOs(),
'TemporaryTotalsDAO',
'TemporaryItemInvestigationsDAO',
'TemporaryItemRequestsDAO',
'TemporaryInstitutionsDAO',
];
}

/**
* Test job is a proper instance
*/
Expand Down

0 comments on commit 43df5f3

Please sign in to comment.