Skip to content

Commit

Permalink
Test statistics collections by the "bugs" plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
aik099 committed Jun 17, 2024
1 parent e5509d4 commit 6b0328c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/SVNBuddy/Repository/RevisionLog/Plugin/BugsPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function testProcessLastRevisionUpdated()
$this->assertLastRevision(100);

$this->assertTableEmpty('CommitBugs');
$this->assertStatistics(array());
}

public function testProcessEmptyProject()
Expand All @@ -83,6 +84,7 @@ public function testProcessEmptyProject()
$this->plugin->process(0, 100);

$this->assertTableEmpty('CommitBugs');
$this->assertStatistics(array());
$this->assertTableContent(
'Projects',
array(
Expand Down Expand Up @@ -120,6 +122,7 @@ public function testProcessProjectWithUnknownStructure()
$this->plugin->process(0, 100);

$this->assertTableEmpty('CommitBugs');
$this->assertStatistics(array());
$this->assertTableContent(
'Projects',
array(
Expand Down Expand Up @@ -167,6 +170,7 @@ public function testProcessDetectsMissingBugRegexps($project_deleted)
$this->plugin->process(0, 200);

$this->assertTableEmpty('CommitBugs');
$this->assertStatistics(array());
$this->assertTableContent(
'Projects',
array(
Expand Down Expand Up @@ -214,6 +218,7 @@ public function testBugRegexpsRefresh($project_deleted)
$this->plugin->process(0, 200);

$this->assertTableEmpty('CommitBugs');
$this->assertStatistics(array());
$this->assertTableContent(
'Projects',
array(
Expand Down Expand Up @@ -296,6 +301,7 @@ public function testProcessCommitWithoutBugs()
$this->plugin->process(0, 100);

$this->assertTableEmpty('CommitBugs');
$this->assertStatistics(array());
}

public function testProcessCommitWithTwoProjects()
Expand Down Expand Up @@ -336,6 +342,9 @@ public function testProcessCommitWithTwoProjects()
),
)
);
$this->assertStatistics(array(
BugsPlugin::STATISTIC_BUG_ADDED_TO_COMMIT => 2,
));
}

public function testProcessCommitFromProjectWithoutBugTracking()
Expand Down Expand Up @@ -375,6 +384,9 @@ public function testProcessCommitFromProjectWithoutBugTracking()
),
)
);
$this->assertStatistics(array(
BugsPlugin::STATISTIC_BUG_ADDED_TO_COMMIT => 2,
));
}

public function testProcessMultipleCommitsSameBug()
Expand Down Expand Up @@ -414,6 +426,9 @@ public function testProcessMultipleCommitsSameBug()
),
)
);
$this->assertStatistics(array(
BugsPlugin::STATISTIC_BUG_ADDED_TO_COMMIT => 2,
));
}

public function testFindNoMatch()
Expand Down

0 comments on commit 6b0328c

Please sign in to comment.