diff --git a/src/Services/EmailService.php b/src/Services/EmailService.php new file mode 100644 index 00000000..f05bfcfe --- /dev/null +++ b/src/Services/EmailService.php @@ -0,0 +1,14 @@ +setExpectedException(\DomainException::class); + $emailService->validateEmail('ghost'); + } + + public function testEmailWithoutDotInDomain() + { + $emailService = new \Szurubooru\Services\EmailService(); + + $this->setExpectedException(\DomainException::class); + $emailService->validateEmail('ghost@cemetery'); + } + + public function testValidEmail() + { + $emailService = new \Szurubooru\Services\EmailService(); + + $this->assertNull($emailService->validateEmail('ghost@cemetery.consulting')); + } +}