fix code style
This commit is contained in:
parent
599f3104f6
commit
6f257f416a
@ -67,7 +67,6 @@ class InputService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function filterMail($mail) {
|
public function filterMail($mail) {
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
// formatting
|
// formatting
|
||||||
|
|
||||||
|
@ -3,26 +3,20 @@ namespace Framadate\Services;
|
|||||||
|
|
||||||
use Framadate\FramaTestCase;
|
use Framadate\FramaTestCase;
|
||||||
|
|
||||||
class InputServiceUnitTest extends FramaTestCase {
|
class InputServiceUnitTest extends FramaTestCase
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
* @dataProvider liste_emails
|
* @dataProvider liste_emails
|
||||||
*/
|
*/
|
||||||
function test_filterMail($email, $expected)
|
function test_filterMail($email, $expected) {
|
||||||
{
|
|
||||||
|
|
||||||
$inputService = new InputService();
|
$inputService = new InputService();
|
||||||
$filtered = $inputService->filterMail($email);
|
$filtered = $inputService->filterMail($email);
|
||||||
|
|
||||||
$this->assertSame($expected, $filtered);
|
$this->assertSame($expected, $filtered);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function liste_emails() {
|
||||||
function liste_emails()
|
|
||||||
{
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
// valids addresses
|
// valids addresses
|
||||||
"valid address" => ["example@example.com", "example@example.com"],
|
"valid address" => ["example@example.com", "example@example.com"],
|
||||||
@ -32,10 +26,8 @@ class InputServiceUnitTest extends FramaTestCase {
|
|||||||
"unicode caracters" => ["unicode.éà@idn-œ.com", "unicode.éà@idn-œ.com"],
|
"unicode caracters" => ["unicode.éà@idn-œ.com", "unicode.éà@idn-œ.com"],
|
||||||
// invalids addresses
|
// invalids addresses
|
||||||
"without domain" => ["without-domain", FALSE],
|
"without domain" => ["without-domain", FALSE],
|
||||||
"space inside" => ["example @example.com", FALSE],
|
"space inside" => ["example example@example.com", FALSE],
|
||||||
"forbidden chars" => ["special_chars.)#@example.com", FALSE],
|
"forbidden chars" => ["special_chars.@example.com", FALSE],
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user