Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-12-14 03:18:07 +0300
committerGitHub <noreply@github.com>2020-12-14 03:18:07 +0300
commit8f980c43988efd77dfbb15f48d64e6f987d45555 (patch)
treec9d051350d32e6b11dd0aef0f040605b853e956f /plugins/SegmentEditor/tests
parent3b528814c649f701c882c98096917ec3b9c382c3 (diff)
fix some tests exception handling (#16932)
Diffstat (limited to 'plugins/SegmentEditor/tests')
-rw-r--r--plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php23
1 files changed, 2 insertions, 21 deletions
diff --git a/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php b/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php
index 95ed3c12bb..d6b594280d 100644
--- a/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php
+++ b/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php
@@ -43,9 +43,6 @@ class SegmentEditorTest extends IntegrationTestCase
APISitesManager::getInstance()->addSite('test', 'http://example.org');
}
- /**
- * @group Plugins
- */
public function testAddInvalidSegment_ShouldThrow()
{
$this->expectException(\Exception::class);
@@ -57,9 +54,6 @@ class SegmentEditorTest extends IntegrationTestCase
$this->fail("Exception not raised.");
}
- /**
- * @group Plugins
- */
public function test_AddAndGet_SimpleSegment()
{
$name = 'name';
@@ -83,9 +77,6 @@ class SegmentEditorTest extends IntegrationTestCase
$this->assertEquals($segment, $expected);
}
- /**
- * @group Plugins
- */
public function test_AddAndGet_AnotherSegment()
{
Rules::setBrowserTriggerArchiving(false);
@@ -118,21 +109,14 @@ class SegmentEditorTest extends IntegrationTestCase
$this->assertEquals($segments, array($expected));
// There is no segment to process for a non existing site
- try {
- $model->getSegmentsToAutoArchive(33);
- $this->fail();
- } catch(Exception $e) {
- // expected
- }
+ $segments = $model->getSegmentsToAutoArchive(33);
+ $this->assertEquals($segments, array());
// There is no segment to process across all sites
$segments = $model->getSegmentsToAutoArchive($idSite = false);
$this->assertEquals($segments, array());
}
- /**
- * @group Plugins
- */
public function test_UpdateSegment()
{
Rules::setBrowserTriggerArchiving(false);
@@ -176,9 +160,6 @@ class SegmentEditorTest extends IntegrationTestCase
$this->assertEquals($newSegment['name'], $nameSegment1);
}
- /**
- * @group Plugins
- */
public function test_deleteSegment()
{
Rules::setBrowserTriggerArchiving(false);