WP File Manager
Current Path:
/
home
/
argothem
/
www
/
organecyberpresse
/
plugins
/
auto
/
verifier
/
v3.8.0
/
tests
/
Name
Action
..
DateTest.php
Edit
EmailExplodeTest.php
Edit
EmailValideTest.php
Edit
EntierTest.php
Edit
TelephoneTest.php
Edit
bootstrap.php
Edit
Editing: EmailExplodeTest.php
<?php namespace Spip\Verifier\Tests; use PHPUnit\Framework\TestCase; /** * @covers verifier_email_dist() **/ class EmailExplodeTest extends TestCase { public static function setUpBeforeClass(): void { require_once dirname(__DIR__) . '/verifier/email.php'; } public static function dataEmails() { $datas = [ [ 'simple@example.com', [ 'simple@example.com', ] ], [ 'simple@example.com, john@example.org', [ 'simple@example.com', 'john@example.org', ] ], [ 'simple@example.com, john@example.org, ', [ 'simple@example.com', 'john@example.org', ] ], [ '"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com', [ '"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com', ] ], [ '"joe,"@apache.org', [ '"joe,"@apache.org', ] ], [ '"joe,"@apache.org, ', [ '"joe,"@apache.org', ] ], [ '"joe,"@apache.org, "joe2,"@apache.org', [ '"joe,"@apache.org', '"joe2,"@apache.org', ] ], ]; return $datas; } /** * @dataProvider dataEmails **/ function testEmailExplode($valeur, $expected) { $actual = verifier_email_explode_emails($valeur); $this->assertEquals($expected, $actual); } }