svn: /pecl/yaf/trunk/tests/ 025.phpt
| From: | Xinchen Hui | Date: | Thu, 29 Dec 2011 11:10:13 +0000 |
| Subject: | svn: /pecl/yaf/trunk/tests/ 025.phpt | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-17424@lists.php.net to get a copy of this message | ||
laruence Thu, 29 Dec 2011 11:10:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=321504
Log:
add test
Changed paths:
A pecl/yaf/trunk/tests/025.phpt
Added: pecl/yaf/trunk/tests/025.phpt
===================================================================
--- pecl/yaf/trunk/tests/025.phpt (rev 0)
+++ pecl/yaf/trunk/tests/025.phpt 2011-12-29 11:10:13 UTC (rev 321504)
@@ -0,0 +1,32 @@
+--TEST--
+Check for Yaf_Loader with namespace configuration
+--SKIPIF--
+<?php if (!extension_loaded("yaf")) print "skip"; ?>
+--INI--
+yaf.library="/php/global/dir"
+--FILE--
+<?php
+$config = array(
+ "application" => array(
+ "directory" => realpath(dirname(__FILE__)),
+ "library" => array(
+ "directory" => "/tmp",
+ "namespace" => "Foo, Bar",
+ ),
+ ),
+);
+
+$app = new Yaf_Application($config);
+Yaf_Loader::getInstance()->registerLocalNamespace("Dummy");
+print_r(Yaf_Loader::getInstance());
+var_dump(Yaf_Loader::getInstance()->isLocalName("Bar_Name"));
+
+?>
+--EXPECTF--
+Yaf_Loader Object
+(
+ [_local_ns:protected] => :Foo::Bar:Dummy:
+ [_library:protected] => /tmp
+ [_global_library:protected] => /php/global/dir
+)
+bool(true)