This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed non deletion of Commit validation comment
- Loading branch information
1 parent
c0ffe1b
commit e11575b
Showing
11 changed files
with
704 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
namespace tests\AppBundle\Comments; | ||
|
||
use Github\Api\Issue\Comments as KnpCommentApi; | ||
use AppBundle\Comments\CommentApiInterface; | ||
use Lpdigital\Github\Entity\PullRequest; | ||
use Twig_Environment; | ||
|
||
/** | ||
* Responsible of comments publication on repository. | ||
*/ | ||
class FakeCommentApi implements CommentApiInterface | ||
{ | ||
/** | ||
* @var KnpCommentApi | ||
*/ | ||
private $knpCommentApi; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $repositoryUsername; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $repositoryName; | ||
|
||
/** | ||
* @var Twig_Environment | ||
*/ | ||
private $twig; | ||
|
||
public function __construct(KnpCommentApi $knpCommentApi, $repositoryUsername, $repositoryName, Twig_Environment $twig) | ||
{ | ||
$this->knpCommentApi = $knpCommentApi; | ||
$this->repositoryUsername = $repositoryUsername; | ||
$this->repositoryName = $repositoryName; | ||
$this->twig = $twig; | ||
} | ||
|
||
public function send(PullRequest $pullRequest, $comment) | ||
{ | ||
return true; | ||
} | ||
|
||
public function sendWithTemplate(PullRequest $pullRequest, $templateName, $params) | ||
{ | ||
$comment = $this->twig->render($templateName, $params); | ||
|
||
return $comment; | ||
} | ||
|
||
public function remove($commentId) | ||
{ | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.