Skip to content

Commit 792e96f

Browse files
authored
test: add test with setDisableExternalChecks(true) (#32)
1 parent 7de21f5 commit 792e96f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/UpstreamFixturesTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ final class UpstreamFixturesTest extends TestCase
1313
{
1414
private Parser $parser;
1515
private Parser $parserNoNetwork;
16+
private Parser $parserNoExternalChecks;
1617

1718
protected function setUp(): void
1819
{
@@ -21,6 +22,10 @@ protected function setUp(): void
2122
$opts = new ParserConfig();
2223
$opts->setDisableNetwork(true);
2324
$this->parserNoNetwork = new Parser($opts);
25+
26+
$opts = new ParserConfig();
27+
$opts->setDisableExternalChecks(true);
28+
$this->parserNoExternalChecks = new Parser($opts);
2429
}
2530

2631
/**
@@ -70,6 +75,12 @@ public function testInvalidFilesIsValid(string $yamlPath): void
7075
$this->assertFalse($this->parser->isValid($yamlPath));
7176
}
7277

78+
public function testExternalChecksDisabled(): void
79+
{
80+
$root = __DIR__ . '/fixtures/testdata';
81+
$this->assertTrue($this->parserNoExternalChecks->isValid("$root/v0/invalid/logo_missing_file.yml"));
82+
}
83+
7384
/**
7485
* @return non-empty-array<string, array{string}>
7586
*/

0 commit comments

Comments
 (0)