summaryrefslogtreecommitdiff
path: root/ext/intl/tests/resourcebundle_traversable.phpt
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2012-05-24 14:31:07 +0200
committerGustavo André dos Santos Lopes <cataphract@php.net>2012-05-24 14:33:05 +0200
commit85c777d2f1d5a12fac0100f4953d33a7380d0b03 (patch)
tree2404fcaa2e70444ef8c380644399148d5997768f /ext/intl/tests/resourcebundle_traversable.phpt
parentf1969d4b4ce0ebd82b2582104bb99de4b5ac824e (diff)
downloadphp-git-85c777d2f1d5a12fac0100f4953d33a7380d0b03.tar.gz
Fixed bug #55610: ResourceBundle and Traversable
Diffstat (limited to 'ext/intl/tests/resourcebundle_traversable.phpt')
-rw-r--r--ext/intl/tests/resourcebundle_traversable.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/intl/tests/resourcebundle_traversable.phpt b/ext/intl/tests/resourcebundle_traversable.phpt
new file mode 100644
index 0000000000..1e6af7b909
--- /dev/null
+++ b/ext/intl/tests/resourcebundle_traversable.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #55610: ResourceBundle does not implement Traversable
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+ include "resourcebundle.inc";
+
+ $r = new ResourceBundle( 'es', BUNDLE );
+
+ var_dump($r instanceof Traversable);
+ var_dump(iterator_to_array($r->get('testarray')));
+?>
+--EXPECTF--
+bool(true)
+array(3) {
+ [0]=>
+ string(8) "cadena 1"
+ [1]=>
+ string(8) "cadena 2"
+ [2]=>
+ string(8) "cadena 3"
+}