Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the tests broken when running with Paratest #11122

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions tests/Config/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,10 @@ function handleThrow(I $e) : void {

public function testModularConfig(): void
{
// hack to isolate Psalm from PHPUnit arguments
global $argv;
$argv = [];

$root = __DIR__ . '/../fixtures/ModularConfig';
$config = Config::loadFromXMLFile($root . '/psalm.xml', $root);
$this->assertEquals(
Expand Down
4 changes: 4 additions & 0 deletions tests/Config/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class PluginTest extends TestCase

public static function setUpBeforeClass(): void
{
// hack to isolate Psalm from PHPUnit cli arguments
global $argv;
$argv = [];

self::$config = new TestConfig();

if (!defined('PSALM_VERSION')) {
Expand Down
4 changes: 4 additions & 0 deletions tests/ProjectCheckerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class ProjectCheckerTest extends TestCase

public static function setUpBeforeClass(): void
{
// hack to stop Psalm seeing the phpunit arguments
global $argv;
$argv = [];

self::$config = new TestConfig();

if (!defined('PSALM_VERSION')) {
Expand Down