Propaganistas\LaravelPhone\Tests\PhoneValidatorTest::testValidatePhoneNoDefaultCountryNoCountryField PHP Method

testValidatePhoneNoDefaultCountryNoCountryField() public method

    public function testValidatePhoneNoDefaultCountryNoCountryField()
    {
        $this->setExpectedException('Propaganistas\\LaravelPhone\\Exceptions\\NoValidCountryFoundException');
        // Validator with no country field or given country.
        $this->performValidation(['field' => '016123456']);
        // Validator with no country field or given country, wrong type.
        $this->performValidation(['field' => '016123456', 'rule' => 'mobile']);
        // Validator with no country field or given country, correct type.
        $this->performValidation(['field' => '0499123456', 'rule' => 'mobile']);
        // Validator with no country field or given country, correct type, faulty parameter.
        $this->performValidation(['field' => '0499123456', 'rule' => 'mobile,xyz']);
    }