Skip to content

Commit 17bda49

Browse files
authored
Merge pull request #312 from dacastro4/codex/add-basic-unit-tests-and-setup-database
Add tests for GmailConnection and Mail classes
2 parents 67881f2 + 1d1e725 commit 17bda49

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

tests/MailTest.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,8 @@ protected function setUp(): void
2626
public function get_from_parses_name_and_email()
2727
{
2828
Storage::fake('local');
29-
$tokenRepo = new class implements TokenRepository
30-
{
31-
public function tokenExists(string $fileName): bool
32-
{
33-
return false;
34-
}
35-
36-
public function getToken(string $fileName, bool $allowJsonEncrypt): array
37-
{
38-
return [];
39-
}
40-
41-
public function storeToken(string $fileName, array $config, bool $allowJsonEncrypt): void {}
4229

43-
public function deleteToken(string $fileName, bool $allowJsonEncrypt): void {}
44-
};
45-
$mail = new Mail($tokenRepo);
30+
$mail = new Mail;
4631

4732
$header = new \Google_Service_Gmail_MessagePartHeader;
4833
$header->setName('From');

0 commit comments

Comments
 (0)