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

testValidatePhoneWithDefaultCountryNoType() public method

    public function testValidatePhoneWithDefaultCountryNoType()
    {
        // Validator with correct country field.
        $this->assertTrue($this->performValidation(['field' => '016123456', 'rule' => 'BE']));
        // Validator with wrong country value.
        $this->assertFalse($this->performValidation(['field' => '016123456', 'rule' => 'NL']));
        // Validator with multiple country values, one correct.
        $this->assertTrue($this->performValidation(['field' => '016123456', 'rule' => 'BE,NL']));
        // Validator with multiple country values, value correct for second country in list.
        $this->assertTrue($this->performValidation(['field' => '016123456', 'rule' => 'NL,BE']));
        // Validator with multiple wrong country values.
        $this->assertFalse($this->performValidation(['field' => '016123456', 'rule' => 'DE,NL']));
    }