diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 433b7d7..b7eb019 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -30,8 +30,8 @@ jobs: - name: "PHPStan" run: composer phpstan - #- name: "PHP-CS-Fixer" - # run: composer cs-fix + - name: "PHP-CS-Fixer" + run: composer cs-fix #- name: "Psalm" # run: composer psalm diff --git a/Tests/Parser/WebhookResolverTest.php b/Tests/Parser/WebhookResolverTest.php deleted file mode 100644 index a5b4677..0000000 --- a/Tests/Parser/WebhookResolverTest.php +++ /dev/null @@ -1,254 +0,0 @@ -resolver = new WebhookResolver(); - $this->jsonDataFolder = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'json-data'.DIRECTORY_SEPARATOR; - } - - public function tearDown(): void - { - $this->resolver = null; - } - - public function testResolveIssuesEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'issue_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\IssuesEvent", $event); - - $this->assertEquals('opened', $event->action); - $this->assertEquals('Spelling error in the README file', $event->issue->getTitle()); - $this->assertEquals('35129377', $event->repository->getId()); - } - - public function testResolveIssueCommitEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'issue_commit_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\IssueCommentEvent", $event); - - $this->assertEquals('Spelling error in the README file', $event->issue->getTitle()); - $this->assertEquals('baxterthehacker', $event->user->getLogin()); - $this->assertEquals("You are totally right! I'll get this fixed right away.", $event->comment->getBody()); - } - - public function testResolveForkEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'fork_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\ForkEvent", $event); - - $this->assertEquals('baxterandthehackers/public-repo', $event->forkedRepository->getFullName()); - $this->assertEquals('7649605', $event->owner->getId()); - $this->assertEquals('https://api.github.com/repos/baxterthehacker/public-repo', $event->repository->getUrl()); - } - - public function testResolveDeploymentStatusEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'deployment_status_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\DeploymentStatusEvent", $event); - - $this->assertEquals('production', $event->deployment->getEnvironment()); - $this->assertEquals('public-repo', $event->repository->getName()); - $this->assertEquals('User', $event->sender->getType()); - } - - public function testResolvePullRequestEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'pull_request_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\PullRequestEvent", $event); - - $this->assertEquals('Update the README with new information', $event->pullRequest->getTitle()); - $this->assertEquals('opened', $event->action); - $this->assertEquals('1', $event->number); - $this->assertEquals('baxterthehacker', $event->sender->getLogin()); - $this->assertInstanceOf('LoveOSS\Github\Entity\Repository', $event->repository); - } - - public function testResolveStatusEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'status_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\StatusEvent", $event); - - $this->assertEquals('baxterthehacker', $event->committer->getLogin()); - $this->assertEquals('public-repo', $event->repository->getName()); - $this->assertEquals('success', $event->state); - $this->assertEquals('9049f1265b7d61be4a8904a9a27120d2064dab3b', $event->sha); - } - - public function testResolveReleaseEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'release_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\ReleaseEvent", $event); - - $this->assertInstanceOf("LoveOSS\Github\Entity\Release", $event->release); - $this->assertEquals('published', $event->action); - $this->assertEquals('https://api.github.com/repos/baxterthehacker/public-repo/releases/1261438', $event->release->getUrl()); - $this->assertEquals('https://github.com/baxterthehacker/public-repo/releases/tag/0.0.1', $event->release->getHtmlUrl()); - } - - public function testResolveWatchEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'watch_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\WatchEvent", $event); - $this->assertInstanceOf("LoveOSS\Github\Entity\Repository", $event->repository); - $this->assertInstanceOf("LoveOSS\Github\Entity\User", $event->user); - - $this->assertEquals('started', $event->action); - } - - public function testResolvePullRequestReviewCommentEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'pull_request_review_comment_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\PullRequestReviewCommentEvent", $event); - $this->assertInstanceOf("LoveOSS\Github\Entity\Repository", $event->repository); - $this->assertInstanceOf("LoveOSS\Github\Entity\User", $event->sender); - $this->assertInstanceOf("LoveOSS\Github\Entity\Comment", $event->comment); - } - - public function testResolveGollumEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'gollum_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\GollumEvent", $event); - $this->assertInstanceOf("LoveOSS\Github\Entity\Repository", $event->repository); - $this->assertInstanceOf("LoveOSS\Github\Entity\User", $event->sender); - $this->assertIsArray($event->pages); - $this->assertCount(2, $event->pages); - - $this->assertInstanceOf("LoveOSS\Github\Entity\Page", current($event->pages)); - $this->assertInstanceOf("LoveOSS\Github\Entity\Page", next($event->pages)); - - $this->assertEquals('Home', $event->pages[0]->getTitle()); - $this->assertEquals('Home2', $event->pages[1]->getTitle()); - } - - public function testPushEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'push_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\PushEvent", $event); - } - - public function testResolvePullRequestEventCommitsOk() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'pull_request_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\PullRequestEvent", $event); - $pullRequest = $event->pullRequest; - - $this->assertInstanceOf("LoveOSS\Github\Entity\PullRequest", $pullRequest); - - $commits = $pullRequest->getCommits(); - $this->assertTrue(is_array($commits)); - $commit = $commits[0]; - $this->assertInstanceOf("LoveOSS\Github\Entity\Commit", $commit); - } - - public function testResolvePullRequestHasIntegration() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'pull_request_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\Entity\Integration", $event->integration); - } - - public function testResolvePullRequestEventCommitThrowsException() - { - ini_set('user_agent', ''); - $this->expectException('LoveOSS\Github\Exception\UserAgentNotFoundException'); - - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'pull_request_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - $event->pullRequest->getCommits(); - } - - public function testResolveWithMissingRepositoryThrowsException() - { - $this->expectException('LoveOSS\Github\Exception\RepositoryNotFoundException'); - - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'repository_not_found.json'), true); - $this->resolver->resolve($jsonReceived); - } - - public function testResolveWithMalformedRepositoryThrowsException() - { - $this->expectException('LoveOSS\Github\Exception\RepositoryNotFoundException'); - - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'repository_malformed.json'), true); - $this->resolver->resolve($jsonReceived); - } - - public function testResolveIntegrationInstallationEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'integration_installation_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\IntegrationInstallationEvent", $event); - $this->assertInstanceOf("LoveOSS\Github\Entity\Integration", $event->integration); - $this->assertInstanceOf("LoveOSS\Github\Entity\User", $event->sender); - - $this->assertIsString($event->integration->getAccessTokenUrl()); - $this->assertIsString($event->integration->getRepositoriesUrl()); - } - - public function testResolveIntegrationInstallationRepositoriesEvent() - { - $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder.'integration_installation_repositories_event.json'), true); - $event = $this->resolver->resolve($jsonReceived); - - $this->assertInstanceOf("LoveOSS\Github\EventType\IntegrationInstallationRepositoriesEvent", $event); - $this->assertInstanceOf("LoveOSS\Github\Entity\Integration", $event->integration); - $this->assertInstanceOf("LoveOSS\Github\Entity\User", $event->sender); - $this->assertIsString($event->repositorySelection); - $this->assertIsArray($event->repositoryAdded); - $this->assertIsArray($event->repositoryRemoved); - - $this->assertIsString($event->integration->getAccessTokenUrl()); - $this->assertIsString($event->integration->getRepositoriesUrl()); - $this->assertIsString($event->integration->getHtmlUrl()); - } -} diff --git a/src/Entity/Comment.php b/src/Entity/Comment.php index 4a7d502..d8fc781 100644 --- a/src/Entity/Comment.php +++ b/src/Entity/Comment.php @@ -1,7 +1,5 @@ $data */ - public static function createFromData(array $data) : self + public static function createFromData(array $data): self { return new static($data); } @@ -55,62 +50,62 @@ final public function __construct($data) $this->body = isset($data['body']) ? $data['body'] : ''; } - public function getUrl() : string + public function getUrl(): string { return $this->url; } - public function getHtmlUrl() : string + public function getHtmlUrl(): string { return $this->htmlUrl; } - public function getId() : string + public function getId(): string { return $this->id; } - public function getUser() : User + public function getUser(): User { return $this->user; } - public function getUserLogin() : string + public function getUserLogin(): string { return $this->user->getLogin(); } - public function getPosition() : string + public function getPosition(): string { return $this->position; } - public function getLine() : string + public function getLine(): string { return $this->line; } - public function getPath() : string + public function getPath(): string { return $this->path; } - public function getCommitId() : string + public function getCommitId(): string { return $this->commitId; } - public function getCreatedAt() : string + public function getCreatedAt(): string { return $this->createdAt; } - public function getUpdatedAt() : string + public function getUpdatedAt(): string { return $this->updatedAt; } - public function getBody() : string + public function getBody(): string { return $this->body; } @@ -120,7 +115,7 @@ public function getBody() : string * * @return string the comment */ - public function __toString() : string + public function __toString(): string { return $this->body; } diff --git a/src/Entity/Commit.php b/src/Entity/Commit.php index c1a4cd4..bc48296 100644 --- a/src/Entity/Commit.php +++ b/src/Entity/Commit.php @@ -1,7 +1,5 @@ name.' ('.$this->email.')'; + return $this->name . ' (' . $this->email . ')'; } } diff --git a/src/Entity/Deployment.php b/src/Entity/Deployment.php index 93ac051..decadf5 100644 --- a/src/Entity/Deployment.php +++ b/src/Entity/Deployment.php @@ -1,7 +1,5 @@ [ 'method' => 'GET', 'header' => [ - 'User-Agent: '. $userAgent - ] - ] + 'User-Agent: ' . $userAgent, + ], + ], ]; $context = stream_context_create($opts); diff --git a/src/Entity/Release.php b/src/Entity/Release.php index cffa9bb..0fa60cb 100644 --- a/src/Entity/Release.php +++ b/src/Entity/Release.php @@ -1,7 +1,5 @@ $data */ - public static function createFromData(array $data) : self + public static function createFromData(array $data): self { if (isset($data['login'], $data['id'])) { return new static($data); diff --git a/src/EventType/AbstractEventType.php b/src/EventType/AbstractEventType.php index 7150c51..6b7ad7a 100644 --- a/src/EventType/AbstractEventType.php +++ b/src/EventType/AbstractEventType.php @@ -1,7 +1,5 @@ resolver = new WebhookResolver(); + $this->jsonDataFolder = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'json-data' . DIRECTORY_SEPARATOR; + } + + public function tearDown(): void + { + $this->resolver = null; + } + + public function testResolveIssuesEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'issue_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\IssuesEvent", $event); + + self::assertEquals('opened', $event->action); + self::assertEquals('Spelling error in the README file', $event->issue->getTitle()); + self::assertEquals('35129377', $event->repository->getId()); + } + + public function testResolveIssueCommitEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'issue_commit_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\IssueCommentEvent", $event); + + self::assertEquals('Spelling error in the README file', $event->issue->getTitle()); + self::assertEquals('baxterthehacker', $event->user->getLogin()); + self::assertEquals("You are totally right! I'll get this fixed right away.", $event->comment->getBody()); + } + + public function testResolveForkEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'fork_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\ForkEvent", $event); + + self::assertEquals('baxterandthehackers/public-repo', $event->forkedRepository->getFullName()); + self::assertEquals('7649605', $event->owner->getId()); + self::assertEquals('https://api.github.com/repos/baxterthehacker/public-repo', $event->repository->getUrl()); + } + + public function testResolveDeploymentStatusEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'deployment_status_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\DeploymentStatusEvent", $event); + + self::assertEquals('production', $event->deployment->getEnvironment()); + self::assertEquals('public-repo', $event->repository->getName()); + self::assertEquals('User', $event->sender->getType()); + } + + public function testResolvePullRequestEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'pull_request_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\PullRequestEvent", $event); + + self::assertEquals('Update the README with new information', $event->pullRequest->getTitle()); + self::assertEquals('opened', $event->action); + self::assertEquals('1', $event->number); + self::assertEquals('baxterthehacker', $event->sender->getLogin()); + self::assertInstanceOf('LoveOSS\Github\Entity\Repository', $event->repository); + } + + public function testResolveStatusEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'status_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\StatusEvent", $event); + + self::assertEquals('baxterthehacker', $event->committer->getLogin()); + self::assertEquals('public-repo', $event->repository->getName()); + self::assertEquals('success', $event->state); + self::assertEquals('9049f1265b7d61be4a8904a9a27120d2064dab3b', $event->sha); + } + + public function testResolveReleaseEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'release_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\ReleaseEvent", $event); + + self::assertInstanceOf("LoveOSS\Github\Entity\Release", $event->release); + self::assertEquals('published', $event->action); + self::assertEquals('https://api.github.com/repos/baxterthehacker/public-repo/releases/1261438', $event->release->getUrl()); + self::assertEquals('https://github.com/baxterthehacker/public-repo/releases/tag/0.0.1', $event->release->getHtmlUrl()); + } + + public function testResolveWatchEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'watch_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\WatchEvent", $event); + self::assertInstanceOf("LoveOSS\Github\Entity\Repository", $event->repository); + self::assertInstanceOf("LoveOSS\Github\Entity\User", $event->user); + + self::assertEquals('started', $event->action); + } + + public function testResolvePullRequestReviewCommentEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'pull_request_review_comment_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\PullRequestReviewCommentEvent", $event); + self::assertInstanceOf("LoveOSS\Github\Entity\Repository", $event->repository); + self::assertInstanceOf("LoveOSS\Github\Entity\User", $event->sender); + self::assertInstanceOf("LoveOSS\Github\Entity\Comment", $event->comment); + } + + public function testResolveGollumEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'gollum_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\GollumEvent", $event); + self::assertInstanceOf("LoveOSS\Github\Entity\Repository", $event->repository); + self::assertInstanceOf("LoveOSS\Github\Entity\User", $event->sender); + self::assertIsArray($event->pages); + self::assertCount(2, $event->pages); + + self::assertInstanceOf("LoveOSS\Github\Entity\Page", current($event->pages)); + self::assertInstanceOf("LoveOSS\Github\Entity\Page", next($event->pages)); + + self::assertEquals('Home', $event->pages[0]->getTitle()); + self::assertEquals('Home2', $event->pages[1]->getTitle()); + } + + public function testPushEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'push_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\PushEvent", $event); + } + + public function testResolvePullRequestEventCommitsOk() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'pull_request_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\PullRequestEvent", $event); + $pullRequest = $event->pullRequest; + + self::assertInstanceOf("LoveOSS\Github\Entity\PullRequest", $pullRequest); + + $commits = $pullRequest->getCommits(); + self::assertTrue(is_array($commits)); + $commit = $commits[0]; + self::assertInstanceOf("LoveOSS\Github\Entity\Commit", $commit); + } + + public function testResolvePullRequestHasIntegration() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'pull_request_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\Entity\Integration", $event->integration); + } + + public function testResolvePullRequestEventCommitThrowsException() + { + ini_set('user_agent', ''); + $this->expectException('LoveOSS\Github\Exception\UserAgentNotFoundException'); + + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'pull_request_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + $event->pullRequest->getCommits(); + } + + public function testResolveWithMissingRepositoryThrowsException() + { + $this->expectException('LoveOSS\Github\Exception\RepositoryNotFoundException'); + + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'repository_not_found.json'), true); + $this->resolver->resolve($jsonReceived); + } + + public function testResolveWithMalformedRepositoryThrowsException() + { + $this->expectException('LoveOSS\Github\Exception\RepositoryNotFoundException'); + + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'repository_malformed.json'), true); + $this->resolver->resolve($jsonReceived); + } + + public function testResolveIntegrationInstallationEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'integration_installation_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\IntegrationInstallationEvent", $event); + self::assertInstanceOf("LoveOSS\Github\Entity\Integration", $event->integration); + self::assertInstanceOf("LoveOSS\Github\Entity\User", $event->sender); + + self::assertIsString($event->integration->getAccessTokenUrl()); + self::assertIsString($event->integration->getRepositoriesUrl()); + } + + public function testResolveIntegrationInstallationRepositoriesEvent() + { + $jsonReceived = json_decode(file_get_contents($this->jsonDataFolder . 'integration_installation_repositories_event.json'), true); + $event = $this->resolver->resolve($jsonReceived); + + self::assertInstanceOf("LoveOSS\Github\EventType\IntegrationInstallationRepositoriesEvent", $event); + self::assertInstanceOf("LoveOSS\Github\Entity\Integration", $event->integration); + self::assertInstanceOf("LoveOSS\Github\Entity\User", $event->sender); + self::assertIsString($event->repositorySelection); + self::assertIsArray($event->repositoryAdded); + self::assertIsArray($event->repositoryRemoved); + + self::assertIsString($event->integration->getAccessTokenUrl()); + self::assertIsString($event->integration->getRepositoriesUrl()); + self::assertIsString($event->integration->getHtmlUrl()); + } +} diff --git a/Tests/json-data/commits.json b/tests/json-data/commits.json similarity index 100% rename from Tests/json-data/commits.json rename to tests/json-data/commits.json diff --git a/Tests/json-data/deployment_status_event.json b/tests/json-data/deployment_status_event.json similarity index 100% rename from Tests/json-data/deployment_status_event.json rename to tests/json-data/deployment_status_event.json diff --git a/Tests/json-data/fork_event.json b/tests/json-data/fork_event.json similarity index 100% rename from Tests/json-data/fork_event.json rename to tests/json-data/fork_event.json diff --git a/Tests/json-data/gollum_event.json b/tests/json-data/gollum_event.json similarity index 100% rename from Tests/json-data/gollum_event.json rename to tests/json-data/gollum_event.json diff --git a/Tests/json-data/integration_installation_event.json b/tests/json-data/integration_installation_event.json similarity index 100% rename from Tests/json-data/integration_installation_event.json rename to tests/json-data/integration_installation_event.json diff --git a/Tests/json-data/integration_installation_repositories_event.json b/tests/json-data/integration_installation_repositories_event.json similarity index 100% rename from Tests/json-data/integration_installation_repositories_event.json rename to tests/json-data/integration_installation_repositories_event.json diff --git a/Tests/json-data/issue_commit_event.json b/tests/json-data/issue_commit_event.json similarity index 100% rename from Tests/json-data/issue_commit_event.json rename to tests/json-data/issue_commit_event.json diff --git a/Tests/json-data/issue_event.json b/tests/json-data/issue_event.json similarity index 100% rename from Tests/json-data/issue_event.json rename to tests/json-data/issue_event.json diff --git a/Tests/json-data/pull_request_event.json b/tests/json-data/pull_request_event.json similarity index 100% rename from Tests/json-data/pull_request_event.json rename to tests/json-data/pull_request_event.json diff --git a/Tests/json-data/pull_request_review_comment_event.json b/tests/json-data/pull_request_review_comment_event.json similarity index 100% rename from Tests/json-data/pull_request_review_comment_event.json rename to tests/json-data/pull_request_review_comment_event.json diff --git a/Tests/json-data/push_event.json b/tests/json-data/push_event.json similarity index 100% rename from Tests/json-data/push_event.json rename to tests/json-data/push_event.json diff --git a/Tests/json-data/release_event.json b/tests/json-data/release_event.json similarity index 100% rename from Tests/json-data/release_event.json rename to tests/json-data/release_event.json diff --git a/Tests/json-data/repository_malformed.json b/tests/json-data/repository_malformed.json similarity index 100% rename from Tests/json-data/repository_malformed.json rename to tests/json-data/repository_malformed.json diff --git a/Tests/json-data/repository_not_found.json b/tests/json-data/repository_not_found.json similarity index 100% rename from Tests/json-data/repository_not_found.json rename to tests/json-data/repository_not_found.json diff --git a/Tests/json-data/status_event.json b/tests/json-data/status_event.json similarity index 100% rename from Tests/json-data/status_event.json rename to tests/json-data/status_event.json diff --git a/Tests/json-data/watch_event.json b/tests/json-data/watch_event.json similarity index 100% rename from Tests/json-data/watch_event.json rename to tests/json-data/watch_event.json