Skip to content

Commit b6e76d3

Browse files
committed
fix: "\visit" not being recognized as browser test
1 parent 88f82f6 commit b6e76d3

File tree

30 files changed

+160
-31
lines changed

30 files changed

+160
-31
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
"ext-pcntl": "*",
4242
"ext-posix": "*",
4343
"livewire/livewire": "^3.7.15",
44-
"nunomaduro/collision": "^8.9.2",
44+
"nunomaduro/collision": "^8.9.3",
4545
"orchestra/testbench": "^10.11.0",
4646
"pestphp/pest-dev-tools": "^4.1.0",
4747
"pestphp/pest-plugin-laravel": "^4.1",
48-
"pestphp/pest-plugin-type-coverage": "^4.0.3"
48+
"pestphp/pest-plugin-type-coverage": "^4.0.4"
4949
},
5050
"minimum-stability": "dev",
5151
"prefer-stable": true,

src/Support/BrowserTestIdentifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ private static function usesFunction(Closure $closure, string $functionName): bo
8181

8282
for ($i = 0; $i < $tokensCount - 1; $i++) {
8383
if (is_array($tokens[$i]) &&
84-
$tokens[$i][0] === T_STRING &&
85-
mb_strtolower($tokens[$i][1]) === $functionName &&
84+
in_array($tokens[$i][0], [T_STRING, T_NAME_FULLY_QUALIFIED], true) &&
85+
mb_strtolower(mb_ltrim($tokens[$i][1], '\\')) === $functionName &&
8686
$tokens[$i + 1] === '(') {
8787
if ($functionName === 'debug') {
8888
return true;

tests/.pest/snapshots/Browser/Visit/SingleUrl/it_may_visit_a_page_in_light_dark_mode_with_data_set___Pest_Browser_Enums_ColorScheme_Enum__DARK___dark____.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/.pest/snapshots/Browser/Visit/SingleUrl/it_may_visit_a_page_in_light_dark_mode_with_data_set___Pest_Browser_Enums_ColorScheme_Enum__LIGHT___light____.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/.pest/snapshots/Browser/Visit/SingleUrl/it_may_visit_a_page_with_data_set____desktop___.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/.pest/snapshots/Browser/Visit/SingleUrl/it_may_visit_a_page_with_data_set____galaxyNote20___.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/.pest/snapshots/Browser/Visit/SingleUrl/it_may_visit_a_page_with_data_set____galaxyS22___.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/.pest/snapshots/Browser/Visit/SingleUrl/it_may_visit_a_page_with_data_set____galaxyS23___.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/.pest/snapshots/Browser/Visit/SingleUrl/it_may_visit_a_page_with_data_set____galaxyS24Ultra___.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/.pest/snapshots/Browser/Visit/SingleUrl/it_may_visit_a_page_with_data_set____galaxyTabS8___.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)