Skip to content

Commit db2de6f

Browse files
committed
AnalyserIntegrationTest - run with bleedingEdge
1 parent 506a4d9 commit db2de6f

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,10 @@ public function testBug7554(): void
871871
$errors = $this->runAnalyse(__DIR__ . '/data/bug-7554.php');
872872
$this->assertCount(2, $errors);
873873

874-
$this->assertSame(sprintf('Parameter #1 $%s of function count expects array|Countable, array<int, array<int, int<0, max>|string>>|false given.', PHP_VERSION_ID < 80000 ? 'var' : 'value'), $errors[0]->getMessage());
874+
$this->assertSame(sprintf('Parameter #1 $%s of function count expects array|Countable, array<int, array<int, int|string>>|false given.', PHP_VERSION_ID < 80000 ? 'var' : 'value'), $errors[0]->getMessage());
875875
$this->assertSame(26, $errors[0]->getLine());
876876

877-
$this->assertSame('Cannot access offset int<1, max> on array<int, array{string, int<0, max>}>|false.', $errors[1]->getMessage());
877+
$this->assertSame('Cannot access offset int<1, max> on list<array{string, int<0, max>}>|false.', $errors[1]->getMessage());
878878
$this->assertSame(27, $errors[1]->getLine());
879879
}
880880

@@ -1091,6 +1091,13 @@ public function testBug8146a(): void
10911091
$this->assertNoErrors($errors);
10921092
}
10931093

1094+
public static function getAdditionalConfigFiles(): array
1095+
{
1096+
return [
1097+
__DIR__ . '/../../../conf/bleedingEdge.neon',
1098+
];
1099+
}
1100+
10941101
/**
10951102
* @param string[]|null $allAnalysedFiles
10961103
* @return Error[]

tests/PHPStan/Analyser/data/bug-7215.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ function keysAsString(array $array): array
2121
}
2222

2323
function () {
24-
assertType('array<int, numeric-string>', keysAsString([]));
25-
assertType('non-empty-array<int, numeric-string>', keysAsString(['' => '']));
24+
assertType('list<numeric-string>', keysAsString([]));
25+
assertType('non-empty-list<numeric-string>', keysAsString(['' => '']));
2626
};

tests/PHPStan/Analyser/data/bug-7918.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ public function run(): array
7676

7777

7878
$arr3[] = $result;
79-
assertType('non-empty-array<int, array{val1: false, val2: false, val3: false, val4: false, val5: false, val6: false, val7: false}|array{val1: true, val2: true, val3: true, val4: true, val5: true, val6: true, val7: false}>', $arr3);
79+
assertType('non-empty-list<array{val1: false, val2: false, val3: false, val4: false, val5: false, val6: false, val7: false}|array{val1: true, val2: true, val3: true, val4: true, val5: true, val6: true, val7: false}>', $arr3);
8080
}
8181

82-
assertType('array<int, array{val1: false, val2: false, val3: false, val4: false, val5: false, val6: false, val7: false}|array{val1: true, val2: true, val3: true, val4: true, val5: true, val6: true, val7: false}>', $arr3);
82+
assertType('list<array{val1: false, val2: false, val3: false, val4: false, val5: false, val6: false, val7: false}|array{val1: true, val2: true, val3: true, val4: true, val5: true, val6: true, val7: false}>', $arr3);
8383

8484
return $arr3;
8585
}
@@ -125,10 +125,10 @@ public function runImpure(): array
125125
}
126126

127127
$arr3[] = $result;
128-
assertType('non-empty-array<int, array{val1: bool, val2: bool, val3: bool, val4: bool, val5: bool, val6: bool, val7: false}>', $arr3);
128+
assertType('non-empty-list<array{val1: bool, val2: bool, val3: bool, val4: bool, val5: bool, val6: bool, val7: false}>', $arr3);
129129
}
130130

131-
assertType('array<int, array{val1: bool, val2: bool, val3: bool, val4: bool, val5: bool, val6: bool, val7: false}>', $arr3);
131+
assertType('list<array{val1: bool, val2: bool, val3: bool, val4: bool, val5: bool, val6: bool, val7: false}>', $arr3);
132132

133133
return $arr3;
134134
}

0 commit comments

Comments
 (0)