do-aki
null+****@clear*****
Fri Aug 8 16:48:15 JST 2014
do-aki 2014-08-08 16:48:15 +0900 (Fri, 08 Aug 2014) New Revision: ca27a6cdfd94d407d51bdb7ad75c31771a0a872e https://github.com/groonga/groonga/commit/ca27a6cdfd94d407d51bdb7ad75c31771a0a872e Merged 9adf510: Merge pull request #184 from do-aki/groonga-php Message: add test Added files: bindings/php/tests/001.phpt Added: bindings/php/tests/001.phpt (+29 -0) 100644 =================================================================== --- /dev/null +++ bindings/php/tests/001.phpt 2014-08-08 16:48:15 +0900 (d215b3e) @@ -0,0 +1,29 @@ +--TEST-- +groonga connection +--DESCRIPTION-- +required: variables_order includes "E" +--SKIPIF-- +<?php +if (!extension_loaded("groonga")) print "skip"; +if (!getenv('GROONGA_TEST_HOST')) print "skip"; +?> +--FILE-- +<?php +$host = getenv('GROONGA_TEST_HOST'); +$port = getenv('GROONGA_TEST_PORT') ? getenv('GROONGA_TEST_PORT') : 10041; + +$grn = grn_ctx_init(); +grn_ctx_connect($grn, $host, $port) or die("cannot connect groong server ({$host}:{$port})"); +grn_ctx_send($grn, 'table_list'); +var_dump(grn_ctx_recv($grn)); +grn_ctx_close($grn); +--EXPECTF-- +array(1) { + [0]=> + array(2) { + [0]=> + int(0) + [1]=> + string(%d) "%s" + } +} -------------- next part -------------- HTML����������������������������...Download