diff --git a/tests/Core/File/FindStartOfStatementTest.inc b/tests/Core/File/FindStartOfStatementTest.inc index 3835d557b6..574b986140 100644 --- a/tests/Core/File/FindStartOfStatementTest.inc +++ b/tests/Core/File/FindStartOfStatementTest.inc @@ -14,7 +14,7 @@ while(true) {} $a = 1; /* testClosureAssignment */ -$a = function($b=false;){}; +$a = function($b=false){}; /* testHeredocFunctionArg */ myFunction(<< fn() => return 1, - 'b' => fn() => return 1, + 'a' => fn() => 1, + 'b' => fn() => 1, ]; /* testStaticArrowFunction */ @@ -139,11 +139,11 @@ switch ($foo) { /* testInsideCaseStatement */ $var = doSomething(); /* testInsideCaseBreakStatement */ - break 2; + break 1; case 2: /* testInsideCaseContinueStatement */ - continue 2; + continue 1; case 3: /* testInsideCaseReturnStatement */ diff --git a/tests/Core/File/FindStartOfStatementTest.php b/tests/Core/File/FindStartOfStatementTest.php index 659d0df466..db222b940c 100644 --- a/tests/Core/File/FindStartOfStatementTest.php +++ b/tests/Core/File/FindStartOfStatementTest.php @@ -92,7 +92,7 @@ public function testClosureAssignment() $start = $this->getTargetToken('/* testClosureAssignment */', T_CLOSE_CURLY_BRACKET); $found = self::$phpcsFile->findStartOfStatement($start); - $this->assertSame(($start - 12), $found); + $this->assertSame(($start - 11), $found); }//end testClosureAssignment() @@ -224,7 +224,7 @@ public function testArrowFunctionArrayValue() $start = $this->getTargetToken('/* testArrowFunctionArrayValue */', T_COMMA); $found = self::$phpcsFile->findStartOfStatement($start); - $this->assertSame(($start - 9), $found); + $this->assertSame(($start - 7), $found); }//end testArrowFunctionArrayValue()