|
2 | 2 |
|
3 | 3 | namespace Behat\Mink\Tests\Driver\Js; |
4 | 4 |
|
| 5 | +use Behat\Mink\KeyModifier; |
5 | 6 | use Behat\Mink\Tests\Driver\TestCase; |
6 | 7 |
|
7 | 8 | final class EventsTest extends TestCase |
@@ -86,6 +87,8 @@ public function testMouseOver(): void |
86 | 87 | } |
87 | 88 |
|
88 | 89 | /** |
| 90 | + * @param KeyModifier::*|null $modifier |
| 91 | + * |
89 | 92 | * @dataProvider provideKeyboardEventsModifiers |
90 | 93 | */ |
91 | 94 | public function testKeyboardEvents(?string $modifier, string $eventProperties): void |
@@ -118,11 +121,11 @@ public static function provideKeyboardEventsModifiers(): iterable |
118 | 121 | { |
119 | 122 | return [ |
120 | 123 | 'none' => [null, '0 / 0 / 0 / 0'], |
121 | | - 'alt' => ['alt', '1 / 0 / 0 / 0'], |
| 124 | + 'alt' => [KeyModifier::ALT, '1 / 0 / 0 / 0'], |
122 | 125 | // 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'], |
126 | 129 | ]; |
127 | 130 | } |
128 | 131 | } |
0 commit comments