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