Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
simplify ExpressionResultTest
  • Loading branch information
staabm committed Jul 21, 2025
commit 8b2806a1362e4d47880c887aa75e3c4e2ef3cc0b
8 changes: 1 addition & 7 deletions tests/PHPStan/Analyser/ExpressionResultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
use PHPStan\ShouldNotHappenException;
use PHPStan\Testing\PHPStanTestCase;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ArrayType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\StringType;
use PHPUnit\Framework\Attributes\DataProvider;
use function count;
use function get_class;
Expand Down Expand Up @@ -130,10 +127,7 @@ public function testIsAlwaysTerminating(
/** @var ScopeFactory $scopeFactory */
$scopeFactory = self::getContainer()->getByType(ScopeFactory::class);
$scope = $scopeFactory->create(ScopeContext::create('test.php'))
->assignVariable('string', new StringType(), new StringType(), TrinaryLogic::createYes())
->assignVariable('x', new IntegerType(), new IntegerType(), TrinaryLogic::createYes())
->assignVariable('cond', new MixedType(), new MixedType(), TrinaryLogic::createYes())
->assignVariable('arr', new ArrayType(new MixedType(), new MixedType()), new ArrayType(new MixedType(), new MixedType()), TrinaryLogic::createYes());
->assignVariable('x', new IntegerType(), new IntegerType(), TrinaryLogic::createYes());

$result = $nodeScopeResolver->processExprNode(
$stmt,
Expand Down