Skip to content
Permalink
Browse files

rename bitbucket plugin result to bitbucket notify plugin result

  • Loading branch information...
EugenGanshorn committed May 3, 2019
1 parent c31ac96 commit 263b5c3c82e613c7e4064c286dbe78455be52c86
@@ -7,7 +7,7 @@
use PHPCensor\Database;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
use PHPCensor\Plugin\Util\BitbucketPluginResult;
use PHPCensor\Plugin\Util\BitbucketNotifyPluginResult;
use PHPCensor\Store\BuildErrorStore;
use PHPCensor\Store\BuildStore;
use PHPCensor\Store\Factory;
@@ -241,7 +241,7 @@ protected function updateBuild()
/**
* @param string $targetBranch
* @return BitbucketPluginResult[]
* @return BitbucketNotifyPluginResult[]
* @throws \Exception
*/
protected function prepareResult($targetBranch)
@@ -266,7 +266,7 @@ protected function prepareResult($targetBranch)
$result = [];
foreach ($plugins as $plugin) {
$result[] = new BitbucketPluginResult(
$result[] = new BitbucketNotifyPluginResult(
$plugin,
isset($targetBranchBuildStats[$plugin]) ? $targetBranchBuildStats[$plugin] : 0,
isset($currentBranchBuildStats[$plugin]) ? $currentBranchBuildStats[$plugin] : 0
@@ -277,7 +277,7 @@ protected function prepareResult($targetBranch)
}
/**
* @param Util\BitbucketPluginResult[] $plugins
* @param Util\BitbucketNotifyPluginResult[] $plugins
* @return array
*/
protected function buildResultComparator(array $plugins)
@@ -2,7 +2,7 @@
namespace PHPCensor\Plugin\Util;
class BitbucketPluginResult
class BitbucketNotifyPluginResult
{
/** @var string $plugin */
protected $plugin;
@@ -4,7 +4,7 @@
use PHPUnit\Framework\TestCase;
class BitbucketPluginResultTest extends TestCase
class BitbucketNotifyPluginResultTest extends TestCase
{
public function dataProvider()
{
@@ -58,7 +58,7 @@ public function dataProvider()
*/
public function testIsUnchanged(array $input, array $expected)
{
$sut = new BitbucketPluginResult($input[0], $input[1], $input[2]);
$sut = new BitbucketNotifyPluginResult($input[0], $input[1], $input[2]);
$this->assertEquals($expected['unchanged'], $sut->isUnchanged());
}
@@ -70,7 +70,7 @@ public function testIsUnchanged(array $input, array $expected)
*/
public function testIsImproved(array $input, array $expected)
{
$sut = new BitbucketPluginResult($input[0], $input[1], $input[2]);
$sut = new BitbucketNotifyPluginResult($input[0], $input[1], $input[2]);
$this->assertEquals($expected['improved'], $sut->isImproved());
}
@@ -81,7 +81,7 @@ public function testIsImproved(array $input, array $expected)
*/
public function testIsDegraded(array $input, array $expected)
{
$sut = new BitbucketPluginResult($input[0], $input[1], $input[2]);
$sut = new BitbucketNotifyPluginResult($input[0], $input[1], $input[2]);
$this->assertEquals($expected['degraded'], $sut->isDegraded());
}
@@ -92,7 +92,7 @@ public function testIsDegraded(array $input, array $expected)
*/
public function test__toString(array $input, array $expected)
{
$sut = new BitbucketPluginResult($input[0], $input[1], $input[2]);
$sut = new BitbucketNotifyPluginResult($input[0], $input[1], $input[2]);
$this->assertEquals($expected['string'], $sut->__toString());
}
@@ -103,7 +103,7 @@ public function test__toString(array $input, array $expected)
*/
public function testGenerateFormatedOutput(array $input, array $expected)
{
$sut = new BitbucketPluginResult($input[0], $input[1], $input[2]);
$sut = new BitbucketNotifyPluginResult($input[0], $input[1], $input[2]);
$this->assertSame($expected['formattedOutput'], $sut->generateFormatedOutput(10));
}
@@ -114,7 +114,7 @@ public function testGenerateFormatedOutput(array $input, array $expected)
*/
public function testGenerateTaskDescription(array $input, array $expected)
{
$sut = new BitbucketPluginResult($input[0], $input[1], $input[2]);
$sut = new BitbucketNotifyPluginResult($input[0], $input[1], $input[2]);
$this->assertSame($expected['taskDescription'], $sut->generateTaskDescription());
}
}

0 comments on commit 263b5c3

Please sign in to comment.
You can’t perform that action at this time.