Compare commits

..

4 Commits

Author SHA1 Message Date
Eduardo Gulias Davis c9be65c290 Different strategy 2024-12-31 16:22:03 +01:00
Eduardo Gulias Davis d164dab97f Polish 2024-12-31 16:18:02 +01:00
Eduardo Gulias Davis e67aa7abef Use different action 2024-12-31 16:02:17 +01:00
Eduardo Gulias Davis d3a88ef157 coverage path 2024-12-31 15:47:39 +01:00
4 changed files with 3 additions and 17 deletions
+2 -1
View File
@@ -18,10 +18,11 @@ jobs:
steps:
- name: Setup logs directory
run: mkdir -p build/coverage
- name: Download clover.xml artifact
uses: dawidd6/action-download-artifact@v7
with:
workflow: tests.yml
workflow: unit-tests
name: clover.xml
path: build/coverage
-1
View File
@@ -34,7 +34,6 @@ class LocalPart extends PartParser
public function parse(): Result
{
$this->lexer->clearRecorded();
$this->lexer->startRecording();
while (!$this->lexer->current->isA(EmailLexer::S_AT) && !$this->lexer->current->isA(EmailLexer::S_EMPTY)) {
+1 -1
View File
@@ -15,7 +15,7 @@ class DNSGetRecordWrapper
// A workaround to fix https://bugs.php.net/bug.php?id=73149
set_error_handler(
static function (int $errorLevel, string $errorMessage): never {
throw new \RuntimeException("Unable to get DNS record for the host: $errorMessage");
throw new \RuntimeException(sprintf('Unable to get DNS record for the host: %s', $errorMessage));
}
);
try {
-14
View File
@@ -28,18 +28,4 @@ class EmailParserTest extends TestCase
$this->assertEquals($local, $parser->getLocalPart());
$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());
}
}