From 6213da5285515bf0baf38f9b07f0332f3783c15d Mon Sep 17 00:00:00 2001 From: j3nsch Date: Mon, 13 Dec 2021 09:59:22 +0100 Subject: [PATCH 1/2] #476 Isolate test from date rounding in DB --- .../Application/Update/SetStatusOfExistingDoiTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/library/Application/Update/SetStatusOfExistingDoiTest.php b/tests/library/Application/Update/SetStatusOfExistingDoiTest.php index d3a27c0212..4b80add375 100644 --- a/tests/library/Application/Update/SetStatusOfExistingDoiTest.php +++ b/tests/library/Application/Update/SetStatusOfExistingDoiTest.php @@ -40,8 +40,6 @@ class Application_Update_SetStatusOfExistingDoiTest extends ControllerTestCase * @throws Opus_Model_Exception * * TODO test sets Status of all DOI identifier of published documents to 'registered' (side effect) - * TODO this test has failed once (date got modified or compare didn't work) on Travis and worked in the next run - * without changes - Why? */ public function testRunDoesNotModifyServerDateModified() { @@ -55,6 +53,9 @@ public function testRunDoesNotModifyServerDateModified() $doc->addIdentifier($doi); $docId = $doc->store(); + // ServerDateModified wird manchmal gerundet beim Speichern = deshalb muss das Dokument noch mal geladen werden + // TODO https://github.com/OPUS4/framework/issues/228 + $doc = Document::get($docId); $modified = $doc->getServerDateModified(); sleep(2); From f490335b78ca6aeb9c3d7c2046688b85e7482899 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Mon, 13 Dec 2021 10:30:34 +0100 Subject: [PATCH 2/2] #476 Fixed name of class (old framework used) --- tests/library/Application/Update/SetStatusOfExistingDoiTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/library/Application/Update/SetStatusOfExistingDoiTest.php b/tests/library/Application/Update/SetStatusOfExistingDoiTest.php index 4b80add375..adda5d4109 100644 --- a/tests/library/Application/Update/SetStatusOfExistingDoiTest.php +++ b/tests/library/Application/Update/SetStatusOfExistingDoiTest.php @@ -55,7 +55,7 @@ public function testRunDoesNotModifyServerDateModified() // ServerDateModified wird manchmal gerundet beim Speichern = deshalb muss das Dokument noch mal geladen werden // TODO https://github.com/OPUS4/framework/issues/228 - $doc = Document::get($docId); + $doc = new Opus_Document($docId); $modified = $doc->getServerDateModified(); sleep(2);