1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Fix tests.

This commit is contained in:
AndrolGenhald 2022-06-22 01:53:42 -05:00
parent 79603820d8
commit 4e3c2ea4d0
2 changed files with 5 additions and 3 deletions

View File

@ -936,7 +936,9 @@ class ArrayAccessTest extends TestCase
'simpleXmlArrayFetchChildren' => [
'code' => '<?php
function iterator(SimpleXMLElement $xml): iterable {
foreach ($xml->children() as $img) {
$children = $xml->children();
assert($children !== null);
foreach ($children as $img) {
yield $img["src"] ?? "";
}
}',

View File

@ -40,8 +40,8 @@ class ProjectCheckerTest extends TestCase
/** @var ProjectAnalyzer */
protected $project_analyzer;
private const EXPECTED_OUTPUT = "Target PHP version: 8.1 (set by tests) Extensions enabled: dom (unsupported "
. "extensions: simplexml, ctype, json, libxml, mbstring, tokenizer)\n"
private const EXPECTED_OUTPUT = "Target PHP version: 8.1 (set by tests) Extensions enabled: dom, simplexml "
. "(unsupported extensions: ctype, json, libxml, mbstring, tokenizer)\n"
. "Scanning files...\n"
. "Analyzing files...\n"
. "\n"