"Fossies" - the Fresh Open Source Software Archive

Member "groonga-10.0.8/bindings/php/tests/001.phpt" (22 Oct 2020, 630 Bytes) of package /linux/misc/groonga-10.0.8.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 --TEST--
    2 groonga connection
    3 --DESCRIPTION--
    4 required: variables_order includes "E"
    5 --SKIPIF--
    6 <?php
    7 if (!extension_loaded("groonga")) print "skip";
    8 if (!getenv('GROONGA_TEST_HOST')) print "skip";
    9 ?>
   10 --FILE--
   11 <?php
   12 $host = getenv('GROONGA_TEST_HOST');
   13 $port = getenv('GROONGA_TEST_PORT') ? getenv('GROONGA_TEST_PORT') : 10041;
   14 
   15 $grn = grn_ctx_init();
   16 grn_ctx_connect($grn, $host, $port) or die("cannot connect groong server ({$host}:{$port})");
   17 grn_ctx_send($grn, 'table_list');
   18 var_dump(grn_ctx_recv($grn));
   19 grn_ctx_close($grn);
   20 --EXPECTF--
   21 array(1) {
   22   [0]=>
   23   array(2) {
   24     [0]=>
   25     int(0)
   26     [1]=>
   27     string(%d) "%s"
   28   }
   29 }