Skip to content

Commit

Permalink
Another testcase for T_NAME_QUALIFIED
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Oct 17, 2024
1 parent 35fc53b commit eaece67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions tests/UsedSymbolExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function test(string $path, array $expectedUsages): void
strtolower('LIBXML_ERR_FATAL') => SymbolKind::CONSTANT,
strtolower('LIBXML_ERR_ERROR') => SymbolKind::CONSTANT,
strtolower('DDTrace\DBM_PROPAGATION_FULL') => SymbolKind::CONSTANT,
strtolower('DDTrace\Integrations\Exec\proc_get_pid') => SymbolKind::FUNCTION,
]
)
);
Expand Down Expand Up @@ -145,6 +146,7 @@ public function provideVariants(): iterable
'json_encode' => [8],
'DDTrace\active_span' => [12],
'DDTrace\root_span' => [13],
'DDTrace\Integrations\Exec\proc_get_pid' => [16],
'json_decode' => [21],
],
SymbolKind::CONSTANT => [
Expand All @@ -167,6 +169,7 @@ public function provideVariants(): iterable
'json_encode' => [8],
'DDTrace\active_span' => [12],
'DDTrace\root_span' => [13],
'DDTrace\Integrations\Exec\proc_get_pid' => [16],
'json_decode' => [21],
],
SymbolKind::CONSTANT => [
Expand Down
4 changes: 2 additions & 2 deletions tests/data/not-autoloaded/used-symbols/extensions-global.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php



use { DDTrace\Integrations };
use My\App\XMLReader;
use function DDTrace\active_span;

Expand All @@ -13,7 +13,7 @@
DDTrace\root_span();
DDTrace\DBM_PROPAGATION_FULL;
XMLReader::class;

Integrations\Exec\proc_get_pid();

// those are not provided as known ext symbols in the test
\CURLOPT_SSL_VERIFYHOST;
Expand Down
4 changes: 2 additions & 2 deletions tests/data/not-autoloaded/used-symbols/extensions.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Extensions;

use DDTrace;
use { DDTrace, DDTrace\Integrations };
use function DDTrace\active_span;
use My\App\XMLReader;

Expand All @@ -13,7 +13,7 @@
DDTrace\root_span();
DDTrace\DBM_PROPAGATION_FULL;
XMLReader::class;

Integrations\Exec\proc_get_pid();

// those are not provided as known ext symbols in the test
\CURLOPT_SSL_VERIFYHOST;
Expand Down

0 comments on commit eaece67

Please sign in to comment.