X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php82-pecl-scoutapm_1.10.0-1.el8/tests
opt
/
alt
/
tests
/
alt-php82-pecl-scoutapm_1.10.0-1.el8
/
tests
/
📁
..
📄
001-check-ext-loaded.phpt
(375 B)
📄
002-file_get_contents.phpt
(701 B)
📄
003-scoutapm_get_calls-clears-calls-list.phpt
(480 B)
📄
004-namespaced-fgc-is-not-logged.phpt
(1.66 KB)
📄
005-requiring-external-files-handled.phpt
(292 B)
📄
006-anonymous-classes-handled.phpt
(349 B)
📄
007-evaled-code-handled.phpt
(289 B)
📄
008-class-with-no-constructor-call-handled.phpt
(275 B)
📄
009-curl_exec.phpt
(892 B)
📄
010-fwrite-fread-fopen.phpt
(894 B)
📄
010-fwrite-fread-tmpfile.phpt
(876 B)
📄
011-pdo-exec.phpt
(910 B)
📄
011-pdo-query.phpt
(814 B)
📄
011-pdostatement-execute-pdo-prepare.phpt
(1.05 KB)
📄
012-file_put_contents.phpt
(668 B)
📄
013-fix-memory-leak-when-scoutapm_get_calls-not-called.phpt
(510 B)
📄
014-predis-support.phpt
(4 KB)
📄
015-phpredis-support.phpt
(3.13 KB)
📄
016-memcached-support.phpt
(4.36 KB)
📄
017-elastic-7-support.phpt
(2.24 KB)
📄
018-do-not-instrument-by-default.phpt
(694 B)
📄
019-url-method-capture-fgc.phpt
(942 B)
📄
020-url-method-capture-curl-post.phpt
(887 B)
📄
021-url-method-capture-curl-customreq.phpt
(914 B)
📄
022-elastic-8-support.phpt
(2.63 KB)
📄
bug-47.phpt
(545 B)
📄
bug-49.phpt
(589 B)
📄
bug-55.phpt
(855 B)
📄
bug-71.phpt
(704 B)
📄
bug-88.phpt
(979 B)
📄
bug-93.phpt
(530 B)
📄
external.inc
(50 B)
Editing: 022-elastic-8-support.phpt
--TEST-- Elasticsearch userland functions are supported --SKIPIF-- <?php if (!extension_loaded("scoutapm")) die("skip scoutapm extension required."); if (!extension_loaded("curl")) die("skip Elasticsearch needs the curl extension."); if (shell_exec("which composer") === null) die("skip composer not found in path."); $out = null; $result = null; exec("mkdir -p /tmp/scout_elastic_test && cd /tmp/scout_elastic_test && composer require -n elasticsearch/elasticsearch:^8.0", $out, $result); if ($result !== 0) { die("skip composer failed: " . implode(", ", $out)); } if (!getenv('CI')) { require "/tmp/scout_elastic_test/vendor/autoload.php"; // Check Elasticsearch is running & can connect to it /* Run with: docker run --rm --name elasticsearch \ -p 9200:9200 \ -e discovery.type=single-node \ -e xpack.security.enabled=false \ -e xpack.security.enrollment.enabled=false \ -e xpack.security.http.ssl.enabled=false \ -e xpack.security.transport.ssl.enabled=false \ elasticsearch:8.1.2 */ $client = \Elastic\Elasticsearch\ClientBuilder::create() ->setHosts(['localhost:9200']) ->build(); try { $client->search([]); } catch (\Elastic\Elasticsearch\Common\Exceptions\NoNodesAvailableException $e) { die("skip " . $e->getMessage()); } } ?> --FILE-- <?php echo implode("\n", array_intersect( [ 'Elastic\Elasticsearch\Client->index', 'Elastic\Elasticsearch\Client->get', 'Elastic\Elasticsearch\Client->search', 'Elastic\Elasticsearch\Client->delete', ], scoutapm_list_instrumented_functions() )) . "\n"; scoutapm_enable_instrumentation(true); require "/tmp/scout_elastic_test/vendor/autoload.php"; $client = \Elastic\Elasticsearch\ClientBuilder::create() ->setHosts(['localhost:9200']) ->build(); $client->index(['index' => 'my_index', 'id' => 'my_id', 'body' => ['testField' => 'abc']]); $client->get(['index' => 'my_index', 'id' => 'my_id']); $client->search(['index' => 'my_index', 'body' => ['query' => ['match' => ['testField' => 'abc']]]]); $client->delete(['index' => 'my_index', 'id' => 'my_id']); $calls = scoutapm_get_calls(); var_dump(array_column($calls, 'function')); ?> --CLEAN-- <?php shell_exec("rm -Rf /tmp/scout_elastic_test"); ?> --EXPECTF-- Elastic\Elasticsearch\Client->index Elastic\Elasticsearch\Client->get Elastic\Elasticsearch\Client->search Elastic\Elasticsearch\Client->delete array(%d) { [%d]=> string(%d) "Elastic\Elasticsearch\Client->index" [%d]=> string(%d) "Elastic\Elasticsearch\Client->get" [%d]=> string(%d) "Elastic\Elasticsearch\Client->search" [%d]=> string(%d) "Elastic\Elasticsearch\Client->delete" }
Upload File
Create Folder