lithium\tests\integration\g11n\CatalogValidatorTest::testMultipleLocales PHP Method

testMultipleLocales() public method

public testMultipleLocales ( )
    public function testMultipleLocales()
    {
        $data = '/phone en_US/';
        Catalog::write('runtime', 'validation.phone', 'en_US', $data);
        $data = '/phone en_GB/';
        Catalog::write('runtime', 'validation.phone', 'en_GB', $data);
        Validator::add('phone', array('en_US' => Catalog::read('runtime', 'validation.phone', 'en_US'), 'en_GB' => Catalog::read('runtime', 'validation.phone', 'en_GB')));
        $result = Validator::isPhone('phone en_US', 'en_US');
        $this->assertTrue($result);
        $result = Validator::isPhone('phone en_GB', 'en_GB');
        $this->assertTrue($result);
    }