From af765ea3df7f7b69fb7396620cdd731f141d531d Mon Sep 17 00:00:00 2001 From: LinaKind Date: Fri, 13 Dec 2024 11:38:09 +0000 Subject: [PATCH] Specify a consistent behaviour for the serialisation of article vors and their snippets https://github.com/elifesciences/issues/issues/9034 --- test/Serializer/ArticleVoRNormalizerTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/Serializer/ArticleVoRNormalizerTest.php b/test/Serializer/ArticleVoRNormalizerTest.php index e8b6d377..d4715fe7 100644 --- a/test/Serializer/ArticleVoRNormalizerTest.php +++ b/test/Serializer/ArticleVoRNormalizerTest.php @@ -584,6 +584,7 @@ function ($test) { ->withDecisionLetter(promise_for(new ArticleSection(new ArraySequence([new Paragraph('Article 09560 decision letter text')]), '10.7554/eLife.09560decisionLetter', 'decision-letter-id'))) ->withDecisionLetterDescription(new ArraySequence([new Paragraph('Article 09560 decision letter description')])) ->withAuthorResponse(promise_for(new ArticleSection(new ArraySequence([new Paragraph('Article 09560 author response text')]), '10.7554/eLife.09560authorResponse', 'author-response-id'))) + ->withElifeAssessment(new ElifeAssessment(['landmark'], ['solid'])) ->withElifeAssessmentArticleSection(promise_for(new ArticleSection(new ArraySequence([new Paragraph('Article 09560 elife assessment text')]), '10.7554/eLife.09560elifeAssessment', 'elife-assessment-id'))) ->withElifeAssessmentTitle(promise_for('eLife assessment')) ->withElifeAssessmentScietyUri(promise_for('https://elife-assessment-09560.com')) @@ -654,6 +655,20 @@ function ($test) { 'curationLabels' => ['Landmark', 'Exceptional'], 'figuresPdf' => 'http://www.example.com/figures', 'impactStatement' => 'A new hominin species has been unearthed in the Dinaledi Chamber of the Rising Star cave system in the largest assemblage of a single species of hominins yet discovered in Africa.', + 'elifeAssessment' => [ + 'title' => 'eLife assessment', + 'content' => [ + [ + 'type' => 'paragraph', + 'text' => 'Article 09560 elife assessment text', + ], + ], + 'scietyUri' => 'https://elife-assessment-09560.com', + 'doi' => '10.7554/eLife.09560elifeAssessment', + 'id' => 'elife-assessment-id', + 'significance' => ['landmark'], + 'strength' => ['solid'], + ] ], function (ApiTestCase $test) { $test->mockArticleCall('09560', true, true, 1); @@ -717,6 +732,7 @@ function (ApiTestCase $test) { ], ]; unset($datasets['complete']); + unset($datasets['complete snippet']); return $datasets; }