lithium\tests\cases\g11n\CatalogTest::testDataTypeSupport PHP Method

testDataTypeSupport() public method

Tests writing, then reading different types of values.
public testDataTypeSupport ( )
    public function testDataTypeSupport()
    {
        $data = function ($n) {
            return $n === 1 ? 0 : 1;
        };
        Catalog::write('runtime', 'message.pluralRule', 'en', $data);
        $result = Catalog::read('runtime', 'message.pluralRule', 'en');
        $this->assertEqual($data, $result);
        $data = array('fish', 'fishes');
        Catalog::write('runtime', 'message.fish', 'en', $data);
        $result = Catalog::read('runtime', 'message.fish', 'en');
        $this->assertEqual($data, $result);
    }