From 36cb6a020da3873aceb2d39aefa2e6b95c117017 Mon Sep 17 00:00:00 2001 From: Fenikkusu Date: Sat, 24 Dec 2016 17:07:25 +0700 Subject: [PATCH] Removing PHPUnit::execute Coverage Tags --- tests/PHPCensor/Helper/MailerFactoryTest.php | 6 --- tests/PHPCensor/Model/BuildTest.php | 12 ------ tests/PHPCensor/Model/ProjectTest.php | 21 ---------- tests/PHPCensor/Plugin/EmailTest.php | 39 ------------------- tests/PHPCensor/Service/BuildServiceTest.php | 15 ------- .../PHPCensor/Service/ProjectServiceTest.php | 16 -------- tests/PHPCensor/Service/UserServiceTest.php | 18 --------- 7 files changed, 127 deletions(-) diff --git a/tests/PHPCensor/Helper/MailerFactoryTest.php b/tests/PHPCensor/Helper/MailerFactoryTest.php index 384797d7..64f9e654 100644 --- a/tests/PHPCensor/Helper/MailerFactoryTest.php +++ b/tests/PHPCensor/Helper/MailerFactoryTest.php @@ -22,9 +22,6 @@ class MailerFactoryTest extends \PHPUnit_Framework_TestCase { } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestGetMailConfig() { $config = [ @@ -46,9 +43,6 @@ class MailerFactoryTest extends \PHPUnit_Framework_TestCase $this->assertEquals($config['default_mailto_address'], $factory->getMailConfig('default_mailto_address')); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestMailer() { $config = [ diff --git a/tests/PHPCensor/Model/BuildTest.php b/tests/PHPCensor/Model/BuildTest.php index bca938af..3fac5c90 100644 --- a/tests/PHPCensor/Model/BuildTest.php +++ b/tests/PHPCensor/Model/BuildTest.php @@ -24,9 +24,6 @@ class BuildTest extends \PHPUnit_Framework_TestCase { } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestIsAValidModel() { $build = new Build(); @@ -35,9 +32,6 @@ class BuildTest extends \PHPUnit_Framework_TestCase $this->assertTrue($build instanceof Model\Base\BuildBase); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestBaseBuildDefaults() { $build = new Build(); @@ -46,9 +40,6 @@ class BuildTest extends \PHPUnit_Framework_TestCase $this->assertEquals(null, $build->getFileLinkTemplate()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestIsSuccessful() { $build = new Build(); @@ -65,9 +56,6 @@ class BuildTest extends \PHPUnit_Framework_TestCase $this->assertTrue($build->isSuccessful()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestBuildExtra() { $info = [ diff --git a/tests/PHPCensor/Model/ProjectTest.php b/tests/PHPCensor/Model/ProjectTest.php index c4a6420d..d753526f 100644 --- a/tests/PHPCensor/Model/ProjectTest.php +++ b/tests/PHPCensor/Model/ProjectTest.php @@ -24,9 +24,6 @@ class ProjectTest extends \PHPUnit_Framework_TestCase { } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestIsAValidModel() { $project = new Project(); @@ -35,9 +32,6 @@ class ProjectTest extends \PHPUnit_Framework_TestCase $this->assertTrue($project instanceof Model\Base\ProjectBase); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestGitDefaultBranch() { $project = new Project(); @@ -46,9 +40,6 @@ class ProjectTest extends \PHPUnit_Framework_TestCase $this->assertEquals('master', $project->getBranch()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestGithubDefaultBranch() { $project = new Project(); @@ -57,9 +48,6 @@ class ProjectTest extends \PHPUnit_Framework_TestCase $this->assertEquals('master', $project->getBranch()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestGitlabDefaultBranch() { $project = new Project(); @@ -68,9 +56,6 @@ class ProjectTest extends \PHPUnit_Framework_TestCase $this->assertEquals('master', $project->getBranch()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestBitbucketDefaultBranch() { $project = new Project(); @@ -79,9 +64,6 @@ class ProjectTest extends \PHPUnit_Framework_TestCase $this->assertEquals('master', $project->getBranch()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestMercurialDefaultBranch() { $project = new Project(); @@ -90,9 +72,6 @@ class ProjectTest extends \PHPUnit_Framework_TestCase $this->assertEquals('default', $project->getBranch()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_TestProjectAccessInformation() { $info = [ diff --git a/tests/PHPCensor/Plugin/EmailTest.php b/tests/PHPCensor/Plugin/EmailTest.php index 9efb3bb8..0cfbf298 100644 --- a/tests/PHPCensor/Plugin/EmailTest.php +++ b/tests/PHPCensor/Plugin/EmailTest.php @@ -166,9 +166,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase })); } - /** - * @covers PHPUnit::execute - */ public function testReturnsFalseWithoutArgs() { $this->loadEmailPluginWithOptions(); @@ -181,9 +178,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expectedReturn, $returnValue); } - /** - * @covers PHPUnit::execute - */ public function testBuildsBasicEmails() { $this->loadEmailPluginWithOptions(['addresses' => ['test-receiver@example.com']], Build::STATUS_SUCCESS); @@ -193,9 +187,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertContains('test-receiver@example.com', $this->message['to']); } - /** - * @covers PHPUnit::execute - */ public function testBuildsDefaultEmails() { $this->loadEmailPluginWithOptions(['default_mailto_address' => 'default-mailto-address@example.com'], Build::STATUS_SUCCESS); @@ -205,9 +196,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertContains('default-mailto-address@example.com', $this->message['to']); } - /** - * @covers PHPUnit::execute - */ public function testExecute_UniqueRecipientsFromWithCommitter() { $this->loadEmailPluginWithOptions(['addresses' => ['test-receiver@example.com', 'test-receiver2@example.com']]); @@ -221,9 +209,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertContains('test-receiver2@example.com', $this->message['to']); } - /** - * @covers PHPUnit::execute - */ public function testExecute_UniqueRecipientsWithCommitter() { $this->loadEmailPluginWithOptions([ @@ -238,9 +223,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertContains('committer@test.com', $this->message['to']); } - /** - * @covers PHPUnit::execute - */ public function testCcDefaultEmails() { $this->loadEmailPluginWithOptions( @@ -267,9 +249,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase ); } - /** - * @covers PHPUnit::execute - */ public function testBuildsCommitterEmails() { $this->loadEmailPluginWithOptions( @@ -284,9 +263,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertContains('committer-email@example.com', $this->message['to']); } - /** - * @covers PHPUnit::execute - */ public function testMailSuccessfulBuildHaveProjectName() { $this->loadEmailPluginWithOptions( @@ -302,9 +278,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertContains('Test-Project', $this->message['body']); } - /** - * @covers PHPUnit::execute - */ public function testMailFailingBuildHaveProjectName() { $this->loadEmailPluginWithOptions( @@ -320,9 +293,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertContains('Test-Project', $this->message['body']); } - /** - * @covers PHPUnit::execute - */ public function testMailSuccessfulBuildHaveStatus() { $this->loadEmailPluginWithOptions( @@ -338,9 +308,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertContains('successful', $this->message['body']); } - /** - * @covers PHPUnit::execute - */ public function testMailFailingBuildHaveStatus() { $this->loadEmailPluginWithOptions( @@ -356,9 +323,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertContains('failed', $this->message['body']); } - /** - * @covers PHPUnit::execute - */ public function testMailDeliverySuccess() { $this->loadEmailPluginWithOptions( @@ -374,9 +338,6 @@ class EmailTest extends \PHPUnit_Framework_TestCase $this->assertEquals(true, $returnValue); } - /** - * @covers PHPUnit::execute - */ public function testMailDeliveryFail() { $this->loadEmailPluginWithOptions( diff --git a/tests/PHPCensor/Service/BuildServiceTest.php b/tests/PHPCensor/Service/BuildServiceTest.php index 5e9d13b7..66bc9cb8 100644 --- a/tests/PHPCensor/Service/BuildServiceTest.php +++ b/tests/PHPCensor/Service/BuildServiceTest.php @@ -41,9 +41,6 @@ class BuildServiceTest extends \PHPUnit_Framework_TestCase $this->testedService = new BuildService($this->mockBuildStore); } - /** - * @covers PHPUnit::execute - */ public function testExecute_CreateBasicBuild() { $project = new Project(); @@ -65,9 +62,6 @@ class BuildServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals('Manual', $returnValue->getCommitId()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_CreateBuildWithOptions() { $project = new Project(); @@ -82,9 +76,6 @@ class BuildServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals('test@example.com', $returnValue->getCommitterEmail()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_CreateBuildWithExtra() { $project = new Project(); @@ -96,9 +87,6 @@ class BuildServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals(1001, $returnValue->getExtra('item1')); } - /** - * @covers PHPUnit::execute - */ public function testExecute_CreateDuplicateBuild() { $build = new Build(); @@ -131,9 +119,6 @@ class BuildServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals($build->getExtra('item1'), $returnValue->getExtra('item1')); } - /** - * @covers PHPUnit::execute - */ public function testExecute_DeleteBuild() { $store = $this->getMock('PHPCensor\Store\BuildStore'); diff --git a/tests/PHPCensor/Service/ProjectServiceTest.php b/tests/PHPCensor/Service/ProjectServiceTest.php index 4e88f65a..9899c059 100644 --- a/tests/PHPCensor/Service/ProjectServiceTest.php +++ b/tests/PHPCensor/Service/ProjectServiceTest.php @@ -41,9 +41,6 @@ class ProjectServiceTest extends \PHPUnit_Framework_TestCase $this->testedService = new ProjectService($this->mockProjectStore); } - /** - * @covers PHPUnit::execute - */ public function testExecute_CreateBasicProject() { $returnValue = $this->testedService->createProject('Test Project', 'github', 'block8/phpci'); @@ -54,9 +51,6 @@ class ProjectServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals('master', $returnValue->getBranch()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_CreateProjectWithOptions() { $options = array( @@ -78,7 +72,6 @@ class ProjectServiceTest extends \PHPUnit_Framework_TestCase /** * @link https://github.com/Block8/PHPCI/issues/484 - * @covers PHPUnit::execute */ public function testExecute_CreateGitlabProjectWithoutPort() { @@ -90,9 +83,6 @@ class ProjectServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals('block8/phpci', $returnValue->getReference()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_UpdateExistingProject() { $project = new Project(); @@ -107,9 +97,6 @@ class ProjectServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals('bitbucket', $returnValue->getType()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_EmptyPublicStatus() { $project = new Project(); @@ -126,9 +113,6 @@ class ProjectServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals(0, $returnValue->getAllowPublicStatus()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_DeleteProject() { $store = $this->getMock('PHPCensor\Store\ProjectStore'); diff --git a/tests/PHPCensor/Service/UserServiceTest.php b/tests/PHPCensor/Service/UserServiceTest.php index b526de92..4051933c 100644 --- a/tests/PHPCensor/Service/UserServiceTest.php +++ b/tests/PHPCensor/Service/UserServiceTest.php @@ -40,9 +40,6 @@ class UserServiceTest extends \PHPUnit_Framework_TestCase $this->testedService = new UserService($this->mockUserStore); } - /** - * @covers PHPUnit::execute - */ public function testExecute_CreateNonAdminUser() { $user = $this->testedService->createUser('Test', 'test@example.com', 'testing', 0); @@ -53,18 +50,12 @@ class UserServiceTest extends \PHPUnit_Framework_TestCase $this->assertTrue(password_verify('testing', $user->getHash())); } - /** - * @covers PHPUnit::execute - */ public function testExecute_CreateAdminUser() { $user = $this->testedService->createUser('Test', 'test@example.com', 'testing', 1); $this->assertEquals(1, $user->getIsAdmin()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_RevokeAdminStatus() { $user = new User(); @@ -76,9 +67,6 @@ class UserServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals(0, $user->getIsAdmin()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_GrantAdminStatus() { $user = new User(); @@ -90,9 +78,6 @@ class UserServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals(1, $user->getIsAdmin()); } - /** - * @covers PHPUnit::execute - */ public function testExecute_ChangesPasswordIfNotEmpty() { $user = new User(); @@ -103,9 +88,6 @@ class UserServiceTest extends \PHPUnit_Framework_TestCase $this->assertTrue(password_verify('newpassword', $user->getHash())); } - /** - * @covers PHPUnit::execute - */ public function testExecute_DoesNotChangePasswordIfEmpty() { $user = new User();