Phalcon\Test\Unit\Filter\FilterEmailTest::testSanitizeEmail PHP Method

testSanitizeEmail() public method

Tests Email
Since: 2014-09-30
Author: Nikolaos Dimopoulos ([email protected])
public testSanitizeEmail ( )
    public function testSanitizeEmail()
    {
        $this->specify("sanitizing email does not return the correct email", function () {
            $expected = '[email protected]';
            $value = 'some(one)@exa\\mple.com';
            $this->sanitizer('email', $expected, $value);
            $expected = '!first.guy@*my-domain**##.com.rx';
            $value = '!(first.guy)
                            @*my-domain**##.com.rx//';
            $this->sanitizer('email', $expected, $value);
        });
    }
FilterEmailTest