mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-04 14:38:21 +00:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92dd169c32 | |||
| a6c8d7101b | |||
| 128cc721d7 | |||
| c26463ff92 | |||
| a09af2de87 | |||
| c802f106b3 | |||
| 709f21f927 | |||
| e68c26e065 | |||
| 8036f2bd05 | |||
| 0043eab0c5 | |||
| 0578b32b30 | |||
| 54859fabea | |||
| 135444003f | |||
| 9dde0df1e3 | |||
| 8790f59415 | |||
| 114b663f20 | |||
| a0e0fadfce | |||
| 74c0f07434 | |||
| ad1a0e9773 | |||
| aeb6851388 | |||
| a23fcc1315 | |||
| 1bec00a100 | |||
| 3abad65421 | |||
| 3fdfa261ad | |||
| 14ca3785c1 |
+9
-5
@@ -1,12 +1,17 @@
|
|||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- 5.5
|
- 5.5
|
||||||
- 5.6
|
- 5.6
|
||||||
- 7.0
|
- 7.0
|
||||||
- hhvm
|
- 7.1
|
||||||
|
- 7.2
|
||||||
|
- 7.3
|
||||||
|
- 7.4snapshot
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
@@ -26,9 +31,8 @@ install:
|
|||||||
- if [ "$deps" = "high" ]; then composer update; fi
|
- if [ "$deps" = "high" ]; then composer update; fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- mkdir -p build/logs
|
- mkdir -p build/logs
|
||||||
- phpunit --coverage-clover build/logs/clover.xml
|
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- php vendor/bin/coveralls
|
- php vendor/bin/coveralls
|
||||||
|
|
||||||
|
|||||||
@@ -67,8 +67,6 @@ class EmailLexer extends AbstractLexer
|
|||||||
"\n" => self::S_LF,
|
"\n" => self::S_LF,
|
||||||
"\r\n" => self::CRLF,
|
"\r\n" => self::CRLF,
|
||||||
'IPv6' => self::S_IPV6TAG,
|
'IPv6' => self::S_IPV6TAG,
|
||||||
'<' => self::S_LOWERTHAN,
|
|
||||||
'>' => self::S_GREATERTHAN,
|
|
||||||
'{' => self::S_OPENQBRACKET,
|
'{' => self::S_OPENQBRACKET,
|
||||||
'}' => self::S_CLOSEQBRACKET,
|
'}' => self::S_CLOSEQBRACKET,
|
||||||
'' => self::S_EMPTY,
|
'' => self::S_EMPTY,
|
||||||
@@ -79,10 +77,25 @@ class EmailLexer extends AbstractLexer
|
|||||||
|
|
||||||
protected $previous;
|
protected $previous;
|
||||||
|
|
||||||
|
private static $nullToken = [
|
||||||
|
'value' => '',
|
||||||
|
'type' => null,
|
||||||
|
'position' => 0,
|
||||||
|
];
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->previous = $this->token = self::$nullToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function reset()
|
public function reset()
|
||||||
{
|
{
|
||||||
$this->hasInvalidTokens = false;
|
$this->hasInvalidTokens = false;
|
||||||
parent::reset();
|
parent::reset();
|
||||||
|
$this->previous = $this->token = self::$nullToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hasInvalidTokens()
|
public function hasInvalidTokens()
|
||||||
@@ -91,7 +104,7 @@ class EmailLexer extends AbstractLexer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $type
|
* @param string $type
|
||||||
* @throws \UnexpectedValueException
|
* @throws \UnexpectedValueException
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
@@ -124,8 +137,10 @@ class EmailLexer extends AbstractLexer
|
|||||||
public function moveNext()
|
public function moveNext()
|
||||||
{
|
{
|
||||||
$this->previous = $this->token;
|
$this->previous = $this->token;
|
||||||
|
$hasNext = parent::moveNext();
|
||||||
|
$this->token = $this->token ?: self::$nullToken;
|
||||||
|
|
||||||
return parent::moveNext();
|
return $hasNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -191,7 +206,7 @@ class EmailLexer extends AbstractLexer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $value
|
* @param string $value
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function isNullType($value)
|
protected function isNullType($value)
|
||||||
@@ -204,7 +219,7 @@ class EmailLexer extends AbstractLexer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $value
|
* @param string $value
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function isUTF8Invalid($value)
|
protected function isUTF8Invalid($value)
|
||||||
@@ -216,6 +231,9 @@ class EmailLexer extends AbstractLexer
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
protected function getModifiers()
|
protected function getModifiers()
|
||||||
{
|
{
|
||||||
return 'iu';
|
return 'iu';
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class EmailParser
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $str
|
* @param string $str
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function parse($str)
|
public function parse($str)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class EmailValidator
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $email
|
* @param string $email
|
||||||
* @param EmailValidation $emailValidation
|
* @param EmailValidation $emailValidation
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Egulias\EmailValidator\Exception;
|
namespace Egulias\EmailValidator\Exception;
|
||||||
|
|
||||||
class ExpectedQPair extends InvalidEmail
|
class ExpectingQPair extends InvalidEmail
|
||||||
{
|
{
|
||||||
const CODE = 136;
|
const CODE = 136;
|
||||||
const REASON = "Expecting QPAIR";
|
const REASON = "Expecting QPAIR";
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace Egulias\EmailValidator\Exception;
|
namespace Egulias\EmailValidator\Exception;
|
||||||
|
|
||||||
use Egulias\EmailValidator\Exception\InvalidEmail;
|
|
||||||
|
|
||||||
class NoDNSRecord extends InvalidEmail
|
class NoDNSRecord extends InvalidEmail
|
||||||
{
|
{
|
||||||
const CODE = 5;
|
const CODE = 5;
|
||||||
|
|||||||
@@ -41,21 +41,7 @@ class DomainPart extends Parser
|
|||||||
{
|
{
|
||||||
$this->lexer->moveNext();
|
$this->lexer->moveNext();
|
||||||
|
|
||||||
if ($this->lexer->token['type'] === EmailLexer::S_DOT) {
|
$this->performDomainStartChecks();
|
||||||
throw new DotAtStart();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->lexer->token['type'] === EmailLexer::S_EMPTY) {
|
|
||||||
throw new NoDomainPart();
|
|
||||||
}
|
|
||||||
if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) {
|
|
||||||
throw new DomainHyphened();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
|
|
||||||
$this->warnings[DeprecatedComment::CODE] = new DeprecatedComment();
|
|
||||||
$this->parseDomainComments();
|
|
||||||
}
|
|
||||||
|
|
||||||
$domain = $this->doParseDomainPart();
|
$domain = $this->doParseDomainPart();
|
||||||
|
|
||||||
@@ -77,6 +63,38 @@ class DomainPart extends Parser
|
|||||||
$this->domainPart = $domain;
|
$this->domainPart = $domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function performDomainStartChecks()
|
||||||
|
{
|
||||||
|
$this->checkInvalidTokensAfterAT();
|
||||||
|
$this->checkEmptyDomain();
|
||||||
|
|
||||||
|
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
|
||||||
|
$this->warnings[DeprecatedComment::CODE] = new DeprecatedComment();
|
||||||
|
$this->parseDomainComments();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function checkEmptyDomain()
|
||||||
|
{
|
||||||
|
$thereIsNoDomain = $this->lexer->token['type'] === EmailLexer::S_EMPTY ||
|
||||||
|
($this->lexer->token['type'] === EmailLexer::S_SP &&
|
||||||
|
!$this->lexer->isNextToken(EmailLexer::GENERIC));
|
||||||
|
|
||||||
|
if ($thereIsNoDomain) {
|
||||||
|
throw new NoDomainPart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function checkInvalidTokensAfterAT()
|
||||||
|
{
|
||||||
|
if ($this->lexer->token['type'] === EmailLexer::S_DOT) {
|
||||||
|
throw new DotAtStart();
|
||||||
|
}
|
||||||
|
if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) {
|
||||||
|
throw new DomainHyphened();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function getDomainPart()
|
public function getDomainPart()
|
||||||
{
|
{
|
||||||
return $this->domainPart;
|
return $this->domainPart;
|
||||||
@@ -166,7 +184,7 @@ class DomainPart extends Parser
|
|||||||
|
|
||||||
$domain .= $this->lexer->token['value'];
|
$domain .= $this->lexer->token['value'];
|
||||||
$this->lexer->moveNext();
|
$this->lexer->moveNext();
|
||||||
} while ($this->lexer->token);
|
} while (null !== $this->lexer->token['type']);
|
||||||
|
|
||||||
return $domain;
|
return $domain;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ class LocalPart extends Parser
|
|||||||
$closingQuote = false;
|
$closingQuote = false;
|
||||||
$openedParenthesis = 0;
|
$openedParenthesis = 0;
|
||||||
|
|
||||||
while ($this->lexer->token['type'] !== EmailLexer::S_AT && $this->lexer->token) {
|
while ($this->lexer->token['type'] !== EmailLexer::S_AT && null !== $this->lexer->token['type']) {
|
||||||
if ($this->lexer->token['type'] === EmailLexer::S_DOT && !$this->lexer->getPrevious()) {
|
if ($this->lexer->token['type'] === EmailLexer::S_DOT && null === $this->lexer->getPrevious()['type']) {
|
||||||
throw new DotAtStart();
|
throw new DotAtStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ class LocalPart extends Parser
|
|||||||
|
|
||||||
$this->lexer->moveNext();
|
$this->lexer->moveNext();
|
||||||
|
|
||||||
while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && $this->lexer->token) {
|
while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && null !== $this->lexer->token['type']) {
|
||||||
$parseAgain = false;
|
$parseAgain = false;
|
||||||
if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) {
|
if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) {
|
||||||
$this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
|
$this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use Egulias\EmailValidator\Exception\ConsecutiveDot;
|
|||||||
use Egulias\EmailValidator\Exception\CRLFAtTheEnd;
|
use Egulias\EmailValidator\Exception\CRLFAtTheEnd;
|
||||||
use Egulias\EmailValidator\Exception\CRLFX2;
|
use Egulias\EmailValidator\Exception\CRLFX2;
|
||||||
use Egulias\EmailValidator\Exception\CRNoLF;
|
use Egulias\EmailValidator\Exception\CRNoLF;
|
||||||
use Egulias\EmailValidator\Exception\ExpectedQPair;
|
use Egulias\EmailValidator\Exception\ExpectingQPair;
|
||||||
use Egulias\EmailValidator\Exception\ExpectingATEXT;
|
use Egulias\EmailValidator\Exception\ExpectingATEXT;
|
||||||
use Egulias\EmailValidator\Exception\ExpectingCTEXT;
|
use Egulias\EmailValidator\Exception\ExpectingCTEXT;
|
||||||
use Egulias\EmailValidator\Exception\UnclosedComment;
|
use Egulias\EmailValidator\Exception\UnclosedComment;
|
||||||
@@ -50,7 +50,7 @@ abstract class Parser
|
|||||||
{
|
{
|
||||||
if (!($this->lexer->token['type'] === EmailLexer::INVALID
|
if (!($this->lexer->token['type'] === EmailLexer::INVALID
|
||||||
|| $this->lexer->token['type'] === EmailLexer::C_DEL)) {
|
|| $this->lexer->token['type'] === EmailLexer::C_DEL)) {
|
||||||
throw new ExpectedQPair();
|
throw new ExpectingQPair();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->warnings[QuotedPart::CODE] =
|
$this->warnings[QuotedPart::CODE] =
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ class DNSCheckValidation implements EmailValidation
|
|||||||
* @var InvalidEmail
|
* @var InvalidEmail
|
||||||
*/
|
*/
|
||||||
private $error;
|
private $error;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
if (!extension_loaded('intl')) {
|
||||||
|
throw new \LogicException(sprintf('The %s class requires the Intl extension.', __CLASS__));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function isValid($email, EmailLexer $emailLexer)
|
public function isValid($email, EmailLexer $emailLexer)
|
||||||
{
|
{
|
||||||
@@ -44,7 +51,11 @@ class DNSCheckValidation implements EmailValidation
|
|||||||
|
|
||||||
protected function checkDNS($host)
|
protected function checkDNS($host)
|
||||||
{
|
{
|
||||||
$host = rtrim($host, '.') . '.';
|
$variant = INTL_IDNA_VARIANT_2003;
|
||||||
|
if ( defined('INTL_IDNA_VARIANT_UTS46') ) {
|
||||||
|
$variant = INTL_IDNA_VARIANT_UTS46;
|
||||||
|
}
|
||||||
|
$host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, $variant), '.') . '.';
|
||||||
|
|
||||||
$Aresult = true;
|
$Aresult = true;
|
||||||
$MXresult = checkdnsrr($host, 'MX');
|
$MXresult = checkdnsrr($host, 'MX');
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ class MultipleValidationWithAnd implements EmailValidation
|
|||||||
$errors = [];
|
$errors = [];
|
||||||
foreach ($this->validations as $validation) {
|
foreach ($this->validations as $validation) {
|
||||||
$emailLexer->reset();
|
$emailLexer->reset();
|
||||||
$result = $result && $validation->isValid($email, $emailLexer);
|
$validationResult = $validation->isValid($email, $emailLexer);
|
||||||
|
$result = $result && $validationResult;
|
||||||
$this->warnings = array_merge($this->warnings, $validation->getWarnings());
|
$this->warnings = array_merge($this->warnings, $validation->getWarnings());
|
||||||
$errors = $this->addNewError($validation->getError(), $errors);
|
$errors = $this->addNewError($validation->getError(), $errors);
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,13 @@ class SpoofCheckValidation implements EmailValidation
|
|||||||
*/
|
*/
|
||||||
private $error;
|
private $error;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
if (!extension_loaded('intl')) {
|
||||||
|
throw new \LogicException(sprintf('The %s class requires the Intl extension.', __CLASS__));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function isValid($email, EmailLexer $emailLexer)
|
public function isValid($email, EmailLexer $emailLexer)
|
||||||
{
|
{
|
||||||
$checker = new Spoofchecker();
|
$checker = new Spoofchecker();
|
||||||
|
|||||||
@@ -1,22 +1,25 @@
|
|||||||
#EmailValidator
|
# EmailValidator
|
||||||
[](https://travis-ci.org/egulias/EmailValidator) [](https://coveralls.io/r/egulias/EmailValidator?branch=master) [](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master) [](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6)
|
[](https://travis-ci.org/egulias/EmailValidator) [](https://coveralls.io/r/egulias/EmailValidator?branch=master) [](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master) [](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6)
|
||||||
=============================
|
=============================
|
||||||
With the help of [PHPStorm](https://www.jetbrains.com/phpstorm/)
|
## Suported RFCs ##
|
||||||
|
This library aims to support:
|
||||||
|
|
||||||
##Requirements##
|
RFC 5321, 5322, 6530, 6531, 6532.
|
||||||
|
|
||||||
|
## Requirements ##
|
||||||
|
|
||||||
* [Composer](https://getcomposer.org) is required for installation
|
* [Composer](https://getcomposer.org) is required for installation
|
||||||
* [Spoofchecking](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/SpoofCheckValidation.php) validation requires that your PHP system have the [PHP Internationalization Libraries](http://php.net/manual/en/book.intl.php) (also known as PHP Intl)
|
* [Spoofchecking](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/SpoofCheckValidation.php) and [DNSCheckValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/DNSCheckValidation.php) validation requires that your PHP system has the [PHP Internationalization Libraries](https://php.net/manual/en/book.intl.php) (also known as PHP Intl)
|
||||||
|
|
||||||
##Installation##
|
## Installation ##
|
||||||
|
|
||||||
Run the command below to install via Composer
|
Run the command below to install via Composer
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
composer require egulias/email-validator "~2.1"
|
composer require egulias/email-validator
|
||||||
```
|
```
|
||||||
|
|
||||||
##Getting Started##
|
## Getting Started ##
|
||||||
`EmailValidator`requires you to decide which (or combination of them) validation/s strategy/ies you'd like to follow for each [validation](#available-validations).
|
`EmailValidator`requires you to decide which (or combination of them) validation/s strategy/ies you'd like to follow for each [validation](#available-validations).
|
||||||
|
|
||||||
A basic example with the RFC validation
|
A basic example with the RFC validation
|
||||||
@@ -31,7 +34,7 @@ $validator->isValid("example@example.com", new RFCValidation()); //true
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
###Available validations###
|
### Available validations ###
|
||||||
|
|
||||||
1. [RFCValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/RFCValidation.php)
|
1. [RFCValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/RFCValidation.php)
|
||||||
2. [NoRFCWarningsValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/NoRFCWarningsValidation.php)
|
2. [NoRFCWarningsValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/NoRFCWarningsValidation.php)
|
||||||
@@ -60,20 +63,20 @@ $multipleValidations = new MultipleValidationWithAnd([
|
|||||||
$validator->isValid("example@example.com", $multipleValidations); //true
|
$validator->isValid("example@example.com", $multipleValidations); //true
|
||||||
```
|
```
|
||||||
|
|
||||||
###How to extend###
|
### How to extend ###
|
||||||
|
|
||||||
It's easy! You just need to extend [EmailValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/EmailValidation.php) and you can use your own validation.
|
It's easy! You just need to implement [EmailValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/EmailValidation.php) and you can use your own validation.
|
||||||
|
|
||||||
|
|
||||||
##Other Contributors##
|
## Other Contributors ##
|
||||||
(You can find current contributors [here](https://github.com/egulias/EmailValidator/graphs/contributors))
|
(You can find current contributors [here](https://github.com/egulias/EmailValidator/graphs/contributors))
|
||||||
|
|
||||||
As this is a port from another library and work, here are other people related to the previous one:
|
As this is a port from another library and work, here are other people related to the previous one:
|
||||||
|
|
||||||
* Ricard Clau [@ricardclau](http://github.com/ricardclau): Performance against PHP built-in filter_var
|
* Ricard Clau [@ricardclau](https://github.com/ricardclau): Performance against PHP built-in filter_var
|
||||||
* Josepf Bielawski [@stloyd](http://github.com/stloyd): For its first re-work of Dominic's lib
|
* Josepf Bielawski [@stloyd](https://github.com/stloyd): For its first re-work of Dominic's lib
|
||||||
* Dominic Sayers [@dominicsayers](http://github.com/dominicsayers): The original isemail function
|
* Dominic Sayers [@dominicsayers](https://github.com/dominicsayers): The original isemail function
|
||||||
|
|
||||||
##License##
|
## License ##
|
||||||
Released under the MIT License attached with this code.
|
Released under the MIT License attached with this code.
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
namespace Egulias\Tests\EmailValidator;
|
namespace Egulias\Tests\EmailValidator;
|
||||||
|
|
||||||
use Egulias\EmailValidator\EmailLexer;
|
use Egulias\EmailValidator\EmailLexer;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class EmailLexerTests extends \PHPUnit_Framework_TestCase
|
class EmailLexerTests extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function testLexerExtendsLib()
|
public function testLexerExtendsLib()
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ namespace Egulias\Tests\EmailValidator;
|
|||||||
|
|
||||||
use Egulias\EmailValidator\EmailValidator;
|
use Egulias\EmailValidator\EmailValidator;
|
||||||
use Egulias\EmailValidator\Validation\MultipleValidationWithAnd;
|
use Egulias\EmailValidator\Validation\MultipleValidationWithAnd;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class EmailValidatorTest extends \PHPUnit_Framework_TestCase
|
class EmailValidatorTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testValidationIsUsed()
|
public function testValidationIsUsed()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ use Egulias\EmailValidator\EmailLexer;
|
|||||||
use Egulias\EmailValidator\Exception\NoDNSRecord;
|
use Egulias\EmailValidator\Exception\NoDNSRecord;
|
||||||
use Egulias\EmailValidator\Validation\DNSCheckValidation;
|
use Egulias\EmailValidator\Validation\DNSCheckValidation;
|
||||||
use Egulias\EmailValidator\Warning\NoDNSMXRecord;
|
use Egulias\EmailValidator\Warning\NoDNSMXRecord;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class DNSCheckValidationTest extends \PHPUnit_Framework_TestCase
|
class DNSCheckValidationTest extends TestCase
|
||||||
{
|
{
|
||||||
public function validEmailsProvider()
|
public function validEmailsProvider()
|
||||||
{
|
{
|
||||||
@@ -23,6 +24,9 @@ class DNSCheckValidationTest extends \PHPUnit_Framework_TestCase
|
|||||||
['"Abc@def"@example.com'],
|
['"Abc@def"@example.com'],
|
||||||
['"Fred\ Bloggs"@example.com'],
|
['"Fred\ Bloggs"@example.com'],
|
||||||
['"Joe.\\Blow"@example.com'],
|
['"Joe.\\Blow"@example.com'],
|
||||||
|
|
||||||
|
// unicide
|
||||||
|
['ñandu.cl'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ use Egulias\EmailValidator\Validation\DNSCheckValidation;
|
|||||||
use Egulias\EmailValidator\Validation\MultipleValidationWithAnd;
|
use Egulias\EmailValidator\Validation\MultipleValidationWithAnd;
|
||||||
use Egulias\EmailValidator\Validation\NoRFCWarningsValidation;
|
use Egulias\EmailValidator\Validation\NoRFCWarningsValidation;
|
||||||
use Egulias\EmailValidator\Validation\RFCValidation;
|
use Egulias\EmailValidator\Validation\RFCValidation;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class IsEmailFunctionTests extends \PHPUnit_Framework_TestCase
|
class IsEmailFunctionTests extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider isEmailTestSuite
|
* @dataProvider isEmailTestSuite
|
||||||
|
|||||||
+51
-10
@@ -2,18 +2,23 @@
|
|||||||
|
|
||||||
namespace Egulias\Tests\EmailValidator\Validation;
|
namespace Egulias\Tests\EmailValidator\Validation;
|
||||||
|
|
||||||
|
use Egulias\EmailValidator\EmailLexer;
|
||||||
|
use Egulias\EmailValidator\EmailValidator;
|
||||||
use Egulias\EmailValidator\Exception\CommaInDomain;
|
use Egulias\EmailValidator\Exception\CommaInDomain;
|
||||||
use Egulias\EmailValidator\Exception\NoDomainPart;
|
use Egulias\EmailValidator\Exception\NoDomainPart;
|
||||||
use Egulias\EmailValidator\Validation\MultipleErrors;
|
use Egulias\EmailValidator\Validation\MultipleErrors;
|
||||||
use Egulias\EmailValidator\Validation\MultipleValidationWithAnd;
|
use Egulias\EmailValidator\Validation\MultipleValidationWithAnd;
|
||||||
|
use Egulias\EmailValidator\Validation\NoRFCWarningsValidation;
|
||||||
|
use Egulias\EmailValidator\Validation\RFCValidation;
|
||||||
use Egulias\EmailValidator\Warning\AddressLiteral;
|
use Egulias\EmailValidator\Warning\AddressLiteral;
|
||||||
use Egulias\EmailValidator\Warning\DomainLiteral;
|
use Egulias\EmailValidator\Warning\DomainLiteral;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class MultipleValidationWitAndTest extends \PHPUnit_Framework_TestCase
|
class MultipleValidationWithAndTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testUsesAndLogicalOperation()
|
public function testUsesAndLogicalOperation()
|
||||||
{
|
{
|
||||||
$lexer = $this->getMockBuilder("Egulias\\EmailValidator\\EmailLexer")->getMock();
|
$lexer = new EmailLexer();
|
||||||
$validationTrue = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
$validationTrue = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
||||||
$validationTrue->expects($this->any())->method("isValid")->willReturn(true);
|
$validationTrue->expects($this->any())->method("isValid")->willReturn(true);
|
||||||
$validationTrue->expects($this->any())->method("getWarnings")->willReturn([]);
|
$validationTrue->expects($this->any())->method("getWarnings")->willReturn([]);
|
||||||
@@ -34,7 +39,7 @@ class MultipleValidationWitAndTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testValidationIsValid()
|
public function testValidationIsValid()
|
||||||
{
|
{
|
||||||
$lexer = $this->getMockBuilder("Egulias\\EmailValidator\\EmailLexer")->getMock();
|
$lexer = new EmailLexer();
|
||||||
|
|
||||||
$validation = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
$validation = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
||||||
$validation->expects($this->any())->method("isValid")->willReturn(true);
|
$validation->expects($this->any())->method("isValid")->willReturn(true);
|
||||||
@@ -55,7 +60,7 @@ class MultipleValidationWitAndTest extends \PHPUnit_Framework_TestCase
|
|||||||
];
|
];
|
||||||
$expectedResult = array_merge($warnings1, $warnings2);
|
$expectedResult = array_merge($warnings1, $warnings2);
|
||||||
|
|
||||||
$lexer = $this->getMockBuilder("Egulias\\EmailValidator\\EmailLexer")->getMock();
|
$lexer = new EmailLexer();
|
||||||
$validation1 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
$validation1 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
||||||
$validation1->expects($this->any())->method("isValid")->willReturn(true);
|
$validation1->expects($this->any())->method("isValid")->willReturn(true);
|
||||||
$validation1->expects($this->once())->method("getWarnings")->willReturn($warnings1);
|
$validation1->expects($this->once())->method("getWarnings")->willReturn($warnings1);
|
||||||
@@ -77,19 +82,43 @@ class MultipleValidationWitAndTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$expectedResult = new MultipleErrors([$error1, $error2]);
|
$expectedResult = new MultipleErrors([$error1, $error2]);
|
||||||
|
|
||||||
$lexer = $this->getMockBuilder("Egulias\\EmailValidator\\EmailLexer")->getMock();
|
$lexer = new EmailLexer();
|
||||||
|
|
||||||
$validation1 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
$validation1 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
||||||
$validation1->expects($this->any())->method("isValid")->willReturn(true);
|
$validation1->expects($this->once())->method("isValid")->willReturn(false);
|
||||||
|
$validation1->expects($this->once())->method("getWarnings")->willReturn([]);
|
||||||
|
$validation1->expects($this->once())->method("getError")->willReturn($error1);
|
||||||
|
|
||||||
|
$validation2 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
||||||
|
$validation2->expects($this->once())->method("isValid")->willReturn(false);
|
||||||
|
$validation2->expects($this->once())->method("getWarnings")->willReturn([]);
|
||||||
|
$validation2->expects($this->once())->method("getError")->willReturn($error2);
|
||||||
|
|
||||||
|
$multipleValidation = new MultipleValidationWithAnd([$validation1, $validation2]);
|
||||||
|
$multipleValidation->isValid("example@example.com", $lexer);
|
||||||
|
$this->assertEquals($expectedResult, $multipleValidation->getError());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testStopsAfterFirstError()
|
||||||
|
{
|
||||||
|
$error1 = new CommaInDomain();
|
||||||
|
$error2 = new NoDomainPart();
|
||||||
|
|
||||||
|
$expectedResult = new MultipleErrors([$error1]);
|
||||||
|
|
||||||
|
$lexer = new EmailLexer();
|
||||||
|
|
||||||
|
$validation1 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
||||||
|
$validation1->expects($this->any())->method("isValid")->willReturn(false);
|
||||||
$validation1->expects($this->once())->method("getWarnings")->willReturn([]);
|
$validation1->expects($this->once())->method("getWarnings")->willReturn([]);
|
||||||
$validation1->expects($this->once())->method("getError")->willReturn($error1);
|
$validation1->expects($this->once())->method("getError")->willReturn($error1);
|
||||||
|
|
||||||
$validation2 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
$validation2 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
||||||
$validation2->expects($this->any())->method("isValid")->willReturn(false);
|
$validation2->expects($this->any())->method("isValid")->willReturn(false);
|
||||||
$validation2->expects($this->once())->method("getWarnings")->willReturn([]);
|
$validation2->expects($this->never())->method("getWarnings")->willReturn([]);
|
||||||
$validation2->expects($this->once())->method("getError")->willReturn($error2);
|
$validation2->expects($this->never())->method("getError")->willReturn($error2);
|
||||||
|
|
||||||
$multipleValidation = new MultipleValidationWithAnd([$validation1, $validation2]);
|
$multipleValidation = new MultipleValidationWithAnd([$validation1, $validation2], MultipleValidationWithAnd::STOP_ON_ERROR);
|
||||||
$multipleValidation->isValid("example@example.com", $lexer);
|
$multipleValidation->isValid("example@example.com", $lexer);
|
||||||
$this->assertEquals($expectedResult, $multipleValidation->getError());
|
$this->assertEquals($expectedResult, $multipleValidation->getError());
|
||||||
}
|
}
|
||||||
@@ -100,7 +129,7 @@ class MultipleValidationWitAndTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$expectedResult = new MultipleErrors([$error]);
|
$expectedResult = new MultipleErrors([$error]);
|
||||||
|
|
||||||
$lexer = $this->getMockBuilder("Egulias\\EmailValidator\\EmailLexer")->getMock();
|
$lexer = new EmailLexer();
|
||||||
|
|
||||||
$validation1 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
$validation1 = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
||||||
$validation1->expects($this->any())->method("isValid")->willReturn(false);
|
$validation1->expects($this->any())->method("isValid")->willReturn(false);
|
||||||
@@ -116,4 +145,16 @@ class MultipleValidationWitAndTest extends \PHPUnit_Framework_TestCase
|
|||||||
$multipleValidation->isValid("example@example.com", $lexer);
|
$multipleValidation->isValid("example@example.com", $lexer);
|
||||||
$this->assertEquals($expectedResult, $multipleValidation->getError());
|
$this->assertEquals($expectedResult, $multipleValidation->getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testBreakoutOnInvalidEmail()
|
||||||
|
{
|
||||||
|
$lexer = new EmailLexer();
|
||||||
|
|
||||||
|
$validationNotCalled = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock();
|
||||||
|
$validationNotCalled->expects($this->never())->method("isValid");
|
||||||
|
$validationNotCalled->expects($this->never())->method("getWarnings");
|
||||||
|
$validationNotCalled->expects($this->never())->method("getError");
|
||||||
|
$multipleValidation = new MultipleValidationWithAnd([new RFCValidation(), $validationNotCalled], MultipleValidationWithAnd::STOP_ON_ERROR);
|
||||||
|
$this->assertFalse($multipleValidation->isValid("invalid-email", $lexer));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -6,8 +6,9 @@ use Egulias\EmailValidator\EmailLexer;
|
|||||||
use Egulias\EmailValidator\Exception\NoDomainPart;
|
use Egulias\EmailValidator\Exception\NoDomainPart;
|
||||||
use Egulias\EmailValidator\Validation\Error\RFCWarnings;
|
use Egulias\EmailValidator\Validation\Error\RFCWarnings;
|
||||||
use Egulias\EmailValidator\Validation\NoRFCWarningsValidation;
|
use Egulias\EmailValidator\Validation\NoRFCWarningsValidation;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class NoRFCWarningsValidationTest extends \PHPUnit_Framework_TestCase
|
class NoRFCWarningsValidationTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testInvalidEmailIsInvalid()
|
public function testInvalidEmailIsInvalid()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,8 +35,9 @@ use Egulias\EmailValidator\Warning\LabelTooLong;
|
|||||||
use Egulias\EmailValidator\Warning\LocalTooLong;
|
use Egulias\EmailValidator\Warning\LocalTooLong;
|
||||||
use Egulias\EmailValidator\Warning\ObsoleteDTEXT;
|
use Egulias\EmailValidator\Warning\ObsoleteDTEXT;
|
||||||
use Egulias\EmailValidator\Warning\QuotedString;
|
use Egulias\EmailValidator\Warning\QuotedString;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class RFCValidationTest extends \PHPUnit_Framework_TestCase
|
class RFCValidationTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var RFCValidation
|
* @var RFCValidation
|
||||||
@@ -165,6 +166,7 @@ class RFCValidationTest extends \PHPUnit_Framework_TestCase
|
|||||||
['test@email>'],
|
['test@email>'],
|
||||||
['test@email<'],
|
['test@email<'],
|
||||||
['test@email{'],
|
['test@email{'],
|
||||||
|
['test@ '],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,13 +221,13 @@ class RFCValidationTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$this->assertTrue($this->validator->isValid($email, $this->lexer));
|
$this->assertTrue($this->validator->isValid($email, $this->lexer));
|
||||||
$warnings = $this->validator->getWarnings();
|
$warnings = $this->validator->getWarnings();
|
||||||
$this->assertTrue(
|
$this->assertCount(
|
||||||
count($warnings) === count($expectedWarnings),
|
count($warnings), $expectedWarnings,
|
||||||
"Expected: " . implode(",", $expectedWarnings) . " and got " . implode(",", $warnings)
|
"Expected: " . implode(",", $expectedWarnings) . " and got " . implode(",", $warnings)
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($warnings as $warning) {
|
foreach ($warnings as $warning) {
|
||||||
$this->assertTrue(isset($expectedWarnings[$warning->code()]));
|
$this->assertArrayHasKey($warning->code(), $expectedWarnings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ namespace Egulias\Tests\EmailValidator\Validation;
|
|||||||
|
|
||||||
use Egulias\EmailValidator\EmailLexer;
|
use Egulias\EmailValidator\EmailLexer;
|
||||||
use Egulias\EmailValidator\Validation\SpoofCheckValidation;
|
use Egulias\EmailValidator\Validation\SpoofCheckValidation;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class SpoofCheckValidationTest extends \PHPUnit_Framework_TestCase
|
class SpoofCheckValidationTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider validUTF8EmailsProvider
|
* @dataProvider validUTF8EmailsProvider
|
||||||
|
|||||||
+9
-3
@@ -10,7 +10,7 @@
|
|||||||
],
|
],
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.0.x-dev"
|
"dev-master": "2.1.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"repositories": [
|
"repositories": [
|
||||||
@@ -24,8 +24,9 @@
|
|||||||
"doctrine/lexer": "^1.0.1"
|
"doctrine/lexer": "^1.0.1"
|
||||||
},
|
},
|
||||||
"require-dev" : {
|
"require-dev" : {
|
||||||
"satooshi/php-coveralls": "dev-master",
|
"satooshi/php-coveralls": "^1.0.1",
|
||||||
"phpunit/phpunit": "^4.8.0",
|
"phpunit/phpunit": "^4.8.35||^5.7||^6.0",
|
||||||
|
"symfony/phpunit-bridge": "^4.4@dev",
|
||||||
"dominicsayers/isemail": "dev-master"
|
"dominicsayers/isemail": "dev-master"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
@@ -35,5 +36,10 @@
|
|||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Egulias\\EmailValidator\\": "EmailValidator"
|
"Egulias\\EmailValidator\\": "EmailValidator"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Egulias\\Tests\\": "test"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
-1661
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,23 @@
|
|||||||
Email length
|
Email length
|
||||||
------------
|
------------
|
||||||
http://tools.ietf.org/html/rfc5321#section-4.1.2
|
https://tools.ietf.org/html/rfc5321#section-4.1.2
|
||||||
Forward-path = Path
|
Forward-path = Path
|
||||||
|
|
||||||
Path = "<" [ A-d-l ":" ] Mailbox ">"
|
Path = "<" [ A-d-l ":" ] Mailbox ">"
|
||||||
|
|
||||||
http://tools.ietf.org/html/rfc5321#section-4.5.3.1.3
|
https://tools.ietf.org/html/rfc5321#section-4.5.3.1.3
|
||||||
http://tools.ietf.org/html/rfc1035#section-2.3.4
|
https://tools.ietf.org/html/rfc1035#section-2.3.4
|
||||||
|
|
||||||
DNS
|
DNS
|
||||||
---
|
---
|
||||||
|
|
||||||
http://tools.ietf.org/html/rfc5321#section-2.3.5
|
https://tools.ietf.org/html/rfc5321#section-2.3.5
|
||||||
Names that can
|
Names that can
|
||||||
be resolved to MX RRs or address (i.e., A or AAAA) RRs (as discussed
|
be resolved to MX RRs or address (i.e., A or AAAA) RRs (as discussed
|
||||||
in Section 5) are permitted, as are CNAME RRs whose targets can be
|
in Section 5) are permitted, as are CNAME RRs whose targets can be
|
||||||
resolved, in turn, to MX or address RRs.
|
resolved, in turn, to MX or address RRs.
|
||||||
|
|
||||||
http://tools.ietf.org/html/rfc5321#section-5.1
|
https://tools.ietf.org/html/rfc5321#section-5.1
|
||||||
The lookup first attempts to locate an MX record associated with the
|
The lookup first attempts to locate an MX record associated with the
|
||||||
name. If a CNAME record is found, the resulting name is processed as
|
name. If a CNAME record is found, the resulting name is processed as
|
||||||
if it were the initial name. ... If an empty list of MXs is returned,
|
if it were the initial name. ... If an empty list of MXs is returned,
|
||||||
@@ -37,7 +37,7 @@ status to these addresses on the basis that they are more likely
|
|||||||
to be typos than genuine addresses (unless we've already
|
to be typos than genuine addresses (unless we've already
|
||||||
established that the domain does have an MX record)
|
established that the domain does have an MX record)
|
||||||
|
|
||||||
http://tools.ietf.org/html/rfc5321#section-2.3.5
|
https://tools.ietf.org/html/rfc5321#section-2.3.5
|
||||||
In the case
|
In the case
|
||||||
of a top-level domain used by itself in an email address, a single
|
of a top-level domain used by itself in an email address, a single
|
||||||
string is used without any dots. This makes the requirement,
|
string is used without any dots. This makes the requirement,
|
||||||
@@ -57,7 +57,7 @@ an ambiguity. The most authoritative statement on TLD formats that
|
|||||||
the author can find is in a (rejected!) erratum to RFC 1123
|
the author can find is in a (rejected!) erratum to RFC 1123
|
||||||
submitted by John Klensin, the author of RFC 5321:
|
submitted by John Klensin, the author of RFC 5321:
|
||||||
|
|
||||||
http://www.rfc-editor.org/errata_search.php?rfc=1123&eid=1353
|
https://www.rfc-editor.org/errata_search.php?rfc=1123&eid=1353
|
||||||
However, a valid host name can never have the dotted-decimal
|
However, a valid host name can never have the dotted-decimal
|
||||||
form #.#.#.#, since this change does not permit the highest-level
|
form #.#.#.#, since this change does not permit the highest-level
|
||||||
component label to start with a digit even if it is not all-numeric.
|
component label to start with a digit even if it is not all-numeric.
|
||||||
@@ -66,4 +66,4 @@ Comments
|
|||||||
--------
|
--------
|
||||||
Comments at the start of the domain are deprecated in the text
|
Comments at the start of the domain are deprecated in the text
|
||||||
Comments at the start of a subdomain are obs-domain
|
Comments at the start of a subdomain are obs-domain
|
||||||
(http://tools.ietf.org/html/rfc5322#section-3.4.1)
|
(https://tools.ietf.org/html/rfc5322#section-3.4.1)
|
||||||
|
|||||||
+7
-4
@@ -8,7 +8,6 @@
|
|||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
processIsolation="false"
|
processIsolation="false"
|
||||||
stopOnFailure="false"
|
stopOnFailure="false"
|
||||||
syntaxCheck="false"
|
|
||||||
bootstrap="vendor/autoload.php"
|
bootstrap="vendor/autoload.php"
|
||||||
>
|
>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
@@ -19,8 +18,12 @@
|
|||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<blacklist>
|
<whitelist>
|
||||||
<directory>./vendor</directory>
|
<directory>./EmailValidator/</directory>
|
||||||
</blacklist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
|
<listeners>
|
||||||
|
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||||
|
</listeners>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
Reference in New Issue
Block a user