Cake\Localized\Test\TestCase\Validation\EsValidationTest::testPhone PHP Méthode

testPhone() public méthode

test the phone method of EsValidation
public testPhone ( ) : void
Résultat void
    public function testPhone()
    {
        $this->assertTrue(EsValidation::phone('924227227'));
        $this->assertTrue(EsValidation::phone('924.227.227'));
        $this->assertTrue(EsValidation::phone('924-227-227'));
        $this->assertTrue(EsValidation::phone('924-22-72-27'));
        $this->assertTrue(EsValidation::phone('924 22 72 27'));
        $this->assertTrue(EsValidation::phone('924227227'));
        $this->assertTrue(EsValidation::phone('624227227'));
        $this->assertTrue(EsValidation::phone('924-227227'));
        $this->assertTrue(EsValidation::phone('827-227227'));
        $this->assertTrue(EsValidation::phone('91-2227227'));
        $this->assertTrue(EsValidation::phone('721233223'));
        $this->assertFalse(EsValidation::phone('127227227'));
        $this->assertFalse(EsValidation::phone('813 4567'));
        $this->assertFalse(EsValidation::phone('(666) 232 323'));
    }