Skip to content

Commit

Permalink
Merge pull request #502 from PHPCSStandards/feature/tests-minor-cleanup
Browse files Browse the repository at this point in the history
Tests: minor clean up
  • Loading branch information
jrfnl committed Aug 25, 2023
2 parents 68925d0 + d55e091 commit e6287ae
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Tests/Internal/IsShortArrayOrList/SolveTest.php
Expand Up @@ -37,7 +37,7 @@ final class SolveTest extends UtilityMethodTestCase
public function testSolve($testMarker, $expected)
{
$stackPtr = $this->getTargetToken($testMarker, StableCollections::$shortArrayListOpenTokensBC);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr, []);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr);
$type = $solver->solve();

$this->assertSame($expected, $type);
Expand Down
8 changes: 4 additions & 4 deletions Tests/Internal/IsShortArrayOrList/WalkInsideTest.php
Expand Up @@ -36,7 +36,7 @@ final class WalkInsideTest extends UtilityMethodTestCase
public function testWalkInsideUndetermined($testMarker, $expected)
{
$stackPtr = $this->getTargetToken($testMarker, [\T_OPEN_SHORT_ARRAY]);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr, []);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr);
$type = $solver->solve();

$this->assertSame($expected, $type);
Expand Down Expand Up @@ -121,7 +121,7 @@ public static function dataWalkInsideUndetermined()
public function testWalkInsideResolved($testMarker, $expected)
{
$stackPtr = $this->getTargetToken($testMarker, [\T_OPEN_SHORT_ARRAY]);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr, []);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr);
$type = $solver->solve();

$this->assertSame($expected, $type);
Expand Down Expand Up @@ -244,7 +244,7 @@ public static function dataWalkInsideResolved()
public function testSampleTooSmall()
{
$stackPtr = $this->getTargetToken('/* testNestedShortArraySampleTooSmall */', \T_OPEN_SHORT_ARRAY);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr, []);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr);
$type = $solver->solve();

$this->assertSame(IsShortArrayOrList::SHORT_ARRAY, $type);
Expand All @@ -263,7 +263,7 @@ public function testSampleTooSmall()
public function testRecursionLimit($testMarker, $expected)
{
$stackPtr = $this->getTargetToken($testMarker, [\T_OPEN_SHORT_ARRAY]);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr, []);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr);
$type = $solver->solve();

$this->assertSame($expected, $type);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Internal/IsShortArrayOrList/WalkOutsideTest.php
Expand Up @@ -39,7 +39,7 @@ final class WalkOutsideTest extends UtilityMethodTestCase
public function testWalkOutside($testMarker, $expected)
{
$stackPtr = $this->getTargetToken($testMarker, [\T_OPEN_SHORT_ARRAY]);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr, []);
$solver = new IsShortArrayOrList(self::$phpcsFile, $stackPtr);
$type = $solver->solve();

$this->assertSame($expected, $type);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Utils/Namespaces/DetermineNamespaceTest.php
Expand Up @@ -260,7 +260,7 @@ public function testFallbackToEmptyString()
$result = Namespaces::findNamespacePtr(self::$phpcsFile, $stackPtr);
$this->assertSame($expected, $result, 'Failed test with findNamespacePtr');

$result = Namespaces::determineNamespace(self::$phpcsFile, $stackPtr, false);
$result = Namespaces::determineNamespace(self::$phpcsFile, $stackPtr);
$this->assertSame('', $result, 'Failed test with determineNamespace');
}
}

0 comments on commit e6287ae

Please sign in to comment.