Skip to content

Commit 4c43b38

Browse files
committed
fix tests
1 parent b94cc23 commit 4c43b38

File tree

2 files changed

+1930
-1928
lines changed

2 files changed

+1930
-1928
lines changed

tests/commands/ApiControllerTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ public function testGenerateJson(): void
120120
$this->assertNotEmpty($output);
121121
$this->assertStringContainsString('Updating cross references and backlinks... done.', $output);
122122

123-
$this->assertMatchesJsonSnapshot(file_get_contents(Yii::getAlias('@runtime') . '/types.json'));
123+
$content = file_get_contents(Yii::getAlias('@runtime') . '/types.json');
124+
$content = preg_replace('#(\s*\"sourceFile\"\: \").*?(\\\\/tests\\\\/.*\.php)#', '$1$2', $content);
125+
$this->assertMatchesJsonSnapshot($content);
124126
}
125127
}

0 commit comments

Comments
 (0)