Skip to content

Commit 42375fd

Browse files
committed
fix the analysis of the EventsTest code
1 parent e02c787 commit 42375fd

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"require": {
2121
"php": ">=7.2",
2222
"ext-json": "*",
23-
"behat/mink": "^1.9",
23+
"behat/mink": "^1.11",
2424
"symfony/error-handler": "^4.4 || ^5.0 || ^6.0 || ^7.0",
2525
"symfony/phpunit-bridge": "^4.4 || ^5.4 || ^6.0 || ^7.0",
2626
"phpunit/phpunit": "^8.5.22 || ^9.5.11",

tests/Js/EventsTest.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Behat\Mink\Tests\Driver\Js;
44

5+
use Behat\Mink\KeyModifier;
56
use Behat\Mink\Tests\Driver\TestCase;
67

78
final class EventsTest extends TestCase
@@ -86,6 +87,8 @@ public function testMouseOver(): void
8687
}
8788

8889
/**
90+
* @param KeyModifier::*|null $modifier
91+
*
8992
* @dataProvider provideKeyboardEventsModifiers
9093
*/
9194
public function testKeyboardEvents(?string $modifier, string $eventProperties): void
@@ -118,11 +121,11 @@ public static function provideKeyboardEventsModifiers(): iterable
118121
{
119122
return [
120123
'none' => [null, '0 / 0 / 0 / 0'],
121-
'alt' => ['alt', '1 / 0 / 0 / 0'],
124+
'alt' => [KeyModifier::ALT, '1 / 0 / 0 / 0'],
122125
// jQuery considers ctrl as being a metaKey in the normalized event
123-
'ctrl' => ['ctrl', '0 / 1 / 0 / 1'],
124-
'shift' => ['shift', '0 / 0 / 1 / 0'],
125-
'meta' => ['meta', '0 / 0 / 0 / 1'],
126+
'ctrl' => [KeyModifier::CTRL, '0 / 1 / 0 / 1'],
127+
'shift' => [KeyModifier::SHIFT, '0 / 0 / 1 / 0'],
128+
'meta' => [KeyModifier::META, '0 / 0 / 0 / 1'],
126129
];
127130
}
128131
}

0 commit comments

Comments
 (0)