PageRenderTime 192ms CodeModel.GetById 101ms app.highlight 2ms RepoModel.GetById 88ms app.codeStats 0ms

/hphp/test/zend/bad/ext/intl/tests/resourcebundle_create.php

http://github.com/facebook/hiphop-php
PHP | 35 lines | 22 code | 8 blank | 5 comment | 0 complexity | eba8083da78135aeedb5a0496e5cc9d4 MD5 | raw file
 1<?php
 2	
 3include "resourcebundle.inc";
 4
 5function ut_main() {
 6	$str_res = '';
 7	// all fine
 8	$r1 = ut_resourcebundle_create( 'root', BUNDLE );
 9	$str_res .= debug( $r1 );
10	$str_res .= print_r( $r1['teststring'], true)."\n";
11
12	// non-root one
13	$r1 = ut_resourcebundle_create( 'es', BUNDLE );
14	$str_res .= debug( $r1 );
15	$str_res .= print_r( $r1['teststring'], true)."\n";
16
17	// fall back
18	$r1 = ut_resourcebundle_create( 'en_US', BUNDLE );
19        $str_res .= debug( $r1 );
20	$str_res .= print_r( $r1['testsring'], true);
21
22	// fall out
23	$r2 = ut_resourcebundle_create( 'en_US', BUNDLE, false );
24        $str_res .= debug( $r2 );
25
26	// missing
27	$r3 = ut_resourcebundle_create( 'en_US', 'nonexisting' );
28        $str_res .= debug( $r3 );
29	
30	return $str_res;
31}
32
33	include_once( 'ut_common.inc' );
34	ut_run();
35?>