mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-12 19:16:49 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ede2f8795 | |||
| 013f386b49 | |||
| 2d5d7a034a | |||
| 2f210503cd | |||
| d2580184a4 | |||
| f31e565efd |
@@ -8,9 +8,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
upload:
|
upload:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: >
|
|
||||||
github.event.workflow_run.event == 'pull_request' &&
|
|
||||||
github.event.workflow_run.conclusion == 'success'
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
name: upload-coverage
|
name: upload-coverage
|
||||||
@@ -18,10 +15,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Setup logs directory
|
- name: Setup logs directory
|
||||||
run: mkdir -p build/coverage
|
run: mkdir -p build/coverage
|
||||||
|
|
||||||
- name: Download clover.xml artifact
|
- name: Download clover.xml artifact
|
||||||
uses: dawidd6/action-download-artifact@v7
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
workflow: tests.yml
|
|
||||||
name: clover.xml
|
name: clover.xml
|
||||||
path: build/coverage
|
path: build/coverage
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ class LocalPart extends PartParser
|
|||||||
|
|
||||||
public function parse(): Result
|
public function parse(): Result
|
||||||
{
|
{
|
||||||
$this->lexer->clearRecorded();
|
|
||||||
$this->lexer->startRecording();
|
$this->lexer->startRecording();
|
||||||
|
|
||||||
while (!$this->lexer->current->isA(EmailLexer::S_AT) && !$this->lexer->current->isA(EmailLexer::S_EMPTY)) {
|
while (!$this->lexer->current->isA(EmailLexer::S_AT) && !$this->lexer->current->isA(EmailLexer::S_EMPTY)) {
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ class NoDNSRecord implements Reason
|
|||||||
|
|
||||||
public function description() : string
|
public function description() : string
|
||||||
{
|
{
|
||||||
return 'No MX or A DNS record was found for this email';
|
return 'No MX or A DSN record was found for this email';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,18 +28,4 @@ class EmailParserTest extends TestCase
|
|||||||
$this->assertEquals($local, $parser->getLocalPart());
|
$this->assertEquals($local, $parser->getLocalPart());
|
||||||
$this->assertEquals($domain, $parser->getDomainPart());
|
$this->assertEquals($domain, $parser->getDomainPart());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMultipleEmailAddresses()
|
|
||||||
{
|
|
||||||
$parser = new EmailParser(new EmailLexer());
|
|
||||||
$parser->parse('some-local-part@some-random-but-large-domain-part.example.com');
|
|
||||||
|
|
||||||
$this->assertSame('some-local-part', $parser->getLocalPart());
|
|
||||||
$this->assertSame('some-random-but-large-domain-part.example.com', $parser->getDomainPart());
|
|
||||||
|
|
||||||
$parser->parse('another-local-part@another.example.com');
|
|
||||||
|
|
||||||
$this->assertSame('another-local-part', $parser->getLocalPart());
|
|
||||||
$this->assertSame('another.example.com', $parser->getDomainPart());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user