From 99dbe67efe23222743d6974cd0b5a91bcab17280 Mon Sep 17 00:00:00 2001 From: Fabio Bonelli Date: Fri, 21 Nov 2025 12:40:03 +0100 Subject: [PATCH] test: add test with setDisableExternalChecks(true) --- tests/UpstreamFixturesTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/UpstreamFixturesTest.php b/tests/UpstreamFixturesTest.php index 512150f..d80b131 100644 --- a/tests/UpstreamFixturesTest.php +++ b/tests/UpstreamFixturesTest.php @@ -13,6 +13,7 @@ final class UpstreamFixturesTest extends TestCase { private Parser $parser; private Parser $parserNoNetwork; + private Parser $parserNoExternalChecks; protected function setUp(): void { @@ -21,6 +22,10 @@ protected function setUp(): void $opts = new ParserConfig(); $opts->setDisableNetwork(true); $this->parserNoNetwork = new Parser($opts); + + $opts = new ParserConfig(); + $opts->setDisableExternalChecks(true); + $this->parserNoExternalChecks = new Parser($opts); } /** @@ -70,6 +75,12 @@ public function testInvalidFilesIsValid(string $yamlPath): void $this->assertFalse($this->parser->isValid($yamlPath)); } + public function testExternalChecksDisabled(): void + { + $root = __DIR__ . '/fixtures/testdata'; + $this->assertTrue($this->parserNoExternalChecks->isValid("$root/v0/invalid/logo_missing_file.yml")); + } + /** * @return non-empty-array */