Skip to content

Commit 4fb1462

Browse files
committed
Tiny CS fix
1 parent b23c737 commit 4fb1462

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

tests/Js/WindowTest.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,18 @@ public function testResizeWindow(): void
7171
{
7272
$this->getSession()->visit($this->pathTo('/index.html'));
7373
$session = $this->getSession();
74-
$testWidth = 640;
75-
$testHeight = 480;
74+
$expectedWidth = 640;
75+
$expectedHeight = 480;
7676

77-
$session->resizeWindow($testWidth, $testHeight);
77+
$session->resizeWindow($expectedWidth, $expectedHeight);
7878
$session->wait(1000, 'false');
79+
7980
$jsWindowSizeScript = <<<"JS"
8081
(function () {
81-
var check =
82-
function(w, h){
83-
return Math.abs(w - $testWidth) <= 100
84-
&& Math.abs(h - $testHeight) <= 100;
85-
},
82+
var check = function (actualWidth, actualHeight) {
83+
return Math.abs(actualWidth - $expectedWidth) <= 100
84+
&& Math.abs(actualHeight - $expectedHeight) <= 100;
85+
},
8686
htmlElem = document.documentElement,
8787
bodyElem = document.getElementsByTagName('body')[0];
8888
@@ -93,7 +93,6 @@ function(w, h){
9393
);
9494
})();
9595
JS;
96-
9796
$this->assertTrue($session->evaluateScript($jsWindowSizeScript));
9897
}
9998

0 commit comments

Comments
 (0)