From 509ac2f1085e74c6a44253248f9f2fc3ac54d337 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Sun, 20 May 2018 21:14:10 +0200 Subject: Improve and split tests (#12822) * Speed up some tests by not using IntegrationTestCase * fix test * split system tests into plugin & core * adjust travis submodule * Move Annotations system test to plugin * Move Transitions system test to plugin * fix tests * move PurgeDataTest to PrivacyManager plugin * Move some tests to Goal plugin * fix test * submodule update * Move tests to ecommerce plugin * adds a caching to prevent some duplicate api calls --- .../Annotations/tests/System/AnnotationsTest.php | 289 +++++++++++++++++++++ .../expected/test_annotations__Annotations.get.xml | 11 + .../test_annotations__Annotations.getAll_day.xml | 13 + .../test_annotations__Annotations.getAll_month.xml | 85 ++++++ .../test_annotations__Annotations.getAll_week.xml | 21 ++ .../test_annotations__Annotations.getAll_year.xml | 133 ++++++++++ ..._Annotations.getAnnotationCountForDates_day.xml | 12 + ...nnotations.getAnnotationCountForDates_month.xml | 12 + ...Annotations.getAnnotationCountForDates_week.xml | 12 + ...Annotations.getAnnotationCountForDates_year.xml | 12 + ..._annotations_lastN__Annotations.getAll_week.xml | 85 ++++++ ...Annotations.getAnnotationCountForDates_week.xml | 47 ++++ ...ons_multipleSites__Annotations.getAll_month.xml | 135 ++++++++++ ...nnotations.getAnnotationCountForDates_month.xml | 21 ++ ...annotations_range__Annotations.getAll_range.xml | 69 +++++ ...nnotations.getAnnotationCountForDates_range.xml | 229 ++++++++++++++++ 16 files changed, 1186 insertions(+) create mode 100644 plugins/Annotations/tests/System/AnnotationsTest.php create mode 100644 plugins/Annotations/tests/System/expected/test_annotations__Annotations.get.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_day.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_month.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_week.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_year.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_day.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_month.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_week.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_year.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations_lastN__Annotations.getAll_week.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations_lastN__Annotations.getAnnotationCountForDates_week.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations_multipleSites__Annotations.getAll_month.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations_multipleSites__Annotations.getAnnotationCountForDates_month.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations_range__Annotations.getAll_range.xml create mode 100644 plugins/Annotations/tests/System/expected/test_annotations_range__Annotations.getAnnotationCountForDates_range.xml (limited to 'plugins/Annotations') diff --git a/plugins/Annotations/tests/System/AnnotationsTest.php b/plugins/Annotations/tests/System/AnnotationsTest.php new file mode 100644 index 0000000000..d385d33426 --- /dev/null +++ b/plugins/Annotations/tests/System/AnnotationsTest.php @@ -0,0 +1,289 @@ +idSite1; + + return array( + + // get + array('Annotations.get', array('idSite' => $idSite1, + 'date' => '2012-01-01', + 'periods' => 'day', + 'otherRequestParameters' => array('idNote' => 1))), + + // getAll + array('Annotations.getAll', array('idSite' => $idSite1, + 'date' => '2011-12-01', + 'periods' => array('day', 'week', 'month'))), + array('Annotations.getAll', array('idSite' => $idSite1, + 'date' => '2012-01-01', + 'periods' => array('year'))), + array('Annotations.getAll', array('idSite' => $idSite1, + 'date' => '2012-03-01', + 'periods' => array('week'), + 'otherRequestParameters' => array('lastN' => 6), + 'testSuffix' => '_lastN')), + array('Annotations.getAll', array('idSite' => $idSite1, + 'date' => '2012-01-15,2012-02-15', + 'periods' => array('range'), + 'otherRequestParameters' => array('lastN' => 6), + 'testSuffix' => '_range')), + array('Annotations.getAll', array('idSite' => 'all', + 'date' => '2012-01-01', + 'periods' => array('month'), + 'testSuffix' => '_multipleSites')), + + // getAnnotationCountForDates + array('Annotations.getAnnotationCountForDates', array('idSite' => $idSite1, + 'date' => '2011-12-01', + 'periods' => array('day', 'week', 'month'))), + array('Annotations.getAnnotationCountForDates', array('idSite' => $idSite1, + 'date' => '2012-01-01', + 'periods' => array('year'))), + array('Annotations.getAnnotationCountForDates', array('idSite' => $idSite1, + 'date' => '2012-03-01', + 'periods' => array('week'), + 'otherRequestParameters' => array('lastN' => 6), + 'testSuffix' => '_lastN')), + array('Annotations.getAnnotationCountForDates', array('idSite' => $idSite1, + 'date' => '2012-01-15,2012-02-15', + 'periods' => array('range'), + 'otherRequestParameters' => array('lastN' => 6), + 'testSuffix' => '_range')), + array('Annotations.getAnnotationCountForDates', array('idSite' => 'all', + 'date' => '2012-01-01', + 'periods' => array('month'), + 'testSuffix' => '_multipleSites')), + ); + } + + /** + * @dataProvider getApiForTesting + */ + public function testApi($api, $params) + { + $this->runApiTests($api, $params); + } + + public function testAddMultipleSitesFail() + { + try { + API::getInstance()->add("1,2,3", "2012-01-01", "whatever"); + $this->fail("add should fail when given multiple sites in idSite"); + } catch (Exception $ex) { + // pass + } + } + + public function testAddInvalidDateFail() + { + try { + API::getInstance()->add(self::$fixture->idSite1, "invaliddate", "whatever"); + $this->fail("add should fail when given invalid date"); + } catch (Exception $ex) { + // pass + } + } + + public function testSaveMultipleSitesFail() + { + try { + API::getInstance()->save("1,2,3", 0); + $this->fail("save should fail when given multiple sites"); + } catch (Exception $ex) { + // pass + } + } + + public function testSaveInvalidDateFail() + { + try { + API::getInstance()->save(self::$fixture->idSite1, 0, "invaliddate"); + $this->fail("save should fail when given an invalid date"); + } catch (Exception $ex) { + // pass + } + } + + public function testSaveInvalidNoteIdFail() + { + try { + API::getInstance()->save(self::$fixture->idSite1, -1); + $this->fail("save should fail when given an invalid note id"); + } catch (Exception $ex) { + // pass + } + } + + public function testDeleteMultipleSitesFail() + { + try { + API::getInstance()->delete("1,2,3", 0); + $this->fail("delete should fail when given multiple site IDs"); + } catch (Exception $ex) { + // pass + } + } + + public function testDeleteInvalidNoteIdFail() + { + try { + API::getInstance()->delete(self::$fixture->idSite1, -1); + $this->fail("delete should fail when given an invalid site ID"); + } catch (Exception $ex) { + // pass + } + } + + public function testGetMultipleSitesFail() + { + try { + API::getInstance()->get("1,2,3", 0); + $this->fail("get should fail when given multiple site IDs"); + } catch (Exception $ex) { + // pass + } + } + + public function testGetInvalidNoteIdFail() + { + try { + API::getInstance()->get(self::$fixture->idSite1, -1); + $this->fail("get should fail when given an invalid note ID"); + } catch (Exception $ex) { + // pass + } + } + + public function testSaveSuccess() + { + API::getInstance()->save( + self::$fixture->idSite1, 0, $date = '2011-04-01', $note = 'new note text', $starred = 1); + + $expectedAnnotation = array( + 'date' => '2011-04-01', + 'note' => 'new note text', + 'starred' => 1, + 'user' => 'superUserLogin', + 'idNote' => 0, + 'canEditOrDelete' => true + ); + $this->assertEquals($expectedAnnotation, API::getInstance()->get(self::$fixture->idSite1, 0)); + } + + public function testSaveNoChangesSuccess() + { + API::getInstance()->save(self::$fixture->idSite1, 1); + + $expectedAnnotation = array( + 'date' => '2011-12-02', + 'note' => '1: Site 1 annotation for 2011-12-02', + 'starred' => 0, + 'user' => 'superUserLogin', + 'idNote' => 1, + 'canEditOrDelete' => true + ); + $this->assertEquals($expectedAnnotation, API::getInstance()->get(self::$fixture->idSite1, 1)); + } + + public function testDeleteSuccess() + { + API::getInstance()->delete(self::$fixture->idSite1, 1); + + try { + API::getInstance()->get(self::$fixture->idSite1, 1); + $this->fail("failed to delete annotation"); + } catch (Exception $ex) { + // pass + } + } + + public function getPermissionsFailData() + { + return array( + // getAll + array(false, false, "module=API&method=Annotations.getAll&idSite=1&date=2012-01-01&period=year", true, "getAll should throw if user does not have view access"), + + // get + array(false, false, "module=API&method=Annotations.get&idSite=1&idNote=0", true, "get should throw if user does not have view access"), + + // getAnnotationCountForDates + array(false, false, "module=API&method=Annotations.getAnnotationCountForDates&idSite=1&date=2012-01-01&period=year", true, "getAnnotationCountForDates should throw if user does not have view access"), + + // add + array(false, false, "module=API&method=Annotations.add&idSite=1&date=2011-02-01¬e=whatever", true, "add should throw if user does not have view access"), + array(false, true, "module=API&method=Annotations.add&idSite=1&date=2011-02-01¬e=whatever2", false, "add should not throw if user has view access"), + array(true, true, "module=API&method=Annotations.add&idSite=1&date=2011-02-01¬e=whatever3", false, "add should not throw if user has admin access"), + + // save + array(false, false, "module=API&method=Annotations.save&idSite=1&idNote=0&date=2011-03-01¬e=newnote", true, "save should throw if user does not have view access"), + array(false, true, "module=API&method=Annotations.save&idSite=1&idNote=0&date=2011-03-01¬e=newnote", true, "save should throw if user has view access but did not edit note"), + array(true, true, "module=API&method=Annotations.save&idSite=1&idNote=0&date=2011-03-01¬e=newnote", false, "save should not throw if user has admin access"), + + // delete + array(false, false, "module=API&method=Annotations.delete&idSite=1&idNote=0", true, "delete should throw if user does not have view access"), + array(false, true, "module=API&method=Annotations.delete&idSite=1&idNote=0", true, "delete should throw if user does not have view access"), + array(true, true, "module=API&method=Annotations.delete&idSite=1&idNote=0", false, "delete should not throw if user has admin access"), + ); + } + + /** + * @dataProvider getPermissionsFailData + */ + public function testMethodPermissions($hasAdminAccess, $hasViewAccess, $request, $checkException, $failMessage) + { + // create fake access that denies user access + FakeAccess::$superUser = false; + FakeAccess::$idSitesAdmin = $hasAdminAccess ? array(self::$fixture->idSite1) : array(); + FakeAccess::$idSitesView = $hasViewAccess ? array(self::$fixture->idSite1) : array(); + + if ($checkException) { + try { + $request = new Request($request); + $request->process(); + $this->fail($failMessage); + } catch (Exception $ex) { + // pass + } + } else { + $request = new Request($request); + $request->process(); + + } + } + + public static function getPathToTestDirectory() + { + return dirname(__FILE__); + } +} + +AnnotationsTest::$fixture = new TwoSitesWithAnnotations(); \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations__Annotations.get.xml b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.get.xml new file mode 100644 index 0000000000..8ac7b4520a --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.get.xml @@ -0,0 +1,11 @@ + + + + 2011-12-02 + 1: Site 1 annotation for 2011-12-02 + 0 + superUserLogin + 1 + 1 + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_day.xml b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_day.xml new file mode 100644 index 0000000000..c65b44912c --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_day.xml @@ -0,0 +1,13 @@ + + + + + 2011-12-01 + 0: Site 1 annotation for 2011-12-01 + 1 + superUserLogin + 0 + 1 + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_month.xml b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_month.xml new file mode 100644 index 0000000000..fa326bf6fd --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_month.xml @@ -0,0 +1,85 @@ + + + + + 2011-12-01 + 0: Site 1 annotation for 2011-12-01 + 1 + superUserLogin + 0 + 1 + + + 2011-12-02 + 1: Site 1 annotation for 2011-12-02 + 0 + superUserLogin + 1 + 1 + + + 2011-12-08 + 2: Site 1 annotation for 2011-12-08 + 0 + superUserLogin + 2 + 1 + + + 2011-12-09 + 3: Site 1 annotation for 2011-12-09 + 1 + superUserLogin + 3 + 1 + + + 2011-12-15 + 4: Site 1 annotation for 2011-12-15 + 0 + superUserLogin + 4 + 1 + + + 2011-12-16 + 5: Site 1 annotation for 2011-12-16 + 0 + superUserLogin + 5 + 1 + + + 2011-12-22 + 6: Site 1 annotation for 2011-12-22 + 1 + superUserLogin + 6 + 1 + + + 2011-12-23 + 7: Site 1 annotation for 2011-12-23 + 0 + superUserLogin + 7 + 1 + + + 2011-12-29 + 8: Site 1 annotation for 2011-12-29 + 0 + superUserLogin + 8 + 1 + + + 2011-12-30 + 9: Site 1 annotation for 2011-12-30 + 1 + superUserLogin + 9 + 1 + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_week.xml b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_week.xml new file mode 100644 index 0000000000..3d0078beac --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_week.xml @@ -0,0 +1,21 @@ + + + + + 2011-12-01 + 0: Site 1 annotation for 2011-12-01 + 1 + superUserLogin + 0 + 1 + + + 2011-12-02 + 1: Site 1 annotation for 2011-12-02 + 0 + superUserLogin + 1 + 1 + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_year.xml b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_year.xml new file mode 100644 index 0000000000..f2f2835d16 --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAll_year.xml @@ -0,0 +1,133 @@ + + + + + 2012-01-05 + 10: Site 1 annotation for 2012-01-05 + 0 + superUserLogin + 10 + 1 + + + 2012-01-06 + 11: Site 1 annotation for 2012-01-06 + 0 + superUserLogin + 11 + 1 + + + 2012-01-12 + 12: Site 1 annotation for 2012-01-12 + 1 + superUserLogin + 12 + 1 + + + 2012-01-13 + 13: Site 1 annotation for 2012-01-13 + 0 + superUserLogin + 13 + 1 + + + 2012-01-19 + 14: Site 1 annotation for 2012-01-19 + 0 + superUserLogin + 14 + 1 + + + 2012-01-20 + 15: Site 1 annotation for 2012-01-20 + 1 + superUserLogin + 15 + 1 + + + 2012-01-26 + 16: Site 1 annotation for 2012-01-26 + 0 + superUserLogin + 16 + 1 + + + 2012-01-27 + 17: Site 1 annotation for 2012-01-27 + 0 + superUserLogin + 17 + 1 + + + 2012-02-02 + 18: Site 1 annotation for 2012-02-02 + 1 + superUserLogin + 18 + 1 + + + 2012-02-03 + 19: Site 1 annotation for 2012-02-03 + 0 + superUserLogin + 19 + 1 + + + 2012-02-09 + 20: Site 1 annotation for 2012-02-09 + 0 + superUserLogin + 20 + 1 + + + 2012-02-10 + 21: Site 1 annotation for 2012-02-10 + 1 + superUserLogin + 21 + 1 + + + 2012-02-16 + 22: Site 1 annotation for 2012-02-16 + 0 + superUserLogin + 22 + 1 + + + 2012-02-17 + 23: Site 1 annotation for 2012-02-17 + 0 + superUserLogin + 23 + 1 + + + 2012-02-23 + 24: Site 1 annotation for 2012-02-23 + 1 + superUserLogin + 24 + 1 + + + 2012-02-24 + 25: Site 1 annotation for 2012-02-24 + 0 + superUserLogin + 25 + 1 + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_day.xml b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_day.xml new file mode 100644 index 0000000000..7409bdf738 --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_day.xml @@ -0,0 +1,12 @@ + + + + + 2011-12-01 + + 1 + 1 + + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_month.xml b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_month.xml new file mode 100644 index 0000000000..152be4e272 --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_month.xml @@ -0,0 +1,12 @@ + + + + + 2011-12-01 + + 10 + 4 + + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_week.xml b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_week.xml new file mode 100644 index 0000000000..d428059285 --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_week.xml @@ -0,0 +1,12 @@ + + + + + 2011-11-28 + + 2 + 1 + + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_year.xml b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_year.xml new file mode 100644 index 0000000000..3d501c35f1 --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations__Annotations.getAnnotationCountForDates_year.xml @@ -0,0 +1,12 @@ + + + + + 2012-01-01 + + 16 + 5 + + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations_lastN__Annotations.getAll_week.xml b/plugins/Annotations/tests/System/expected/test_annotations_lastN__Annotations.getAll_week.xml new file mode 100644 index 0000000000..d3aecc147b --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations_lastN__Annotations.getAll_week.xml @@ -0,0 +1,85 @@ + + + + + 2012-01-26 + 16: Site 1 annotation for 2012-01-26 + 0 + superUserLogin + 16 + 1 + + + 2012-01-27 + 17: Site 1 annotation for 2012-01-27 + 0 + superUserLogin + 17 + 1 + + + 2012-02-02 + 18: Site 1 annotation for 2012-02-02 + 1 + superUserLogin + 18 + 1 + + + 2012-02-03 + 19: Site 1 annotation for 2012-02-03 + 0 + superUserLogin + 19 + 1 + + + 2012-02-09 + 20: Site 1 annotation for 2012-02-09 + 0 + superUserLogin + 20 + 1 + + + 2012-02-10 + 21: Site 1 annotation for 2012-02-10 + 1 + superUserLogin + 21 + 1 + + + 2012-02-16 + 22: Site 1 annotation for 2012-02-16 + 0 + superUserLogin + 22 + 1 + + + 2012-02-17 + 23: Site 1 annotation for 2012-02-17 + 0 + superUserLogin + 23 + 1 + + + 2012-02-23 + 24: Site 1 annotation for 2012-02-23 + 1 + superUserLogin + 24 + 1 + + + 2012-02-24 + 25: Site 1 annotation for 2012-02-24 + 0 + superUserLogin + 25 + 1 + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations_lastN__Annotations.getAnnotationCountForDates_week.xml b/plugins/Annotations/tests/System/expected/test_annotations_lastN__Annotations.getAnnotationCountForDates_week.xml new file mode 100644 index 0000000000..2abbab5b3f --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations_lastN__Annotations.getAnnotationCountForDates_week.xml @@ -0,0 +1,47 @@ + + + + + 2012-01-23 + + 2 + 0 + + + + 2012-01-30 + + 2 + 1 + + + + 2012-02-06 + + 2 + 1 + + + + 2012-02-13 + + 2 + 0 + + + + 2012-02-20 + + 2 + 1 + + + + 2012-02-27 + + 0 + 0 + + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations_multipleSites__Annotations.getAll_month.xml b/plugins/Annotations/tests/System/expected/test_annotations_multipleSites__Annotations.getAll_month.xml new file mode 100644 index 0000000000..0d3c8ae176 --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations_multipleSites__Annotations.getAll_month.xml @@ -0,0 +1,135 @@ + + + + + 2012-01-05 + 10: Site 1 annotation for 2012-01-05 + 0 + superUserLogin + 10 + 1 + + + 2012-01-06 + 11: Site 1 annotation for 2012-01-06 + 0 + superUserLogin + 11 + 1 + + + 2012-01-12 + 12: Site 1 annotation for 2012-01-12 + 1 + superUserLogin + 12 + 1 + + + 2012-01-13 + 13: Site 1 annotation for 2012-01-13 + 0 + superUserLogin + 13 + 1 + + + 2012-01-19 + 14: Site 1 annotation for 2012-01-19 + 0 + superUserLogin + 14 + 1 + + + 2012-01-20 + 15: Site 1 annotation for 2012-01-20 + 1 + superUserLogin + 15 + 1 + + + 2012-01-26 + 16: Site 1 annotation for 2012-01-26 + 0 + superUserLogin + 16 + 1 + + + 2012-01-27 + 17: Site 1 annotation for 2012-01-27 + 0 + superUserLogin + 17 + 1 + + + + + 2012-01-05 + 10: Site 2 annotation for 2012-01-05 + 0 + superUserLogin + 10 + 1 + + + 2012-01-06 + 11: Site 2 annotation for 2012-01-06 + 0 + superUserLogin + 11 + 1 + + + 2012-01-12 + 12: Site 2 annotation for 2012-01-12 + 1 + superUserLogin + 12 + 1 + + + 2012-01-13 + 13: Site 2 annotation for 2012-01-13 + 0 + superUserLogin + 13 + 1 + + + 2012-01-19 + 14: Site 2 annotation for 2012-01-19 + 0 + superUserLogin + 14 + 1 + + + 2012-01-20 + 15: Site 2 annotation for 2012-01-20 + 1 + superUserLogin + 15 + 1 + + + 2012-01-26 + 16: Site 2 annotation for 2012-01-26 + 0 + superUserLogin + 16 + 1 + + + 2012-01-27 + 17: Site 2 annotation for 2012-01-27 + 0 + superUserLogin + 17 + 1 + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations_multipleSites__Annotations.getAnnotationCountForDates_month.xml b/plugins/Annotations/tests/System/expected/test_annotations_multipleSites__Annotations.getAnnotationCountForDates_month.xml new file mode 100644 index 0000000000..8549b62364 --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations_multipleSites__Annotations.getAnnotationCountForDates_month.xml @@ -0,0 +1,21 @@ + + + + + 2012-01-01 + + 8 + 2 + + + + + + 2012-01-01 + + 8 + 2 + + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations_range__Annotations.getAll_range.xml b/plugins/Annotations/tests/System/expected/test_annotations_range__Annotations.getAll_range.xml new file mode 100644 index 0000000000..2e351524dc --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations_range__Annotations.getAll_range.xml @@ -0,0 +1,69 @@ + + + + + 2012-01-19 + 14: Site 1 annotation for 2012-01-19 + 0 + superUserLogin + 14 + 1 + + + 2012-01-20 + 15: Site 1 annotation for 2012-01-20 + 1 + superUserLogin + 15 + 1 + + + 2012-01-26 + 16: Site 1 annotation for 2012-01-26 + 0 + superUserLogin + 16 + 1 + + + 2012-01-27 + 17: Site 1 annotation for 2012-01-27 + 0 + superUserLogin + 17 + 1 + + + 2012-02-02 + 18: Site 1 annotation for 2012-02-02 + 1 + superUserLogin + 18 + 1 + + + 2012-02-03 + 19: Site 1 annotation for 2012-02-03 + 0 + superUserLogin + 19 + 1 + + + 2012-02-09 + 20: Site 1 annotation for 2012-02-09 + 0 + superUserLogin + 20 + 1 + + + 2012-02-10 + 21: Site 1 annotation for 2012-02-10 + 1 + superUserLogin + 21 + 1 + + + \ No newline at end of file diff --git a/plugins/Annotations/tests/System/expected/test_annotations_range__Annotations.getAnnotationCountForDates_range.xml b/plugins/Annotations/tests/System/expected/test_annotations_range__Annotations.getAnnotationCountForDates_range.xml new file mode 100644 index 0000000000..77c83c9c84 --- /dev/null +++ b/plugins/Annotations/tests/System/expected/test_annotations_range__Annotations.getAnnotationCountForDates_range.xml @@ -0,0 +1,229 @@ + + + + + 2012-01-15 + + 0 + 0 + + + + 2012-01-16 + + 0 + 0 + + + + 2012-01-17 + + 0 + 0 + + + + 2012-01-18 + + 0 + 0 + + + + 2012-01-19 + + 1 + 0 + + + + 2012-01-20 + + 1 + 1 + + + + 2012-01-21 + + 0 + 0 + + + + 2012-01-22 + + 0 + 0 + + + + 2012-01-23 + + 0 + 0 + + + + 2012-01-24 + + 0 + 0 + + + + 2012-01-25 + + 0 + 0 + + + + 2012-01-26 + + 1 + 0 + + + + 2012-01-27 + + 1 + 0 + + + + 2012-01-28 + + 0 + 0 + + + + 2012-01-29 + + 0 + 0 + + + + 2012-01-30 + + 0 + 0 + + + + 2012-01-31 + + 0 + 0 + + + + 2012-02-01 + + 0 + 0 + + + + 2012-02-02 + + 1 + 1 + + + + 2012-02-03 + + 1 + 0 + + + + 2012-02-04 + + 0 + 0 + + + + 2012-02-05 + + 0 + 0 + + + + 2012-02-06 + + 0 + 0 + + + + 2012-02-07 + + 0 + 0 + + + + 2012-02-08 + + 0 + 0 + + + + 2012-02-09 + + 1 + 0 + + + + 2012-02-10 + + 1 + 1 + + + + 2012-02-11 + + 0 + 0 + + + + 2012-02-12 + + 0 + 0 + + + + 2012-02-13 + + 0 + 0 + + + + 2012-02-14 + + 0 + 0 + + + + 2012-02-15 + + 0 + 0 + + + + \ No newline at end of file -- cgit v1.2.3